NiCMidi 1.1.0
A MIDI library derived from J.D.Koftinoff jdksmidi
MIDIProcessorRechannelizer Class Reference

A MIDIProcessor which changes the channel of all processed MIDI channel messages. More...

#include <processor.h>

Inheritance diagram for MIDIProcessorRechannelizer:
MIDIProcessor

Public Member Functions

 MIDIProcessorRechannelizer ()
 The constructor. More...
 
void Reset ()
 Resets the default status (no rechannelizing). More...
 
int GetRechanMap (int src_chan) const
 Gets the corresponding channel for the (source) src_chan. More...
 
void SetRechanMap (int src_chan, int dest_chan)
 Set the correspondence between two channels (will transform src_chan into dest_chan). More...
 
void SetAllRechan (int dest_chan)
 Sends all channel messages to channel dest_chan. More...
 
virtual bool Process (MIDITimedMessage *msg)
 The Process() method. More...
 
- Public Member Functions inherited from MIDIProcessor
 MIDIProcessor ()
 The constructor. More...
 
virtual ~MIDIProcessor ()
 The destructor. More...
 

Detailed Description

A MIDIProcessor which changes the channel of all processed MIDI channel messages.

You can set a one-to-one correspondence between channels, or send all channel messages to a single channel.

Constructor & Destructor Documentation

◆ MIDIProcessorRechannelizer()

MIDIProcessorRechannelizer::MIDIProcessorRechannelizer ( )

The constructor.

Member Function Documentation

◆ Reset()

void MIDIProcessorRechannelizer::Reset ( )
virtual

Resets the default status (no rechannelizing).

Implements MIDIProcessor.

◆ GetRechanMap()

int MIDIProcessorRechannelizer::GetRechanMap ( int  src_chan) const
inline

Gets the corresponding channel for the (source) src_chan.

See Numbering conventions

◆ SetRechanMap()

void MIDIProcessorRechannelizer::SetRechanMap ( int  src_chan,
int  dest_chan 
)
inline

Set the correspondence between two channels (will transform src_chan into dest_chan).

See Numbering conventions, however you can set dest_chan to -1 (see the Process() method).

◆ SetAllRechan()

void MIDIProcessorRechannelizer::SetAllRechan ( int  dest_chan)

Sends all channel messages to channel dest_chan.

◆ Process()

virtual bool MIDIProcessorRechannelizer::Process ( MIDITimedMessage msg)
virtual

The Process() method.

If msg is not a channel message it is left unchanged and the function returns true. Otherwise its channel is changed according to the rechannel map. If its destination channel is -1 the message remains unchanged but the method returns false (you can use this for filtering messages by channel) otherwise returns true.

Implements MIDIProcessor.


The documentation for this class was generated from the following file: