nibbler icon indicating copy to clipboard operation
nibbler copied to clipboard

Parse MSB and LSB from pitch bend and song position messages when using midilib gem

Open mike-bourgeous opened this issue 2 years ago • 1 comments

This change computes the full value parameter using both MSB and LSB for the MIDI::PitchBend and MIDI::SongPointer message types from the midilib gem. I updated the specs to match.

I used multiplication and addition rather than bitwise operations (shift and or) because * and + benchmarked much faster than << and |.

Thanks for writing nibbler!

mike-bourgeous avatar Jan 29 '23 21:01 mike-bourgeous

I also verified this change produces the right output in my own code:

Before:

image

After:

image

mike-bourgeous avatar Jan 29 '23 21:01 mike-bourgeous