public class MidiFramer extends MidiReceiver
Constructor and Description |
---|
MidiFramer(MidiReceiver receiver) |
Modifier and Type | Method and Description |
---|---|
static String |
formatMidiData(byte[] data,
int offset,
int count) |
void |
onSend(byte[] data,
int offset,
int count,
long timestamp)
Called whenever the receiver is passed new MIDI data.
|
flush, getMaxMessageSize, onFlush, send, send
public String TAG
public MidiFramer(MidiReceiver receiver)
public static String formatMidiData(byte[] data, int offset, int count)
public void onSend(byte[] data, int offset, int count, long timestamp) throws IOException
MidiReceiver
MidiReceiver.getMaxMessageSize()
.
NOTE: the msg array parameter is only valid within the context of this call.
The msg bytes should be copied by the receiver rather than retaining a reference
to this parameter.
Also, modifying the contents of the msg array parameter may result in other receivers
in the same application receiving incorrect values in their {link #onSend} method.onSend
in class MidiReceiver
data
- a byte array containing the MIDI dataoffset
- the offset of the first byte of the data in the array to be processedcount
- the number of bytes of MIDI data in the array to be processedtimestamp
- the timestamp of the message (based on System.nanoTime()
IOException