#include <midimapper.h>
Public Member Functions | |
MidiMapper (const char *name) | |
~MidiMapper () | |
void | loadFile (const char *name) |
int | ok (void) |
uchar | channel (uchar chn) |
uchar | patch (uchar chn, uchar pgm) |
uchar | key (uchar chn, uchar pgm, uchar note) |
void | pitchBender (uchar chn, uchar &lsb, uchar &msb) |
void | controller (uchar chn, uchar &ctl, uchar &v) |
const char * | filename (void) |
Detailed Description
A Midi Mapper class which defines the way MIDI events are translated (or "mapped") to different ones.
This way, when two MIDI devices "talk" in a somehow different way, they can still communicate.
When the user has an external keyboard that is not compatible with the General Midi standard, he can use a MIDI mapper file to play files as if the synthesizer was GM compatible.
Please see the KMid documentation ( http://www.arrakis.es/~rlarrosa/tdemid.html ) for information on the format of a MIDI mapper definition file, and how they work.
I created this class because I had one of those non-GM keyboards, so it can do everything I needed it to do for my keyboard to work exactly as a GM synth, and a few more things. Currently, it's the most featured MIDI mapper available.
The usage of this class is quite simple, just create an object with a correct filename in the constructor and then use this object as parameter for DeviceManager::setMidiMap().
Midi Mapper
- Version
- 0.9.5 17/01/2000
Definition at line 59 of file midimapper.h.
Constructor & Destructor Documentation
◆ MidiMapper()
MidiMapper::MidiMapper | ( | const char * | name | ) |
Constructor.
Loads a MIDI Mapper definition from a file.
- See also
- filename()
Definition at line 34 of file midimapper.cpp.
◆ ~MidiMapper()
MidiMapper::~MidiMapper | ( | ) |
Destructor.
Definition at line 56 of file midimapper.cpp.
Member Function Documentation
◆ channel()
|
inline |
Returns the channel which chn should be mapped to.
Definition at line 177 of file midimapper.h.
◆ controller()
void MidiMapper::controller | ( | uchar | chn, |
uchar & | ctl, | ||
uchar & | v | ||
) |
Returns the value which a given controller and its value should be mapped to when played on channel chn.
Definition at line 453 of file midimapper.cpp.
◆ filename()
const char * MidiMapper::filename | ( | void | ) |
Returns the path and name of the file which the object loaded the mapper from.
Definition at line 418 of file midimapper.cpp.
◆ key()
uchar MidiMapper::key | ( | uchar | chn, |
uchar | pgm, | ||
uchar | note | ||
) |
Returns the key that key note playing a pgm patch on channel chn should be mapped to.
Definition at line 423 of file midimapper.cpp.
◆ loadFile()
void MidiMapper::loadFile | ( | const char * | name | ) |
Loads a MIDI Mapper definition file (you don't need to use this if you used a correct filename in constructor).
Definition at line 143 of file midimapper.cpp.
◆ ok()
|
inline |
Returns the status of the object.
Definition at line 172 of file midimapper.h.
◆ patch()
uchar MidiMapper::patch | ( | uchar | chn, |
uchar | pgm | ||
) |
Returns the patch which pgm used on channel chn should be mapped to.
Definition at line 431 of file midimapper.cpp.
◆ pitchBender()
void MidiMapper::pitchBender | ( | uchar | chn, |
uchar & | lsb, | ||
uchar & | msb | ||
) |
Returns the value which the pitch bender on channel chn should be mapped to.
Definition at line 437 of file midimapper.cpp.
The documentation for this class was generated from the following files: