pub fn midi_to_sonic_token(msg: &MidiMessage) -> Option<u64>Expand description
Encode a MidiMessage into a packed sonic-token u64.
Returns None for messages with no sonic-token event type (everything except
note-on, note-off, and control change). A velocity-0 note-on is preserved as
a NoteOn (not rewritten to NoteOff) so the round-trip is byte-faithful to
the input message; interpret it as a note-off downstream as usual.