gusout.h
/* gusout.h - class gusOut which implements support for Gravis
Ultrasound cards through a /dev/sequencer device
This file is part of LibKMid 0.9.5
Copyright (C) 1998,99,2000 Antonio Larrosa Jimenez
LibKMid's homepage : http://www.arrakis.es/~rlarrosa/libkmid.html
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
Send comments and bug fixes to Antonio Larrosa <larrosa@kde.org>
***************************************************************************/
#ifndef _GUSOUT_H
#define _GUSOUT_H
#include <libkmid/midiout.h>
#include <libkmid/voiceman.h>
class GUSOut : public MidiOut
{
private:
class GUSOutPrivate;
GUSOutPrivate *di;
int patchloaded[256];
int nvoices;
int use8bit; // Use 8 bit patches, instead of 16 bits to use less memory
VoiceManager *vm;
int totalmemory; // Total memory in soundcard
int freememory; // Free memory
void patchesLoadingOrder(int *patchesused,int *patchesordered);
const char *patchName(int pgm);
public:
GUSOut(int d=0,int total =12);
~GUSOut();
virtual void openDev (int sqfd);
virtual void closeDev (void);
virtual void initDev (void);
virtual void noteOn ( uchar chn, uchar note, uchar vel );
virtual void noteOff ( uchar chn, uchar note, uchar vel );
virtual void keyPressure ( uchar chn, uchar note, uchar vel );
virtual void chnPatchChange ( uchar chn, uchar patch );
virtual void chnPressure ( uchar chn, uchar vel );
virtual void chnPitchBender ( uchar chn, uchar lsb, uchar msb );
virtual void chnController ( uchar chn, uchar ctl , uchar v );
virtual void sysex ( uchar *data,ulong size);
void setPatchesToUse(int *patchesused);
int loadPatch (int pgm);
int patch(int p);
private:
static const char *GUS_patches_directory;
static int delete_GUS_patches_directory;
public:
static void setGUSPatchesDirectory(const char *dir);
};
#endif
GUSOut::setPatchesToUse
void setPatchesToUse(int *patchesused)
See DeviceManager::setPatchesToUse() .
Definition: gusout.cc:525
GUSOut::openDev
virtual void openDev(int sqfd)
See MidiOut::openDev()
Definition: gusout.cc:137
GUSOut::patch
int patch(int p)
Returns p if the patch with number p has been correctly loaded.
Definition: gusout.cc:208
GUSOut::noteOn
virtual void noteOn(uchar chn, uchar note, uchar vel)
See MidiOut::noteOn()
Definition: gusout.cc:217
GUSOut::chnPressure
virtual void chnPressure(uchar chn, uchar vel)
See MidiOut::chnPressure()
Definition: gusout.cc:281
GUSOut::loadPatch
int loadPatch(int pgm)
Loads a single patch on the synthesizer memory.
Definition: gusout.cc:338
GUSOut::~GUSOut
~GUSOut()
Destructor.
Definition: gusout.cc:124
GUSOut::chnPatchChange
virtual void chnPatchChange(uchar chn, uchar patch)
See MidiOut::chnPatchChange()
Definition: gusout.cc:270
GUSOut::GUSOut
GUSOut(int d=0, int total=12)
Constructor.
Definition: gusout.cc:112
GUSOut::closeDev
virtual void closeDev(void)
See MidiOut::closeDev()
Definition: gusout.cc:169
GUSOut::initDev
virtual void initDev(void)
See MidiOut::initDev()
Definition: gusout.cc:178
MidiOut
External MIDI port output class .
Definition: midiout.h:51
GUSOut::sysex
virtual void sysex(uchar *data, ulong size)
It's an empty function, as GUS synths don't support System Exclusive messages.
Definition: gusout.cc:317
GUSOut::chnController
virtual void chnController(uchar chn, uchar ctl, uchar v)
See MidiOut::chnController()
Definition: gusout.cc:301
GUSOut::chnPitchBender
virtual void chnPitchBender(uchar chn, uchar lsb, uchar msb)
See MidiOut::chnPitchBender()
Definition: gusout.cc:291
GUSOut::setGUSPatchesDirectory
static void setGUSPatchesDirectory(const char *dir)
Sets the directory where the GUS patches are stored, that is, where the acpiano.pat, ...
Definition: gusout.cc:322
GUSOut
Gravis Ultrasound synthesizer output class .
Definition: gusout.h:45
GUSOut::keyPressure
virtual void keyPressure(uchar chn, uchar note, uchar vel)
See MidiOut::keyPressure()
Definition: gusout.cc:262
GUSOut::noteOff
virtual void noteOff(uchar chn, uchar note, uchar vel)
See MidiOut::noteOff()
Definition: gusout.cc:247

KDE Home | KDE Accessibility Home | Description of Access Keys