Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bostick committed Oct 30, 2024
1 parent d9b1a17 commit 2b7ae1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/midi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ TconvertToMidi(
//
// convert from (-2400, 2400) to (0b0000000000000000 to 0b0011111111111111) i.e. (0 to 16383)
//
auto newPitchBend = (((rational((value)) + 2400) * 0b0011111111111111) / (2 * 2400)).round().to_int16();
auto newPitchBend = (((rational(static_cast<int16_t>(value)) + 2400) * 0b0011111111111111) / (2 * 2400)).round().to_int16();

diff = (roundedTick - lastEventTick);

Expand Down

0 comments on commit 2b7ae1b

Please sign in to comment.