\section{GUSOut Class Reference}
\label{classGUSOut}\index{GUSOut@{GUSOut}}
Gravis Ultrasound synthesizer output class . Sends MIDI events to GUS synths.  


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

Inheritance diagram for GUSOut:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=44pt]{classGUSOut__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for GUSOut:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=54pt]{classGUSOut__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf GUSOut} (int d=0, int total=12)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
{\bf $\sim$GUSOut} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual void {\bf open\-Dev} (int sqfd)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::open\-Dev}{\rm (p.\,\pageref{classMidiOut_a2})}(). \item\end{CompactList}\item 
virtual void {\bf close\-Dev} (void)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::close\-Dev}{\rm (p.\,\pageref{classMidiOut_a3})}(). \item\end{CompactList}\item 
virtual void {\bf init\-Dev} (void)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::init\-Dev}{\rm (p.\,\pageref{classMidiOut_a4})}(). \item\end{CompactList}\item 
virtual void {\bf note\-On} ({\bf uchar} chn, {\bf uchar} note, {\bf uchar} vel)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::note\-On}{\rm (p.\,\pageref{classMidiOut_a8})}(). \item\end{CompactList}\item 
virtual void {\bf note\-Off} ({\bf uchar} chn, {\bf uchar} note, {\bf uchar} vel)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::note\-Off}{\rm (p.\,\pageref{classMidiOut_a9})}(). \item\end{CompactList}\item 
virtual void {\bf key\-Pressure} ({\bf uchar} chn, {\bf uchar} note, {\bf uchar} vel)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::key\-Pressure}{\rm (p.\,\pageref{classMidiOut_a10})}(). \item\end{CompactList}\item 
virtual void {\bf chn\-Patch\-Change} ({\bf uchar} chn, {\bf uchar} patch)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::chn\-Patch\-Change}{\rm (p.\,\pageref{classMidiOut_a11})}(). \item\end{CompactList}\item 
virtual void {\bf chn\-Pressure} ({\bf uchar} chn, {\bf uchar} vel)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::chn\-Pressure}{\rm (p.\,\pageref{classMidiOut_a12})}(). \item\end{CompactList}\item 
virtual void {\bf chn\-Pitch\-Bender} ({\bf uchar} chn, {\bf uchar} lsb, {\bf uchar} msb)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::chn\-Pitch\-Bender}{\rm (p.\,\pageref{classMidiOut_a13})}(). \item\end{CompactList}\item 
virtual void {\bf chn\-Controller} ({\bf uchar} chn, {\bf uchar} ctl, {\bf uchar} v)
\begin{CompactList}\small\item\em See {\bf Midi\-Out::chn\-Controller}{\rm (p.\,\pageref{classMidiOut_a14})}(). \item\end{CompactList}\item 
virtual void {\bf sysex} ({\bf uchar} $\ast$data, {\bf ulong} size)
\begin{CompactList}\small\item\em It's an empty function, as GUS synths don't support System Exclusive messages. \item\end{CompactList}\item 
void {\bf set\-Patches\-To\-Use} (int $\ast$patchesused)
\begin{CompactList}\small\item\em See {\bf Device\-Manager::set\-Patches\-To\-Use}{\rm (p.\,\pageref{classDeviceManager_a31})}() . \item\end{CompactList}\item 
int {\bf load\-Patch} (int pgm)
\begin{CompactList}\small\item\em Loads a single patch on the synthesizer memory. \item\end{CompactList}\item 
int {\bf patch} (int p)
\begin{CompactList}\small\item\em Returns p if the patch with number p has been correctly loaded. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf set\-GUSPatches\-Directory} (const  char $\ast$dir)
\begin{CompactList}\small\item\em Sets the directory where the GUS patches are stored, that is, where the acpiano.pat, ... \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Gravis Ultrasound synthesizer output class . Sends MIDI events to GUS synths. 

This class is used to send midi events to synthesizers on GUS cards.

GUSOut inherits {\bf Midi\-Out}{\rm (p.\,\pageref{classMidiOut})} and supports the same simple API.

The recommended way to use this class is by using a {\bf Device\-Manager}{\rm (p.\,\pageref{classDeviceManager})} object, and use the {\bf Device\-Manager::set\-Patches\-To\-Use}{\rm (p.\,\pageref{classDeviceManager_a31})}() member which will call the {\bf set\-Patches\-To\-Use}{\rm (p.\,\pageref{classGUSOut_a13})}() member in this class.

\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 45 of file gusout.h.

\subsection{Constructor \& Destructor Documentation}
\index{GUSOut@{GUSOut}!GUSOut@{GUSOut}}
\index{GUSOut@{GUSOut}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GUSOut::GUSOut (int {\em d} = 0, int {\em total} = 12)}\label{classGUSOut_a0}


Constructor. 

See {\bf Midi\-Out::Midi\-Out}{\rm (p.\,\pageref{classMidiOut_a0})}() for more information. 

Definition at line 112 of file gusout.cc.\index{GUSOut@{GUSOut}!~GUSOut@{$\sim$GUSOut}}
\index{~GUSOut@{$\sim$GUSOut}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GUSOut::$\sim${\bf GUSOut} ()}\label{classGUSOut_a1}


Destructor. 



Definition at line 124 of file gusout.cc.

References close\-Dev().

\subsection{Member Function Documentation}
\index{GUSOut@{GUSOut}!openDev@{openDev}}
\index{openDev@{openDev}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::open\-Dev (int {\em sqfd})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a2}


See {\bf Midi\-Out::open\-Dev}{\rm (p.\,\pageref{classMidiOut_a2})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a2})}.

Definition at line 137 of file gusout.cc.\index{GUSOut@{GUSOut}!closeDev@{closeDev}}
\index{closeDev@{closeDev}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::close\-Dev (void)\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a3}


See {\bf Midi\-Out::close\-Dev}{\rm (p.\,\pageref{classMidiOut_a3})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a3})}.

Definition at line 169 of file gusout.cc.

References Midi\-Out::ok().

Referenced by $\sim$GUSOut().\index{GUSOut@{GUSOut}!initDev@{initDev}}
\index{initDev@{initDev}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::init\-Dev (void)\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a4}


See {\bf Midi\-Out::init\-Dev}{\rm (p.\,\pageref{classMidiOut_a4})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a4})}.

Definition at line 178 of file gusout.cc.

References chn\-Controller(), chn\-Patch\-Change(), chn\-Pitch\-Bender(), Midi\-Out::ok(), and sysex().\index{GUSOut@{GUSOut}!noteOn@{noteOn}}
\index{noteOn@{noteOn}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::note\-On ({\bf uchar} {\em chn}, {\bf uchar} {\em note}, {\bf uchar} {\em vel})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a5}


See {\bf Midi\-Out::note\-On}{\rm (p.\,\pageref{classMidiOut_a8})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a8})}.

Definition at line 217 of file gusout.cc.

References note\-Off(), Midi\-Mapper::patch(), and patch().\index{GUSOut@{GUSOut}!noteOff@{noteOff}}
\index{noteOff@{noteOff}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::note\-Off ({\bf uchar} {\em chn}, {\bf uchar} {\em note}, {\bf uchar} {\em vel})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a6}


See {\bf Midi\-Out::note\-Off}{\rm (p.\,\pageref{classMidiOut_a9})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a9})}.

Definition at line 247 of file gusout.cc.

Referenced by note\-On().\index{GUSOut@{GUSOut}!keyPressure@{keyPressure}}
\index{keyPressure@{keyPressure}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::key\-Pressure ({\bf uchar} {\em chn}, {\bf uchar} {\em note}, {\bf uchar} {\em vel})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a7}


See {\bf Midi\-Out::key\-Pressure}{\rm (p.\,\pageref{classMidiOut_a10})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a10})}.

Definition at line 262 of file gusout.cc.\index{GUSOut@{GUSOut}!chnPatchChange@{chnPatchChange}}
\index{chnPatchChange@{chnPatchChange}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::chn\-Patch\-Change ({\bf uchar} {\em chn}, {\bf uchar} {\em patch})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a8}


See {\bf Midi\-Out::chn\-Patch\-Change}{\rm (p.\,\pageref{classMidiOut_a11})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a11})}.

Definition at line 270 of file gusout.cc.

References Midi\-Mapper::patch().

Referenced by init\-Dev().\index{GUSOut@{GUSOut}!chnPressure@{chnPressure}}
\index{chnPressure@{chnPressure}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::chn\-Pressure ({\bf uchar} {\em chn}, {\bf uchar} {\em vel})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a9}


See {\bf Midi\-Out::chn\-Pressure}{\rm (p.\,\pageref{classMidiOut_a12})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a12})}.

Definition at line 281 of file gusout.cc.\index{GUSOut@{GUSOut}!chnPitchBender@{chnPitchBender}}
\index{chnPitchBender@{chnPitchBender}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::chn\-Pitch\-Bender ({\bf uchar} {\em chn}, {\bf uchar} {\em lsb}, {\bf uchar} {\em msb})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a10}


See {\bf Midi\-Out::chn\-Pitch\-Bender}{\rm (p.\,\pageref{classMidiOut_a13})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a13})}.

Definition at line 291 of file gusout.cc.

Referenced by init\-Dev().\index{GUSOut@{GUSOut}!chnController@{chnController}}
\index{chnController@{chnController}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::chn\-Controller ({\bf uchar} {\em chn}, {\bf uchar} {\em ctl}, {\bf uchar} {\em v})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a11}


See {\bf Midi\-Out::chn\-Controller}{\rm (p.\,\pageref{classMidiOut_a14})}(). 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a14})}.

Definition at line 301 of file gusout.cc.

Referenced by init\-Dev().\index{GUSOut@{GUSOut}!sysex@{sysex}}
\index{sysex@{sysex}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::sysex ({\bf uchar} $\ast$ {\em data}, {\bf ulong} {\em size})\hspace{0.3cm}{\tt  [virtual]}}\label{classGUSOut_a12}


It's an empty function, as GUS synths don't support System Exclusive messages. 



Reimplemented from {\bf Midi\-Out} {\rm (p.\,\pageref{classMidiOut_a15})}.

Definition at line 317 of file gusout.cc.

Referenced by init\-Dev().\index{GUSOut@{GUSOut}!setPatchesToUse@{setPatchesToUse}}
\index{setPatchesToUse@{setPatchesToUse}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::set\-Patches\-To\-Use (int $\ast$ {\em patchesused})}\label{classGUSOut_a13}


See {\bf Device\-Manager::set\-Patches\-To\-Use}{\rm (p.\,\pageref{classDeviceManager_a31})}() . 

All the information about this member is explained there because it's (for now) just a simple call to this function when the device used is a GUS device, and you're supposed to use a {\bf Device\-Manager}{\rm (p.\,\pageref{classDeviceManager})} object instead of a GUSOut object except in rare ocassions.

\begin{Desc}
\item[See also:]{\bf patch()}{\rm (p.\,\pageref{classGUSOut_a15})} 

{\bf load\-Patch()}{\rm (p.\,\pageref{classGUSOut_a14})} \end{Desc}


Definition at line 525 of file gusout.cc.

References load\-Patch().

Referenced by Device\-Manager::set\-Patches\-To\-Use().\index{GUSOut@{GUSOut}!loadPatch@{loadPatch}}
\index{loadPatch@{loadPatch}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int GUSOut::load\-Patch (int {\em pgm})}\label{classGUSOut_a14}


Loads a single patch on the synthesizer memory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pgm}]is the number of the GM patch when pgm is between 0 and 127. Values from 128 to 255 are used to represent the percussion instruments. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if OK and -1 if there was an error (patch not found, not enough memory, etc.)\end{Desc}
\begin{Desc}
\item[See also:]{\bf patch()}{\rm (p.\,\pageref{classGUSOut_a15})} 

{\bf set\-Patches\-To\-Use()}{\rm (p.\,\pageref{classGUSOut_a13})} \end{Desc}


Definition at line 338 of file gusout.cc.

References patch().

Referenced by set\-Patches\-To\-Use().\index{GUSOut@{GUSOut}!patch@{patch}}
\index{patch@{patch}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int GUSOut::patch (int {\em p})}\label{classGUSOut_a15}


Returns p if the patch with number p has been correctly loaded. 

In the case it hasn't been loaded, it returns the number of another patch that is loaded and that should be used instead.

\begin{Desc}
\item[See also:]{\bf load\-Patch()}{\rm (p.\,\pageref{classGUSOut_a14})} 

{\bf set\-Patches\-To\-Use()}{\rm (p.\,\pageref{classGUSOut_a13})} \end{Desc}


Definition at line 208 of file gusout.cc.

Referenced by load\-Patch(), and note\-On().\index{GUSOut@{GUSOut}!setGUSPatchesDirectory@{setGUSPatchesDirectory}}
\index{setGUSPatchesDirectory@{setGUSPatchesDirectory}!GUSOut@{GUSOut}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void GUSOut::set\-GUSPatches\-Directory (const char $\ast$ {\em dir})\hspace{0.3cm}{\tt  [static]}}\label{classGUSOut_e0}


Sets the directory where the GUS patches are stored, that is, where the acpiano.pat, ... 

files can be found.

It will store a copy of the parameter, so you should delete the memory used by the parameter you passed. 

Definition at line 322 of file gusout.cc.

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