Struct coremidi::Packet [−][src]
pub struct Packet(_);
Expand description
A collection of simultaneous MIDI events. See MIDIPacket.
Implementations
Get the packet data. This method just gives raw MIDI bytes. You would need another library to decode them and work with higher level events.
let packet_list = &coremidi::PacketBuffer::new(0, &[0x90, 0x40, 0x7f]);
let data: Vec<u8> = packet_list.iter().map(|packet| packet.data().to_vec()).flatten().collect();
assert_eq!(data, vec![0x90, 0x40, 0x7f])