Collects incoming realtime MIDI messages and turns them into blocks suitable for processing by a block-based audio callback. More...
|Creates a MidiMessageCollector. More...|
|void||reset (double sampleRate)|
|Clears any messages from the queue. More...|
|void||addMessageToQueue (const MidiMessage &message)|
|Takes an incoming real-time message and adds it to the queue. More...|
|void||removeNextBlockOfMessages (MidiBuffer &destBuffer, int numSamples)|
|Removes all the pending messages from the queue as a buffer. More...|
|void||handleNoteOn (MidiKeyboardState *, int midiChannel, int midiNoteNumber, float velocity) override|
|void||handleNoteOff (MidiKeyboardState *, int midiChannel, int midiNoteNumber, float velocity) override|
|void||handleIncomingMidiMessage (MidiInput *, const MidiMessage &) override|
|Public Member Functions inherited from MidiKeyboardStateListener|
|MidiKeyboardStateListener () noexcept|
|Public Member Functions inherited from MidiInputCallback|
|virtual void||handlePartialSysexMessage (MidiInput *source, const uint8 *messageData, int numBytesSoFar, double timestamp)|
|Notification sent each time a packet of a multi-packet sysex message arrives. More...|
Collects incoming realtime MIDI messages and turns them into blocks suitable for processing by a block-based audio callback.
Constructor & Destructor Documentation
Creates a MidiMessageCollector.
Member Function Documentation
Clears any messages from the queue.
You need to call this method before starting to use the collector, so that it knows the correct sample rate to use.
|void MidiMessageCollector::addMessageToQueue||(||const MidiMessage &||message||)|
Takes an incoming real-time message and adds it to the queue.
The message's timestamp is taken, and it will be ready for retrieval as part of the block returned by the next call to removeNextBlockOfMessages().
This method is fully thread-safe when overlapping calls are made with removeNextBlockOfMessages().
|void MidiMessageCollector::removeNextBlockOfMessages||(||MidiBuffer &||destBuffer,|
Removes all the pending messages from the queue as a buffer.
This will also correct the messages' timestamps to make sure they're in the range 0 to numSamples - 1.
This call should be made regularly by something like an audio processing callback, because the time that it happens is used in calculating the midi event positions.
This method is fully thread-safe when overlapping calls are made with addMessageToQueue().
Precondition: numSamples must be greater than 0.
The documentation for this class was generated from the following file:
Generated on Fri Jan 12 2018 09:51:20 for JUCE by 1.8.13