83 bool isLegacy =
false;
85 int channelIncrement, numChannels, firstChannel, lastChannel, midiChannelLastAssigned;
91 int lastNotePlayed = -1;
92 bool isFree()
const noexcept {
return notes.
isEmpty(); }
97 int findMidiChannelPlayingClosestNonequalNote (
int noteNumber)
noexcept;
130 void reset() noexcept;
141 int channelIncrement;
142 int firstChannel, lastChannel;
144 uint32 sourceAndChannel[17];
150 int getBestChanToReuse()
const noexcept;
155 bool messageIsNoteData (
const MidiMessage& m) {
return (*m.getRawData() & 0xf0) != 0xf0; }
Holds a resizable array of primitive or copy-by-value objects.
bool isEmpty() const noexcept
Returns true if the array is empty, false otherwise.
This class handles the assignment of new MIDI notes to member channels of an active MPE zone.
int findMidiChannelForExistingNote(int initialNoteOnNumber) noexcept
If a note has been added using findMidiChannelForNewNote() this will return the channel to which it w...
int findMidiChannelForNewNote(int noteNumber) noexcept
This method will use a set of rules recommended in the MPE specification to determine which member ch...
void noteOff(int noteNumber, int midiChannel=-1)
You must call this method for all note-offs that you receive so that this class can keep track of the...
void allNotesOff()
Call this to clear all currently playing notes.
This class handles the logic for remapping MIDI note messages from multiple MPE sources onto a specif...
void reset() noexcept
Resets all the source & channel combinations.
void remapMidiChannelIfNeeded(MidiMessage &message, uint32 mpeSourceID) noexcept
Remaps the MIDI channel of the specified MIDI message (if necessary).
static const uint32 notMPE
Used to indicate that a particular source & channel combination is not currently using MPE.
void clearChannel(int channel) noexcept
Clears a specified channel of this MPE zone.
void clearSource(uint32 mpeSourceID)
Clears all channels in use by a specified source.
This class represents the current MPE zone layout of a device capable of handling MPE.
Encapsulates a MIDI message.
A general-purpose range object, that simply represents any linear range with a start and end point.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
unsigned int uint32
A platform-independent 32-bit unsigned integer type.