This struct represents an MPE Zone.
More...
#include <juce_MPEZone.h>
This struct represents an MPE Zone.
An MPE Zone occupies one master MIDI channel and an arbitrary number of note channels that immediately follow the master channel. It also defines a pitchbend range (in semitones) to be applied for per-note pitchbends and master pitchbends, respectively.
- See also
- MPEZoneLayout
◆ MPEZone()
juce::MPEZone::MPEZone |
( |
int |
masterChannel, |
|
|
int |
numNoteChannels, |
|
|
int |
perNotePitchbendRange = 48 , |
|
|
int |
masterPitchbendRange = 2 |
|
) |
| |
|
noexcept |
Constructor.
Creates an MPE zone with the given master channel and number of note channels.
- Parameters
-
masterChannel | The master MIDI channel of the new zone. All master (not per-note) messages should be send to this channel. Must be between 1 and 15. Otherwise, the behaviour is undefined. |
numNoteChannels | The number of note channels that the new zone should use. The first note channel will be one higher than the master channel. The number of note channels must be at least 1 and no greater than 16 - masterChannel. Otherwise, the behaviour is undefined. |
perNotePitchbendRange | The per-note pitchbend range in semitones of the new zone. Must be between 0 and 96. Otherwise the behaviour is undefined. If unspecified, the default setting of +/- 48 semitones will be used. |
masterPitchbendRange | The master pitchbend range in semitones of the new zone. Must be between 0 and 96. Otherwise the behaviour is undefined. If unspecified, the default setting of +/- 2 semitones will be used. |
◆ getFirstNoteChannel()
int juce::MPEZone::getFirstNoteChannel |
( |
| ) |
const |
|
noexcept |
◆ getLastNoteChannel()
int juce::MPEZone::getLastNoteChannel |
( |
| ) |
const |
|
noexcept |
◆ getMasterChannel()
int juce::MPEZone::getMasterChannel |
( |
| ) |
const |
|
noexcept |
◆ getMasterPitchbendRange()
int juce::MPEZone::getMasterPitchbendRange |
( |
| ) |
const |
|
noexcept |
Returns the master pitchbend range in semitones set for this zone.
◆ getNoteChannelRange()
Range<int> juce::MPEZone::getNoteChannelRange |
( |
| ) |
const |
|
noexcept |
Returns the MIDI channel numbers (in the range 1-16) of the note channels of this zone as a Range.
◆ getNumNoteChannels()
int juce::MPEZone::getNumNoteChannels |
( |
| ) |
const |
|
noexcept |
Returns the number of note channels occupied by this zone.
◆ getPerNotePitchbendRange()
int juce::MPEZone::getPerNotePitchbendRange |
( |
| ) |
const |
|
noexcept |
Returns the per-note pitchbend range in semitones set for this zone.
◆ isUsingChannel()
bool juce::MPEZone::isUsingChannel |
( |
int |
channel | ) |
const |
|
noexcept |
Returns true if the MIDI channel (in the range 1-16) is used by this zone either as a note channel or as the master channel; false otherwise.
◆ isUsingChannelAsNoteChannel()
bool juce::MPEZone::isUsingChannelAsNoteChannel |
( |
int |
channel | ) |
const |
|
noexcept |
Returns true if the MIDI channel (in the range 1-16) is used by this zone as a note channel; false otherwise.
◆ operator!=()
bool juce::MPEZone::operator!= |
( |
const MPEZone & |
other | ) |
const |
|
noexcept |
- Returns
- true if this zone is not equal to the one passed in.
◆ operator==()
bool juce::MPEZone::operator== |
( |
const MPEZone & |
other | ) |
const |
|
noexcept |
- Returns
- true if this zone is equal to the one passed in.
◆ overlapsWith()
bool juce::MPEZone::overlapsWith |
( |
MPEZone |
other | ) |
const |
|
noexcept |
Returns true if the MIDI channels occupied by this zone overlap with those occupied by the other zone.
◆ setMasterPitchbendRange()
void juce::MPEZone::setMasterPitchbendRange |
( |
int |
rangeInSemitones | ) |
|
|
noexcept |
Sets the master pitchbend range in semitones for this zone.
◆ setPerNotePitchbendRange()
void juce::MPEZone::setPerNotePitchbendRange |
( |
int |
rangeInSemitones | ) |
|
|
noexcept |
Sets the per-note pitchbend range in semitones for this zone.
◆ truncateToFit()
bool juce::MPEZone::truncateToFit |
( |
MPEZone |
zoneToAvoid | ) |
|
|
noexcept |
Tries to truncate this zone in such a way that the range of MIDI channels it occupies do not overlap with the other zone, by reducing this zone's number of note channels.
- Returns
- true if the truncation succeeded or if no truncation is necessary because the zones do not overlap. False if the zone cannot be truncated in a way that would remove the overlap (in this case you need to delete the zone to remove the overlap).
◆ masterChannel
int juce::MPEZone::masterChannel |
|
private |
◆ masterPitchbendRange
int juce::MPEZone::masterPitchbendRange |
|
private |
◆ numNoteChannels
int juce::MPEZone::numNoteChannels |
|
private |
◆ perNotePitchbendRange
int juce::MPEZone::perNotePitchbendRange |
|
private |
The documentation for this struct was generated from the following file: