class AlsaOut

Sends MIDI events to a MIDI devices using ALSA. More...

Definition#include <alsaout.h>
InheritsMidiOut
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members

Protected Methods

Protected Members


Detailed Description

int ndevs

[protected]

Total number of devices.

int nmidiports

[protected]

Total number of midi ports

double count

[protected]

double lastcount

[protected]

double lasttime

[protected]

double begintime

[protected]

int m_rate

[protected]

double convertrate

[protected]

A "constant" used to convert from milliseconds to the computer rate

long int time

[protected]

void  seqbuf_dump (void)

[protected virtual]

Reimplemented from MidiOut.

void  seqbuf_clean (void)

[protected virtual]

Reimplemented from MidiOut.

void  eventInit (snd_seq_event_t *ev)

[protected]

void  eventSend (snd_seq_event_t *ep)

[protected]

void  timerEventSend (int type)

[protected]

 AlsaOut (int d, int client=64, int port=0, const char *cname="", const char *pname="")

Constructor. After constructing a MidiOut device, you must open it (using openDev() ). Additionally you may want to initialize it (with initDev() ),

AlsaOut ()

[virtual]

Destructor. It doesn't matter if you close the device (closeDev() ) before you destruct the object because in other case, it will be closed here.

void  openDev (int sqfd)

[virtual]

Opens the device. This is generally called from DeviceManager , so you shouldn't call this yourself (except if you created the MidiOut object yourself.

Parameters:

See also: closeDev, initDev

Reimplemented from MidiOut.

void  closeDev ()

[virtual]

Closes the device. It basically tells the device (the file descriptor) is going to be closed.

Reimplemented from MidiOut.

void  initDev ()

[virtual]

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 MidiOut.

int  deviceType ()

[const]

which are defined in midispec.h

Returns: 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 :

Reimplemented from MidiOut.

const char *  deviceName (void)

[const virtual]

Returns the name and type of this MIDI device.

Reimplemented from MidiOut.

int  rate (void)

void  noteOn ( uchar chn, uchar note, uchar vel )

[virtual]

See DeviceManager::noteOn()

Reimplemented from MidiOut.

void  noteOff ( uchar chn, uchar note, uchar vel )

[virtual]

See DeviceManager::noteOff()

Reimplemented from MidiOut.

void  keyPressure ( uchar chn, uchar note, uchar vel )

[virtual]

See DeviceManager::keyPressure()

Reimplemented from MidiOut.

void  chnPatchChange ( uchar chn, uchar patch )

[virtual]

See DeviceManager::chnPatchChange()

Reimplemented from MidiOut.

void  chnPressure ( uchar chn, uchar vel )

[virtual]

See DeviceManager::chnPressure()

Reimplemented from MidiOut.

void  chnPitchBender ( uchar chn, uchar lsb, uchar msb )

[virtual]

See DeviceManager::chnPitchBender()

Reimplemented from MidiOut.

void  chnController ( uchar chn, uchar ctl , uchar v )

[virtual]

See DeviceManager::chnController()

Reimplemented from MidiOut.

void  sysex ( uchar *data,ulong size)

[virtual]

See DeviceManager::sysex()

Reimplemented from MidiOut.

void  channelSilence ( uchar chn )

[virtual]

Mutes all notes being played on a given channel.

Reimplemented from MidiOut.

void  channelMute ( uchar chn, int a )

[virtual]

Mute or "unmute" a given channel .

Parameters:

Reimplemented from MidiOut.

void  setVolumePercentage ( int volper )

[virtual]

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.

Parameters:

Reimplemented from MidiOut.

int  ok (void)

Returns true if everything's ok and false if there has been any problem

Reimplemented from MidiOut.

void  wait (double ticks)

[virtual]

void  tmrSetTempo (int v)

[virtual]

void  tmrStart (int tpcn)

[virtual]

void  tmrStart ()

[virtual]

void  tmrStop ()

[virtual]

void  tmrContinue ()

[virtual]

void  sync (int i=0)

[virtual]

If i==1 syncronizes by cleaning the buffer instead of sending it (in fact, this is what syncronizing really means :-) )

AlsaOutPrivate * di