You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rounding when two-bytes data is converted to one-byte data? #125
It seems to truncate the value when converting two-bytes to one-byte data.
For example, pitchbend to cc. Suppose the pitchbend data incoming is 0x60 0x68 (LSB and MSB, in order). Its normalized value is(tested on Lua console):
This value is handed to an unsigned int and the fractional part is discarded becoming 103, which, in turn, in hex is 0x67. It isn't 0x68, even though it was closer to 0x68, mathematically. It's because there is no rounding algorithm when a conversion from higher resolution to lower resolution occurs. I think this can cause some confusion and issues.
Activity
cbdevnet commentedon Jun 24, 2024
Hm yes, not optimal in this case but hard to fix. Will think about it some more..