-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Is your feature request related to a problem? Please describe.
I need to calculate a Note, but there is no way to do any calculation as the enum is opaque. Now, I use transmute:
https://github.com/TeXitoi/midi-grid/blob/master/src/main.rs#L195-L196
Describe the solution you'd like
impl core::ops::Add<Rhs = u8> for Note;
impl core::ops::Sub<Rhs = u8> for Note;What about overflow? Saturating? Modulo? Panic?
Describe alternatives you've considered
transmute
impl From<U7> for Note;Additional context
Thanks for this crate, was able to make a midi keyboard within an hour! https://github.com/TeXitoi/midi-grid
When we agree on the design, I can implement it if you want.
Metadata
Metadata
Assignees
Labels
No labels