Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c17e28c

Browse files
author
neyagakki
committed
fix: change pitch bend variable type from uint8_t to uint32_t for improved precision
1 parent 008b11c commit c17e28c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/umpToMIDI2Protocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class umpToMIDI2Protocol
269269
case 0xE0: //Pitch bend
270270
out1 = ((0x04 << 4) + group) << 24;
271271
out1 += (status + channel) << 16;
272-
uint8_t pb = (val2 << 7) + val1;
272+
uint32_t pb = (val2 << 7) + val1;
273273
out2 += M2Utils::scaleUp(pb, 14, 32);
274274
umpMess[writeIndex] = out1;
275275
increaseWrite();

0 commit comments

Comments
 (0)