Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mike-bourgeous
Copy link

@mike-bourgeous mike-bourgeous commented Jan 29, 2023

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
Copy link
Author

mike-bourgeous commented Jan 29, 2023

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

Before:

image

After:

image

@mike-bourgeous mike-bourgeous changed the title Parse MSB and LSB from pitch bend messages when using midilib gem Parse MSB and LSB from pitch bend and song position messages when using midilib gem Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant