fmout.h
/* fmout.h - class fmOut which handles the /dev/sequencer device
for FM synths
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 _FMOUT_H
#define _FMOUT_H
#include <libkmid/midiout.h>
#include <libkmid/voiceman.h>
class KMID_EXPORT FMOut : public MidiOut
{
private:
class FMOutPrivate;
FMOutPrivate *di;
int patchloaded[256];
int opl;
int nvoices;
VoiceManager *vm;
void modifyPatch(char *buf, int key);
void loadFMPatches (void);
public:
FMOut ( int d=0, int total =12 );
~FMOut ();
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);
virtual void setVolumePercentage ( int i );
int patch(int p);
private:
static const char *FMPatchesDirectory;
static int deleteFMPatchesDirectory;
public:
static void setFMPatchesDirectory(const char *dir);
};
#endif
MidiOut::chnPatchChange
virtual void chnPatchChange(uchar chn, uchar patch)
See DeviceManager::chnPatchChange()
Definition: midiout.cc:147
MidiOut::noteOn
virtual void noteOn(uchar chn, uchar note, uchar vel)
See DeviceManager::noteOn()
Definition: midiout.cc:113
MidiOut::initDev
virtual void initDev()
Initializes the device sending generic standard midi events and controllers, such as changing the pat...
Definition: midiout.cc:86
MidiOut::openDev
virtual void openDev(int sqfd)
Opens the device.
Definition: midiout.cc:63
MidiOut::chnController
virtual void chnController(uchar chn, uchar ctl, uchar v)
See DeviceManager::chnController()
Definition: midiout.cc:186
FMOut
FM device output class .
Definition: fmout.h:43
MidiOut::noteOff
virtual void noteOff(uchar chn, uchar note, uchar vel)
See DeviceManager::noteOff()
Definition: midiout.cc:130
MidiOut
External MIDI port output class .
Definition: midiout.h:51
MidiOut::setVolumePercentage
virtual void setVolumePercentage(int volper)
Change all channel volume events multiplying it by this percentage correction Instead of forcing a ch...
Definition: midiout.h:225
MidiOut::chnPitchBender
virtual void chnPitchBender(uchar chn, uchar lsb, uchar msb)
See DeviceManager::chnPitchBender()
Definition: midiout.cc:166
MidiOut::sysex
virtual void sysex(uchar *data, ulong size)
See DeviceManager::sysex()
Definition: midiout.cc:205
MidiOut::keyPressure
virtual void keyPressure(uchar chn, uchar note, uchar vel)
See DeviceManager::keyPressure()
Definition: midiout.cc:140
MidiOut::chnPressure
virtual void chnPressure(uchar chn, uchar vel)
See DeviceManager::chnPressure()
Definition: midiout.cc:158
MidiOut::closeDev
virtual void closeDev()
Closes the device.
Definition: midiout.cc:77

KDE Home | KDE Accessibility Home | Description of Access Keys