Bela
|
Public Member Functions | |
int | parse (midi_byte_t *input, unsigned int length) |
void | setCallback (void(*newCallback)(MidiChannelMessage, void *), void *arg=NULL) |
bool | isCallbackEnabled () |
int | numAvailableMessages () |
MidiChannelMessage | getNextChannelMessage () |
Member Function Documentation
int MidiParser::parse | ( | midi_byte_t * | input, |
unsigned int | length | ||
) |
Parses some midi messages.
- Parameters
-
input the array to read from length the maximum number of values available at the array
- Returns
- the number of bytes parsed
|
inline |
Sets the callback to call when a new MidiChannelMessage is available from the input port.
The callback will be called with two arguments: callback(MidiChannelMessage newMessage, void* arg)
In order to deactivate the callback, call this method with NULL as the first argument. While the callback is enabled, calling numAvailableMessages() and getNextChannelMessage() is still possible, but it will probably always return 0 as the callback is called as soon as a new message is available.
- Parameters
-
newCallback the callback function. arg the second argument to be passed to the callback function.
|
inline |
Checks whether there is a callback currently set to be called every time a new input MidiChannelMessage is available from the input port.
|
inline |
Returns the number of unread MidiChannelMessage available from the input port.
|
inline |
Get the oldest channel message in the buffer.
If this method is called when numAvailableMessages()==0, then a message with all fields set to zero is returned.
- Parameters
-
type the type of the message to retrieve
- Returns
- a copy of the oldest message of the give type in the buffer
The documentation for this class was generated from the following file:
Generated on Fri Nov 22 2024 06:27:57 for Bela by 1.8.11