1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added MidiMessage::isResetAllControllers() method

This commit is contained in:
ed 2018-02-08 15:35:27 +00:00
parent d5d0de7978
commit aa01a84ed5
2 changed files with 11 additions and 0 deletions

View file

@ -623,6 +623,12 @@ bool MidiMessage::isAllSoundOff() const noexcept
return data[1] == 120 && (data[0] & 0xf0) == 0xb0;
}
bool MidiMessage::isResetAllControllers() const noexcept
{
auto data = getRawData();
return (data[0] & 0xf0) == 0xb0 && data[1] == 121;
}
MidiMessage MidiMessage::allControllersOff (const int channel) noexcept
{
return controllerEvent (channel, 121, 0);

View file

@ -501,6 +501,11 @@ public:
*/
bool isAllSoundOff() const noexcept;
/** Checks whether this message is a reset all controllers message.
@see allControllerOff
*/
bool isResetAllControllers() const noexcept;
/** Creates an all-notes-off message.
@param channel the midi channel, in the range 1 to 16
@see isAllNotesOff