This class represents the current MPE zone layout of a device capable of handling MPE.
More...
This class represents the current MPE zone layout of a device capable of handling MPE.
Use the MPEMessages helper class to convert the zone layout represented by this object to MIDI message sequences that you can send to an Expressive MIDI device to set its zone layout, add zones etc.
- See also
- MPEZone, MPEInstrument
MPEZoneLayout::MPEZoneLayout |
( |
| ) |
|
|
noexcept |
Default constructor.
This will create a layout with no MPE zones. You can add an MPE zone using the method addZone.
Copy constuctor.
This will not copy the listeners registered to the MPEZoneLayout.
Copy assignment operator.
This will not copy the listeners registered to the MPEZoneLayout.
bool MPEZoneLayout::addZone |
( |
MPEZone |
newZone | ) |
|
Adds a new MPE zone to the layout.
- Parameters
-
- Returns
- true if the zone was added without modifying any other zones added previously to the same zone layout object (if any); false if any existing MPE zones had to be truncated or deleted entirely in order to to add this new zone. (Note: the zone itself will always be added with the channel bounds that were specified; this will not fail.)
void MPEZoneLayout::clearAllZones |
( |
| ) |
|
Removes all currently present MPE zones.
void MPEZoneLayout::processNextMidiEvent |
( |
const MidiMessage & |
message | ) |
|
Pass incoming MIDI messages to an object of this class if you want the zone layout to properly react to MPE RPN messages like an MPE device.
MPEMessages::rpnNumber will add or remove zones; RPN 0 will set the per-note or master pitchbend ranges.
Any other MIDI messages will be ignored by this class.
- See also
- MPEMessages
void MPEZoneLayout::processNextMidiBuffer |
( |
const MidiBuffer & |
buffer | ) |
|
Pass incoming MIDI buffers to an object of this class if you want the zone layout to properly react to MPE RPN messages like an MPE device.
MPEMessages::rpnNumber will add or remove zones; RPN 0 will set the per-note or master pitchbend ranges.
Any other MIDI messages will be ignored by this class.
- See also
- MPEMessages
int MPEZoneLayout::getNumZones |
( |
| ) |
const |
|
noexcept |
Returns the current number of MPE zones.
MPEZone* MPEZoneLayout::getZoneByIndex |
( |
int |
index | ) |
const |
|
noexcept |
Returns a pointer to the MPE zone at the given index, or nullptr if there is no such zone.
Zones are sorted by insertion order (most recently added zone last).
MPEZone* MPEZoneLayout::getZoneByChannel |
( |
int |
midiChannel | ) |
const |
|
noexcept |
Returns a pointer to the zone which uses the specified channel (1-16), or nullptr if there is no such zone.
MPEZone* MPEZoneLayout::getZoneByMasterChannel |
( |
int |
midiChannel | ) |
const |
|
noexcept |
Returns a pointer to the zone which has the specified channel (1-16) as its master channel, or nullptr if there is no such zone.
MPEZone* MPEZoneLayout::getZoneByFirstNoteChannel |
( |
int |
midiChannel | ) |
const |
|
noexcept |
Returns a pointer to the zone which has the specified channel (1-16) as its first note channel, or nullptr if there is no such zone.
MPEZone* MPEZoneLayout::getZoneByNoteChannel |
( |
int |
midiChannel | ) |
const |
|
noexcept |
Returns a pointer to the zone which has the specified channel (1-16) as one of its note channels, or nullptr if there is no such zone.
void MPEZoneLayout::addListener |
( |
Listener *const |
listenerToAdd | ) |
|
|
noexcept |
void MPEZoneLayout::removeListener |
( |
Listener *const |
listenerToRemove | ) |
|
|
noexcept |
The documentation for this class was generated from the following file: