.PP
.TH "AlsaOut" 3 "28 Jan 2004" "libkmid Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
AlsaOut \- Sends MIDI events to a MIDI devices using ALSA.  

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

.in +1c
.ti -1c
.RI "\fBAlsaOut\fP (int d, int client=64, int port=0, const  char *cname='', const  char *pname='')"
.br
.RI "\fIConstructor. \fP"
.ti -1c
.RI "virtual \fB~AlsaOut\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "virtual void \fBopenDev\fP (int sqfd)"
.br
.RI "\fIOpens the device. \fP"
.ti -1c
.RI "virtual void \fBcloseDev\fP ()"
.br
.RI "\fICloses the device. \fP"
.ti -1c
.RI "virtual void \fBinitDev\fP ()"
.br
.RI "\fIInitializes the device sending generic standard midi events and controllers, such as changing the patches of each channel to an Acoustic Piano (000), setting the volume to a normal value, etc. \fP"
.ti -1c
.RI "int \fBdeviceType\fP () const "
.br
.ti -1c
.RI "virtual const  char * \fBdeviceName\fP (void) const "
.br
.RI "\fIReturns the name and type of this MIDI device. \fP"
.ti -1c
.RI "int \fBrate\fP (void)"
.br
.ti -1c
.RI "virtual void \fBnoteOn\fP (\fBuchar\fP chn, \fBuchar\fP note, \fBuchar\fP vel)"
.br
.RI "\fISee \fBDeviceManager::noteOn\fP(). \fP"
.ti -1c
.RI "virtual void \fBnoteOff\fP (\fBuchar\fP chn, \fBuchar\fP note, \fBuchar\fP vel)"
.br
.RI "\fISee \fBDeviceManager::noteOff\fP(). \fP"
.ti -1c
.RI "virtual void \fBkeyPressure\fP (\fBuchar\fP chn, \fBuchar\fP note, \fBuchar\fP vel)"
.br
.RI "\fISee \fBDeviceManager::keyPressure\fP(). \fP"
.ti -1c
.RI "virtual void \fBchnPatchChange\fP (\fBuchar\fP chn, \fBuchar\fP patch)"
.br
.RI "\fISee \fBDeviceManager::chnPatchChange\fP(). \fP"
.ti -1c
.RI "virtual void \fBchnPressure\fP (\fBuchar\fP chn, \fBuchar\fP vel)"
.br
.RI "\fISee \fBDeviceManager::chnPressure\fP(). \fP"
.ti -1c
.RI "virtual void \fBchnPitchBender\fP (\fBuchar\fP chn, \fBuchar\fP lsb, \fBuchar\fP msb)"
.br
.RI "\fISee \fBDeviceManager::chnPitchBender\fP(). \fP"
.ti -1c
.RI "virtual void \fBchnController\fP (\fBuchar\fP chn, \fBuchar\fP ctl, \fBuchar\fP v)"
.br
.RI "\fISee \fBDeviceManager::chnController\fP(). \fP"
.ti -1c
.RI "virtual void \fBsysex\fP (\fBuchar\fP *data, \fBulong\fP size)"
.br
.RI "\fISee \fBDeviceManager::sysex\fP(). \fP"
.ti -1c
.RI "virtual void \fBchannelSilence\fP (\fBuchar\fP chn)"
.br
.RI "\fIMutes all notes being played on a given channel. \fP"
.ti -1c
.RI "virtual void \fBchannelMute\fP (\fBuchar\fP chn, int a)"
.br
.RI "\fIMute or 'unmute' a given channel . \fP"
.ti -1c
.RI "virtual void \fBsetVolumePercentage\fP (int volper)"
.br
.RI "\fIChange all channel volume events multiplying it by this percentage correction Instead of forcing a channel to a fixed volume, this method allows to music to fade out even when it was being played softly. \fP"
.ti -1c
.RI "int \fBok\fP (void)"
.br
.RI "\fIReturns true if everything's ok and false if there has been any problem. \fP"
.ti -1c
.RI "virtual void \fBwait\fP (double ticks)"
.br
.ti -1c
.RI "virtual void \fBtmrSetTempo\fP (int v)"
.br
.ti -1c
.RI "virtual void \fBtmrStart\fP (int tpcn)"
.br
.ti -1c
.RI "virtual void \fBtmrStart\fP ()"
.br
.ti -1c
.RI "virtual void \fBtmrStop\fP ()"
.br
.ti -1c
.RI "virtual void \fBtmrContinue\fP ()"
.br
.ti -1c
.RI "void \fBsync\fP (int i=0)"
.br
.RI "\fISends the buffer to the device and returns when it's played, so you can synchronize XXX: sync should be virtual after next bic release. \fP"
.in -1c
.SS "Public Attributes"

.in +1c
.ti -1c
.RI "AlsaOutPrivate * \fBdi\fP"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBseqbuf_dump\fP (void)"
.br
.ti -1c
.RI "virtual void \fBseqbuf_clean\fP (void)"
.br
.ti -1c
.RI "void \fBeventInit\fP (snd_seq_event_t *ev)"
.br
.ti -1c
.RI "void \fBeventSend\fP (snd_seq_event_t *ep)"
.br
.ti -1c
.RI "void \fBtimerEventSend\fP (int type)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "int \fBndevs\fP"
.br
.ti -1c
.RI "int \fBnmidiports\fP"
.br
.ti -1c
.RI "double \fBcount\fP"
.br
.ti -1c
.RI "double \fBlastcount\fP"
.br
.ti -1c
.RI "double \fBlasttime\fP"
.br
.ti -1c
.RI "double \fBbegintime\fP"
.br
.ti -1c
.RI "int \fBm_rate\fP"
.br
.ti -1c
.RI "double \fBconvertrate\fP"
.br
.ti -1c
.RI "long int \fBtime\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBDeviceManager\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Sends MIDI events to a MIDI devices using ALSA. 

\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 37 of file alsaout.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "AlsaOut::AlsaOut (int d, int client = 64, int port = 0, const char * cname = '', const char * pname = '')"
.PP
Constructor. After constructing a \fBMidiOut\fP device, you must open it (using \fBopenDev\fP() ). Additionally you may want to initialize it (with \fBinitDev\fP() ), Definition at line 111 of file alsaout.cc.
.SS "AlsaOut::~\fBAlsaOut\fP ()\fC [virtual]\fP"
.PP
Destructor. It doesn't matter if you close the device (\fBcloseDev\fP() ) before you destruct the object because in other case, it will be closed here. Definition at line 126 of file alsaout.cc.
.PP
References closeDev().
.SH "Member Function Documentation"
.PP 
.SS "void AlsaOut::openDev (int sqfd)\fC [virtual]\fP"
.PP
Opens the device. This is generally called from \fBDeviceManager\fP , so you shouldn't call this yourself (except if you created the \fBMidiOut\fP object yourself. 
.PP
\fBParameters:\fP
.RS 4
\fIsqfd\fP a file descriptor of /dev/sequencer 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcloseDev\fP 
.PP
\fBinitDev\fP 
.RE
.PP
Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 132 of file alsaout.cc.
.SS "void AlsaOut::closeDev ()\fC [virtual]\fP"
.PP
Closes the device. It basically tells the device (the file descriptor) is going to be closed. 
.PP
\fBSee also:\fP
.RS 4
\fBopenDev\fP 
.RE
.PP
Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 181 of file alsaout.cc.
.PP
References ok().
.PP
Referenced by ~AlsaOut().
.SS "void AlsaOut::initDev ()\fC [virtual]\fP"
.PP
Initializes the device sending generic standard midi events and controllers, such as changing the patches of each channel to an Acoustic Piano (000), setting the volume to a normal value, etc. Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 204 of file alsaout.cc.
.PP
References chnController(), chnPatchChange(), chnPitchBender(), chnPressure(), ok(), and sysex().
.SS "int AlsaOut::deviceType () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the device type of the object. This is to identify the inherited class that a given object is polymorphed to. The returned value is one of these :
.RE
.PP
.IP "\(bu" 2
KMID_EXTERNAL_MIDI if it's a \fBMidiOut\fP object 
.IP "\(bu" 2
KMID_SYNTH if it's a \fBSynthOut\fP object (as an AWE device) 
.IP "\(bu" 2
KMID_FM if it's a \fBFMOut\fP object 
.IP "\(bu" 2
KMID_GUS if it's a \fBGUSOut\fP object
.PP
which are defined in \fBmidispec.h\fP
.PP
\fBSee also:\fP
.RS 4
\fBdeviceName\fP 
.RE
.PP
Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 129 of file alsaout.h.
.SS "const  char * AlsaOut::deviceName (void) const\fC [virtual]\fP"
.PP
Returns the name and type of this MIDI device. \fBSee also:\fP
.RS 4
\fBdeviceType\fP 
.RE
.PP
Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 561 of file alsaout.cc.
.SS "void AlsaOut::noteOn (\fBuchar\fP chn, \fBuchar\fP note, \fBuchar\fP vel)\fC [virtual]\fP"
.PP
See \fBDeviceManager::noteOn\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 291 of file alsaout.cc.
.PP
References MidiMapper::channel(), MidiMapper::key(), and noteOff().
.SS "void AlsaOut::noteOff (\fBuchar\fP chn, \fBuchar\fP note, \fBuchar\fP vel)\fC [virtual]\fP"
.PP
See \fBDeviceManager::noteOff\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 313 of file alsaout.cc.
.PP
References MidiMapper::channel(), and MidiMapper::key().
.PP
Referenced by channelSilence(), and noteOn().
.SS "void AlsaOut::keyPressure (\fBuchar\fP chn, \fBuchar\fP note, \fBuchar\fP vel)\fC [virtual]\fP"
.PP
See \fBDeviceManager::keyPressure\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 328 of file alsaout.cc.
.PP
References MidiMapper::channel(), and MidiMapper::key().
.SS "void AlsaOut::chnPatchChange (\fBuchar\fP chn, \fBuchar\fP patch)\fC [virtual]\fP"
.PP
See \fBDeviceManager::chnPatchChange\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 340 of file alsaout.cc.
.PP
References MidiMapper::channel(), and MidiMapper::patch().
.PP
Referenced by initDev().
.SS "void AlsaOut::chnPressure (\fBuchar\fP chn, \fBuchar\fP vel)\fC [virtual]\fP"
.PP
See \fBDeviceManager::chnPressure\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 357 of file alsaout.cc.
.PP
References MidiMapper::channel().
.PP
Referenced by initDev().
.SS "void AlsaOut::chnPitchBender (\fBuchar\fP chn, \fBuchar\fP lsb, \fBuchar\fP msb)\fC [virtual]\fP"
.PP
See \fBDeviceManager::chnPitchBender\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 371 of file alsaout.cc.
.PP
References MidiMapper::channel(), and MidiMapper::pitchBender().
.PP
Referenced by initDev().
.SS "void AlsaOut::chnController (\fBuchar\fP chn, \fBuchar\fP ctl, \fBuchar\fP v)\fC [virtual]\fP"
.PP
See \fBDeviceManager::chnController\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 387 of file alsaout.cc.
.PP
References MidiMapper::channel(), and MidiMapper::controller().
.PP
Referenced by initDev().
.SS "void AlsaOut::sysex (\fBuchar\fP * data, \fBulong\fP size)\fC [virtual]\fP"
.PP
See \fBDeviceManager::sysex\fP(). Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 408 of file alsaout.cc.
.PP
Referenced by initDev().
.SS "void AlsaOut::channelSilence (\fBuchar\fP chn)\fC [virtual]\fP"
.PP
Mutes all notes being played on a given channel. Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 424 of file alsaout.cc.
.PP
References noteOff().
.PP
Referenced by channelMute().
.SS "void AlsaOut::channelMute (\fBuchar\fP chn, int a)\fC [virtual]\fP"
.PP
Mute or 'unmute' a given channel . \fBParameters:\fP
.RS 4
\fIchn\fP channel to work on 
.br
\fIb\fP if true, the device will ignore subsequent notes played on the chn channel, and mute all notes being played on it. If b is false, the channel is back to work. 
.RE
.PP
Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 438 of file alsaout.cc.
.PP
References channelSilence().
.SS "virtual void AlsaOut::setVolumePercentage (int volper)\fC [inline, virtual]\fP"
.PP
Change all channel volume events multiplying it by this percentage correction Instead of forcing a channel to a fixed volume, this method allows to music to fade out even when it was being played softly. \fBParameters:\fP
.RS 4
\fIvolper\fP is an integer value, where 0 is quiet, 100 is used to send an unmodified value, 200 play music twice louder than it should, etc. 
.RE
.PP
Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 203 of file alsaout.h.
.SS "int AlsaOut::ok (void)\fC [inline]\fP"
.PP
Returns true if everything's ok and false if there has been any problem. Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 209 of file alsaout.h.
.PP
Referenced by closeDev(), and initDev().
.SS "void AlsaOut::sync (int i = 0)"
.PP
Sends the buffer to the device and returns when it's played, so you can synchronize XXX: sync should be virtual after next bic release. Reimplemented from \fBMidiOut\fP.
.PP
Definition at line 497 of file alsaout.cc.

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