.TH "MidiMapper" 3 "28 Jan 2004" "libkmid Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
MidiMapper \- A Midi Mapper class which defines the way MIDI events are translated (or 'mapped') to different ones. Midi Mapper.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <midimapper.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBMidiMapper\fP (const  char *name)"
.br
.RI "\fIConstructor. \fP"
.ti -1c
.RI "\fB~MidiMapper\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "void \fBloadFile\fP (const  char *name)"
.br
.RI "\fILoads a MIDI Mapper definition file (you don't need to use this if you used a correct filename in constructor). \fP"
.ti -1c
.RI "int \fBok\fP (void)"
.br
.RI "\fIReturns the status of the object. \fP"
.ti -1c
.RI "\fBuchar\fP \fBchannel\fP (\fBuchar\fP chn)"
.br
.RI "\fIReturns the channel which chn should be mapped to. \fP"
.ti -1c
.RI "\fBuchar\fP \fBpatch\fP (\fBuchar\fP chn, \fBuchar\fP pgm)"
.br
.RI "\fIReturns the patch which pgm used on channel chn should be mapped to. \fP"
.ti -1c
.RI "\fBuchar\fP \fBkey\fP (\fBuchar\fP chn, \fBuchar\fP pgm, \fBuchar\fP note)"
.br
.RI "\fIReturns the key that key note playing a pgm patch on channel chn should be mapped to. \fP"
.ti -1c
.RI "void \fBpitchBender\fP (\fBuchar\fP chn, \fBuchar\fP &lsb, \fBuchar\fP &msb)"
.br
.RI "\fIReturns the value which the pitch bender on channel chn should be mapped to. \fP"
.ti -1c
.RI "void \fBcontroller\fP (\fBuchar\fP chn, \fBuchar\fP &ctl, \fBuchar\fP &v)"
.br
.RI "\fIReturns the value which a given controller and its value should be mapped to when played on channel chn. \fP"
.ti -1c
.RI "const  char * \fBfilename\fP (void)"
.br
.RI "\fIReturns the path and name of the file which the object loaded the mapper from. \fP"
.in -1c
.SH "Detailed Description"
.PP 
A Midi Mapper class which defines the way MIDI events are translated (or 'mapped') to different ones. Midi Mapper. 

This way, when two MIDI devices 'talk' in a somehow different way, they can still communicate.
.PP
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.
.PP
Please see the KMid documentation ( http://www.arrakis.es/~rlarrosa/kmid.html ) for information on the format of a MIDI mapper definition file, and how they work.
.PP
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.
.PP
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 \fBDeviceManager::setMidiMap\fP().
.PP
\fBVersion:\fP
.RS 4
0.9.5 17/01/2000 
.RE
.PP
\fBAuthor:\fP
.RS 4
Antonio Larrosa Jimenez <larrosa@kde.org> 
.RE
.PP

.PP
Definition at line 58 of file midimapper.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "MidiMapper::MidiMapper (const char * name)"
.PP
Constructor. Loads a MIDI Mapper definition from a file. 
.PP
\fBSee also:\fP
.RS 4
\fBfilename()\fP 
.RE
.PP
Definition at line 34 of file midimapper.cc.
.PP
References loadFile(), and KStdAccel::name().
.SS "MidiMapper::~\fBMidiMapper\fP ()"
.PP
Destructor. Definition at line 56 of file midimapper.cc.
.SH "Member Function Documentation"
.PP 
.SS "void MidiMapper::loadFile (const char * name)"
.PP
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.cc.
.PP
References KStdAccel::name().
.PP
Referenced by MidiMapper().
.SS "int MidiMapper::ok (void)\fC [inline]\fP"
.PP
Returns the status of the object. Definition at line 171 of file midimapper.h.
.SS "\fBuchar\fP MidiMapper::channel (\fBuchar\fP chn)\fC [inline]\fP"
.PP
Returns the channel which chn should be mapped to. Definition at line 176 of file midimapper.h.
.PP
Referenced by SynthOut::chnController(), MidiOut::chnController(), AlsaOut::chnController(), SynthOut::chnPatchChange(), MidiOut::chnPatchChange(), AlsaOut::chnPatchChange(), SynthOut::chnPitchBender(), MidiOut::chnPitchBender(), AlsaOut::chnPitchBender(), SynthOut::chnPressure(), MidiOut::chnPressure(), AlsaOut::chnPressure(), SynthOut::keyPressure(), MidiOut::keyPressure(), AlsaOut::keyPressure(), SynthOut::noteOff(), MidiOut::noteOff(), AlsaOut::noteOff(), SynthOut::noteOn(), MidiOut::noteOn(), and AlsaOut::noteOn().
.SS "\fBuchar\fP MidiMapper::patch (\fBuchar\fP chn, \fBuchar\fP pgm)"
.PP
Returns the patch which pgm used on channel chn should be mapped to. Definition at line 431 of file midimapper.cc.
.PP
Referenced by SynthOut::chnPatchChange(), MidiOut::chnPatchChange(), GUSOut::chnPatchChange(), FMOut::chnPatchChange(), AlsaOut::chnPatchChange(), GUSOut::noteOn(), and FMOut::noteOn().
.SS "\fBuchar\fP MidiMapper::key (\fBuchar\fP chn, \fBuchar\fP pgm, \fBuchar\fP note)"
.PP
Returns the key that key note playing a pgm patch on channel chn should be mapped to. Definition at line 423 of file midimapper.cc.
.PP
Referenced by SynthOut::keyPressure(), MidiOut::keyPressure(), AlsaOut::keyPressure(), SynthOut::noteOff(), MidiOut::noteOff(), AlsaOut::noteOff(), SynthOut::noteOn(), MidiOut::noteOn(), and AlsaOut::noteOn().
.SS "void MidiMapper::pitchBender (\fBuchar\fP chn, \fBuchar\fP & lsb, \fBuchar\fP & msb)"
.PP
Returns the value which the pitch bender on channel chn should be mapped to. Definition at line 437 of file midimapper.cc.
.PP
Referenced by MidiOut::chnPitchBender(), and AlsaOut::chnPitchBender().
.SS "void MidiMapper::controller (\fBuchar\fP chn, \fBuchar\fP & ctl, \fBuchar\fP & v)"
.PP
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.cc.
.PP
Referenced by MidiOut::chnController(), and AlsaOut::chnController().
.SS "const  char * MidiMapper::filename (void)"
.PP
Returns the path and name of the file which the object loaded the mapper from. Definition at line 418 of file midimapper.cc.
.PP
Referenced by MidiOut::midiMapFilename().

.SH "Author"
.PP 
Generated automatically by Doxygen for libkmid Library from the source code.
