pub fn data_bytes(status: u8) -> isize {
        match Status::from_u8(status & STATUS_MASK) {
            Some(stat) => {
                match stat {
                    Status::NoteOff |
                    Status::NoteOn |
                    Status::PolyphonicAftertouch |
                    Status::ControlChange |
                    Status::PitchBend |
                    Status::SongPositionPointer => { 2 }

                    Status::SysExStart => { -2 }

                    Status::ProgramChange |
                    Status::ChannelAftertouch |
                    Status::MIDITimeCodeQtrFrame |
                    Status::SongSelect => { 1 }

                    Status::TuneRequest |
                    Status::SysExEnd |
                    Status::TimingClock |
                    Status::Start |
                    Status::Continue |
                    Status::Stop |
                    Status::ActiveSensing |
                    Status::SystemReset => { 0 }
                }
            }
            None => -3
        }
    }
// return the number of data bytes for a message with the given status
// -1 -> variable sized message, call get_variable_size
// -2 -> sysex, read until SysExEnd
// -3 -> invalid status
return the number of data bytes for a message with the given status
1 -> variable sized message, call get_variable_size
2 -> sysex, read until SysExEnd
3 -> invalid status
return the number of data bytes for a message with the given status 1 - > variable sized message call get_variable_size 2 - > sysex read until SysExEnd 3 - > invalid status
pub fn data_bytes(status: u8) -> isize {
        match Status::from_u8(status & STATUS_MASK) {
            Some(stat) => {
                match stat {
                    Status::NoteOff |
                    Status::NoteOn |
                    Status::PolyphonicAftertouch |
                    Status::ControlChange |
                    Status::PitchBend |
                    Status::SongPositionPointer => { 2 }
                    Status::SysExStart => { -2 }
                    Status::ProgramChange |
                    Status::ChannelAftertouch |
                    Status::MIDITimeCodeQtrFrame |
                    Status::SongSelect => { 1 }
                    Status::TuneRequest |
                    Status::SysExEnd |
                    Status::TimingClock |
                    Status::Start |
                    Status::Continue |
                    Status::Stop |
                    Status::ActiveSensing |
                    Status::SystemReset => { 0 }
                }
            }
            None => -3
        }
    }
pub fn data_bytes ( status : u8 ) -> isize { match Status :: from_u8 ( status & STATUS_MASK ) { Some ( stat ) => { match stat { Status :: NoteOff | Status :: NoteOn | Status :: PolyphonicAftertouch | Status :: ControlChange | Status :: PitchBend | Status :: SongPositionPointer => { 2 } Status :: SysExStart => { - 2 } Status :: ProgramChange | Status :: ChannelAftertouch | Status :: MIDITimeCodeQtrFrame | Status :: SongSelect => { 1 } Status :: TuneRequest | Status :: SysExEnd | Status :: TimingClock | Status :: Start | Status :: Continue | Status :: Stop | Status :: ActiveSensing | Status :: SystemReset => { 0 } } } None => - 3 } }
return the number of data bytes for a message with the given status
1 -> variable sized message, call get_variable_size
2 -> sysex, read until SysExEnd
3 -> invalid status
return the number of data bytes for a message with the given status 1 - > variable sized message call get_variable_size 2 - > sysex read until SysExEnd 3 - > invalid status
status
u8
status
u8