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

make sure to mention that pitch bend values need to be corrected #190

Open
Pomax opened this issue Dec 24, 2020 · 0 comments
Open

make sure to mention that pitch bend values need to be corrected #190

Pomax opened this issue Dec 24, 2020 · 0 comments

Comments

@Pomax
Copy link

Pomax commented Dec 24, 2020

Right now the callback for pitch bend data receives the bend value as signed integer, which is not how the MIDI spec deals with them, where they are only ever positive values between 0x0000-0x3FFF with 0x2000 representing "neutral". While it is of course not possible to change the way the API works (that would break every sketch out there), it is possible to add documentation to the callbacks page to explain that if you're going to forward the event on, or write it to file, you have to add 0x2000 to the bend value and then turn it into 7-bit lsb and msb bytes. If you don't the pitch bend information will be incredibly wrong =D

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant