Skip to content

Use smaller integer types for MIDI events #2

Description

@lunabunn

Synthesizer::note_on, Synthesizer::note_off, Synthesizer::process_midi_message and friends expect input parameters that are a byte each, i.e. u8 or i8. However, currently, they all take i32, making it difficult to guess what ranges of values are expected.

Most notably, note_on will fail silently with a velocity larger than i8::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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions