This MIDIProcessor subclass implements a matrix which keeps track of notes on and hold pedal for every channel.
More...
#include <matrix.h>
|
virtual void | DecNoteCount (unsigned char chan, unsigned char note) |
| Decrements the note count for the given channel and note. More...
|
|
virtual void | IncNoteCount (unsigned char chan, unsigned char note) |
| Increments the note count for the given channel and note. More...
|
|
virtual void | ClearChannel (unsigned char chan) |
| Clear the note count and the pedal on the given channel. More...
|
|
virtual void | OtherMessage (const MIDIMessage *msg) |
| Called by Process() for non note and non pedal messages. More...
|
|
void | SetNoteCount (unsigned char chan, unsigned char note, unsigned char val) |
| Sets the note count. More...
|
|
void | SetChannelCount (unsigned char chan, int val) |
| Sets the channel note count. More...
|
|
This MIDIProcessor subclass implements a matrix which keeps track of notes on and hold pedal for every channel.
Every time you call Process() giving it a MIDITimedMessage it updates the count of notes on and pedal (it does nothing if the message is not a note or pedal message). It is used by MIDIDriver and MIDISequencerTrackState.
◆ MIDIMatrix()
MIDIMatrix::MIDIMatrix |
( |
| ) |
|
The constructor creates an empty matrix.
◆ ~MIDIMatrix()
virtual MIDIMatrix::~MIDIMatrix |
( |
| ) |
|
|
inlinevirtual |
◆ Reset()
virtual void MIDIMatrix::Reset |
( |
| ) |
|
|
virtual |
Resets the matrix (no notes on, no pedal hold)
Implements MIDIProcessor.
◆ Process()
Processes the given MIDI message updating the matrix.
Returns true if the message has changed some matrix parameter, false otherwise
Implements MIDIProcessor.
◆ GetTotalCount()
int MIDIMatrix::GetTotalCount |
( |
| ) |
const |
|
inline |
Returns the total number of notes on.
◆ GetChannelCount()
int MIDIMatrix::GetChannelCount |
( |
int |
chan | ) |
const |
|
inline |
◆ GetNoteCount()
int MIDIMatrix::GetNoteCount |
( |
int |
chan, |
|
|
int |
note |
|
) |
| const |
|
inline |
Returns the number of sounding notes given the channel and the note MIDI value.
See Numbering conventions.
◆ GetHoldPedal()
bool MIDIMatrix::GetHoldPedal |
( |
int |
chan | ) |
const |
|
inline |
◆ GetMinNoteOn()
int MIDIMatrix::GetMinNoteOn |
( |
int |
chan | ) |
const |
|
inline |
Returns the minimum note on MIDI value sounding for the given channel (-1 if no note on).
See Numbering conventions.
◆ GetMaxNoteOn()
int MIDIMatrix::GetMaxNoteOn |
( |
int |
chan | ) |
const |
|
inline |
Returns the maximum note on MIDI value sounding for the given channel (-1 if no note on).
See Numbering conventions.
◆ DecNoteCount()
virtual void MIDIMatrix::DecNoteCount |
( |
unsigned char |
chan, |
|
|
unsigned char |
note |
|
) |
| |
|
protectedvirtual |
◆ IncNoteCount()
virtual void MIDIMatrix::IncNoteCount |
( |
unsigned char |
chan, |
|
|
unsigned char |
note |
|
) |
| |
|
protectedvirtual |
◆ ClearChannel()
virtual void MIDIMatrix::ClearChannel |
( |
unsigned char |
chan | ) |
|
|
protectedvirtual |
◆ OtherMessage()
virtual void MIDIMatrix::OtherMessage |
( |
const MIDIMessage * |
msg | ) |
|
|
inlineprotectedvirtual |
Called by Process() for non note and non pedal messages.
You can redefine it if you want your own processing (currently does nothing)
◆ SetNoteCount()
void MIDIMatrix::SetNoteCount |
( |
unsigned char |
chan, |
|
|
unsigned char |
note, |
|
|
unsigned char |
val |
|
) |
| |
|
inlineprotected |
◆ SetChannelCount()
void MIDIMatrix::SetChannelCount |
( |
unsigned char |
chan, |
|
|
int |
val |
|
) |
| |
|
inlineprotected |
The documentation for this class was generated from the following file: