Rounding when two-bytes data is converted to one-byte data? #125
Labels
core wishlist
New core feature requests
documentation
Issues within the documentation
enhancement
Improvements on existing features
help wanted
Issues where contributions are appreciated a great deal
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):
When it is handed to CC, it is converted as,
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.
What do you think?
The text was updated successfully, but these errors were encountered: