44 incomingMessages.
clear();
77 jassert (numSamples > 0);
85 if (! incomingMessages.
isEmpty())
106 iter.setNextSamplePosition (startSample);
132 incomingMessages.
clear();
Holds a resizable array of primitive or copy-by-value objects.
Used to iterate through the events in a MidiBuffer.
Holds a sequence of time-stamped midi events.
void addEvent(const MidiMessage &midiMessage, int sampleNumber)
Adds an event to the buffer.
bool isEmpty() const noexcept
Returns true if the buffer is empty.
void clear() noexcept
Removes all events from the buffer.
Represents a piano keyboard, keeping track of which keys are currently pressed.
void handleIncomingMidiMessage(MidiInput *, const MidiMessage &) override
void handleNoteOn(MidiKeyboardState *, int midiChannel, int midiNoteNumber, float velocity) override
void removeNextBlockOfMessages(MidiBuffer &destBuffer, int numSamples)
Removes all the pending messages from the queue as a buffer.
void handleNoteOff(MidiKeyboardState *, int midiChannel, int midiNoteNumber, float velocity) override
MidiMessageCollector()
Creates a MidiMessageCollector.
~MidiMessageCollector() override
Destructor.
void reset(double sampleRate)
Clears any messages from the queue.
void addMessageToQueue(const MidiMessage &message)
Takes an incoming real-time message and adds it to the queue.
Encapsulates a MIDI message.
static MidiMessage noteOn(int channel, int noteNumber, float velocity) noexcept
Creates a key-down message (using a floating-point velocity).
double getTimeStamp() const noexcept
Returns the timestamp associated with this message.
static MidiMessage noteOff(int channel, int noteNumber, float velocity) noexcept
Creates a key-up message.
static double getMillisecondCounterHiRes() noexcept
Returns the number of millisecs since a fixed event (usually system startup).