-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use smaller integer types for MIDI events #2
Comments
I was thinking about the same thing, but haven't started yet because it looks like there will be more changes than expected. It might be a good idea to patch only the public part as an ad-hoc fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Synthesizer::note_on
,Synthesizer::note_off
,Synthesizer::process_midi_message
and friends expect input parameters that are a byte each, i.e.u8
ori8
. However, currently, they all takei32
, making it difficult to guess what ranges of values are expected.Most notably,
note_on
will fail silently with a velocity larger thani8::MAX
.Would it be possible for these public APIs (and ideally their internals as well, so that the library doesn't consume more memory than needed) to be adjusted to use smaller integer types that better represent their actual size?
The text was updated successfully, but these errors were encountered: