NiCMidi 1.1.0
A MIDI library derived from J.D.Koftinoff jdksmidi
|
A MIDIProcessor which shifts the pitch of MIDI note and polyphonic pressure messages by a given amount of semitones. More...
#include <processor.h>
Public Member Functions | |
MIDIProcessorTransposer () | |
The constructor. More... | |
virtual void | Reset () |
Resets to the default status (no transposing on all channels). More... | |
int | GetChannelTranspose (int chan) const |
Gets the transposing amount (in semitones) for the given channel. More... | |
void | SetChannelTranspose (int chan, int trans) |
Sets the transposing amount. More... | |
void | SetAllTranspose (int trans) |
Sets the same transposing amount (in semitones) for all the channels. More... | |
virtual bool | Process (MIDITimedMessage *msg) |
The process() method. More... | |
![]() | |
MIDIProcessor () | |
The constructor. More... | |
virtual | ~MIDIProcessor () |
The destructor. More... | |
A MIDIProcessor which shifts the pitch of MIDI note and polyphonic pressure messages by a given amount of semitones.
You can set a different amount for each channel, or the same amount for all the channels.
MIDIProcessorTransposer::MIDIProcessorTransposer | ( | ) |
The constructor.
|
virtual |
Resets to the default status (no transposing on all channels).
Implements MIDIProcessor.
|
inline |
Gets the transposing amount (in semitones) for the given channel.
|
inline |
Sets the transposing amount.
chan | the channel to be transposed. See Numbering conventions |
trans | The amount of transposing in semitones |
void MIDIProcessorTransposer::SetAllTranspose | ( | int | trans | ) |
Sets the same transposing amount (in semitones) for all the channels.
|
virtual |
The process() method.
It affects only Note on, Note off and Poly pressure messages, changing their note number according to the transposing amount. If the resulting note number is not in the MIDI range (0 ... 127) the message is left unchanged and the method returns false, otherwise it returns true.
Implements MIDIProcessor.