On a minor side note, how are the OSC and/or MIDI values derived? and how the displayed percentages of the software? I am using the MIDI channels for display purposes, and something odd is happening with the rounding, I believe... probably not even in LXConsole, but it would help me to understand how LXconsole is doing it, i.e. - are the OSC/MIDI values being derived straight from the DMX value? which is derived from the percentage entered? or which way around/with what rounding algorithms is is done?
Thanks for the info !
Rounding?
-
- Posts: 211
- Joined: Sat Jun 01, 2013 8:23 am
- Location: Adelaide, Australia
Rounding?
Cheers,
Freddy
Freddy
All levels in LXConsole are internally represented in floating point format in the range 0.0 to 100.0. They are converted to DMX (0-255) output using the standard formula:
dmx = round((level/100)*255)
The values are stored in a file in hex format using standard USITT ASCII and converted to and from percentages as outlined above.
A similar formula is followed for MIDI, except the range is, of course, 0-127 rather than 0-255.
midi = round((level/100)*127)
OSC arguments are floating point, either 0.0-1.0 or 0.0-100.0. For example, TouchOSC controls generally send arguments in the range 0.0-1.0 and are converted to a level by multiplying by 100.
dmx = round((level/100)*255)
The values are stored in a file in hex format using standard USITT ASCII and converted to and from percentages as outlined above.
A similar formula is followed for MIDI, except the range is, of course, 0-127 rather than 0-255.
midi = round((level/100)*127)
OSC arguments are floating point, either 0.0-1.0 or 0.0-100.0. For example, TouchOSC controls generally send arguments in the range 0.0-1.0 and are converted to a level by multiplying by 100.
-
- Posts: 211
- Joined: Sat Jun 01, 2013 8:23 am
- Location: Adelaide, Australia