heronarts / LX

Core library for 3D LED lighting engines
https://chromatik.co/
Other
41 stars 25 forks source link

Update a few OSC parameters to use absolute values #78

Closed jkbelcher closed 1 year ago

jkbelcher commented 1 year ago

First pass doing some OSC cleanup.

mcslee commented 1 year ago

In Hawaii at the moment so a bit slow. I'm inclined to go more under-the-hood here, and have any parameter which has units specified as SECONDS or MILLISECONDS automatically use absolute osc mode. This could be overridden manually to set the parameter back to normalized mode, but it seems like in 99% of cases time values are going to want to be absolute.

If something like a transition time is not absolute, it should probably actually be using something like PERCENT for the units.

I'll take a look at both this, and changing the handling of DiscreteParameter when I'm settled back from travels.

jkbelcher commented 1 year ago

Yep, going off of units=SECONDS did cross my mind. Seems like a fine place to do it.

The non-seconds parameters in this PR are framesPerSecond and gamma.

mcslee commented 1 year ago

Subsumed by structural changes to make all DiscreteParameters ABSOLUTE mode, and for types like SECONDS/MILLISECONDS to default to that type.

https://github.com/heronarts/LX/commit/b09939cb7c65c62da9b1bd5f761ba2cd67273db0 https://github.com/heronarts/LX/commit/07ac6496263849587646d5e2035e3eb2d9f63a97 https://github.com/heronarts/LX/commit/e2611a8e0a30857a1172af716bbad75121542b04