\section{Midi\-Mapper Class Reference}
\label{classMidiMapper}\index{MidiMapper@{MidiMapper}}
A Midi Mapper class which defines the way MIDI events are translated (or \char`\"{}mapped\char`\"{}) to different ones. Midi Mapper.  


{\tt \#include $<$midimapper.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Midi\-Mapper} (const  char $\ast$name)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
{\bf $\sim$Midi\-Mapper} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void {\bf load\-File} (const  char $\ast$name)
\begin{CompactList}\small\item\em Loads a MIDI Mapper definition file (you don't need to use this if you used a correct filename in constructor). \item\end{CompactList}\item 
int {\bf ok} (void)
\begin{CompactList}\small\item\em Returns the status of the object. \item\end{CompactList}\item 
{\bf uchar} {\bf channel} ({\bf uchar} chn)
\begin{CompactList}\small\item\em Returns the channel which chn should be mapped to. \item\end{CompactList}\item 
{\bf uchar} {\bf patch} ({\bf uchar} chn, {\bf uchar} pgm)
\begin{CompactList}\small\item\em Returns the patch which pgm used on channel chn should be mapped to. \item\end{CompactList}\item 
{\bf uchar} {\bf key} ({\bf uchar} chn, {\bf uchar} pgm, {\bf uchar} note)
\begin{CompactList}\small\item\em Returns the key that key note playing a pgm patch on channel chn should be mapped to. \item\end{CompactList}\item 
void {\bf pitch\-Bender} ({\bf uchar} chn, {\bf uchar} \&lsb, {\bf uchar} \&msb)
\begin{CompactList}\small\item\em Returns the value which the pitch bender on channel chn should be mapped to. \item\end{CompactList}\item 
void {\bf controller} ({\bf uchar} chn, {\bf uchar} \&ctl, {\bf uchar} \&v)
\begin{CompactList}\small\item\em Returns the value which a given controller and its value should be mapped to when played on channel chn. \item\end{CompactList}\item 
const  char $\ast$ {\bf filename} (void)
\begin{CompactList}\small\item\em Returns the path and name of the file which the object loaded the mapper from. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A Midi Mapper class which defines the way MIDI events are translated (or \char`\"{}mapped\char`\"{}) to different ones. Midi Mapper. 

This way, when two MIDI devices \char`\"{}talk\char`\"{} 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 ( {\tt http://www.arrakis.es/$\sim$rlarrosa/kmid.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 {\bf Device\-Manager::set\-Midi\-Map}{\rm (p.\,\pageref{classDeviceManager_a33})}().

\begin{Desc}
\item[Version:]0.9.5 17/01/2000 \end{Desc}
\begin{Desc}
\item[Author:]Antonio Larrosa Jimenez $<${\tt larrosa@kde.org}$>$ \end{Desc}




Definition at line 58 of file midimapper.h.

\subsection{Constructor \& Destructor Documentation}
\index{MidiMapper@{Midi\-Mapper}!MidiMapper@{MidiMapper}}
\index{MidiMapper@{MidiMapper}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Midi\-Mapper::Midi\-Mapper (const char $\ast$ {\em name})}\label{classMidiMapper_a0}


Constructor. 

Loads a MIDI Mapper definition from a file. \begin{Desc}
\item[See also:]{\bf filename()}{\rm (p.\,\pageref{classMidiMapper_a9})} \end{Desc}


Definition at line 34 of file midimapper.cc.

References load\-File(), and KStd\-Accel::name().\index{MidiMapper@{Midi\-Mapper}!~MidiMapper@{$\sim$MidiMapper}}
\index{~MidiMapper@{$\sim$MidiMapper}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Midi\-Mapper::$\sim${\bf Midi\-Mapper} ()}\label{classMidiMapper_a1}


Destructor. 



Definition at line 56 of file midimapper.cc.

\subsection{Member Function Documentation}
\index{MidiMapper@{Midi\-Mapper}!loadFile@{loadFile}}
\index{loadFile@{loadFile}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Midi\-Mapper::load\-File (const char $\ast$ {\em name})}\label{classMidiMapper_a2}


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.

References KStd\-Accel::name().

Referenced by Midi\-Mapper().\index{MidiMapper@{Midi\-Mapper}!ok@{ok}}
\index{ok@{ok}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Midi\-Mapper::ok (void)\hspace{0.3cm}{\tt  [inline]}}\label{classMidiMapper_a3}


Returns the status of the object. 



Definition at line 171 of file midimapper.h.\index{MidiMapper@{Midi\-Mapper}!channel@{channel}}
\index{channel@{channel}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf uchar} Midi\-Mapper::channel ({\bf uchar} {\em chn})\hspace{0.3cm}{\tt  [inline]}}\label{classMidiMapper_a4}


Returns the channel which chn should be mapped to. 



Definition at line 176 of file midimapper.h.

Referenced by Synth\-Out::chn\-Controller(), Midi\-Out::chn\-Controller(), Alsa\-Out::chn\-Controller(), Synth\-Out::chn\-Patch\-Change(), Midi\-Out::chn\-Patch\-Change(), Alsa\-Out::chn\-Patch\-Change(), Synth\-Out::chn\-Pitch\-Bender(), Midi\-Out::chn\-Pitch\-Bender(), Alsa\-Out::chn\-Pitch\-Bender(), Synth\-Out::chn\-Pressure(), Midi\-Out::chn\-Pressure(), Alsa\-Out::chn\-Pressure(), Synth\-Out::key\-Pressure(), Midi\-Out::key\-Pressure(), Alsa\-Out::key\-Pressure(), Synth\-Out::note\-Off(), Midi\-Out::note\-Off(), Alsa\-Out::note\-Off(), Synth\-Out::note\-On(), Midi\-Out::note\-On(), and Alsa\-Out::note\-On().\index{MidiMapper@{Midi\-Mapper}!patch@{patch}}
\index{patch@{patch}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf uchar} Midi\-Mapper::patch ({\bf uchar} {\em chn}, {\bf uchar} {\em pgm})}\label{classMidiMapper_a5}


Returns the patch which pgm used on channel chn should be mapped to. 



Definition at line 431 of file midimapper.cc.

Referenced by Synth\-Out::chn\-Patch\-Change(), Midi\-Out::chn\-Patch\-Change(), GUSOut::chn\-Patch\-Change(), FMOut::chn\-Patch\-Change(), Alsa\-Out::chn\-Patch\-Change(), GUSOut::note\-On(), and FMOut::note\-On().\index{MidiMapper@{Midi\-Mapper}!key@{key}}
\index{key@{key}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf uchar} Midi\-Mapper::key ({\bf uchar} {\em chn}, {\bf uchar} {\em pgm}, {\bf uchar} {\em note})}\label{classMidiMapper_a6}


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.

Referenced by Synth\-Out::key\-Pressure(), Midi\-Out::key\-Pressure(), Alsa\-Out::key\-Pressure(), Synth\-Out::note\-Off(), Midi\-Out::note\-Off(), Alsa\-Out::note\-Off(), Synth\-Out::note\-On(), Midi\-Out::note\-On(), and Alsa\-Out::note\-On().\index{MidiMapper@{Midi\-Mapper}!pitchBender@{pitchBender}}
\index{pitchBender@{pitchBender}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Midi\-Mapper::pitch\-Bender ({\bf uchar} {\em chn}, {\bf uchar} \& {\em lsb}, {\bf uchar} \& {\em msb})}\label{classMidiMapper_a7}


Returns the value which the pitch bender on channel chn should be mapped to. 



Definition at line 437 of file midimapper.cc.

Referenced by Midi\-Out::chn\-Pitch\-Bender(), and Alsa\-Out::chn\-Pitch\-Bender().\index{MidiMapper@{Midi\-Mapper}!controller@{controller}}
\index{controller@{controller}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Midi\-Mapper::controller ({\bf uchar} {\em chn}, {\bf uchar} \& {\em ctl}, {\bf uchar} \& {\em v})}\label{classMidiMapper_a8}


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.

Referenced by Midi\-Out::chn\-Controller(), and Alsa\-Out::chn\-Controller().\index{MidiMapper@{Midi\-Mapper}!filename@{filename}}
\index{filename@{filename}!MidiMapper@{Midi\-Mapper}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const  char $\ast$ Midi\-Mapper::filename (void)}\label{classMidiMapper_a9}


Returns the path and name of the file which the object loaded the mapper from. 



Definition at line 418 of file midimapper.cc.

Referenced by Midi\-Out::midi\-Map\-Filename().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
midimapper.h\item 
midimapper.cc\end{CompactItemize}
