midistat.h
/* midistat.h - class midiStat, change it internally and then send it.
This file is part of LibKMid 0.9.5
Copyright (C) 1997,98,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 _MIDISTAT_H
#define _MIDISTAT_H
#include <libkmid/dattypes.h>
class MidiStatus
{
private:
class MidiStatusPrivate;
MidiStatusPrivate *d;
ulong tempo;
unsigned char chn_patch [16];
int chn_bender [16];
unsigned char chn_pressure[16];
unsigned char chn_controller[16][256];
int chn_lastisvolumeev[16];
public:
MidiStatus();
~MidiStatus();
// void noteOn ( uchar chn, uchar note, uchar vel );
// void noteOff ( uchar chn, uchar note, uchar vel );
void keyPressure ( uchar chn, uchar note, uchar vel );
void chnPatchChange ( uchar chn, uchar patch );
uchar chnPatch ( uchar chn ) { return chn_patch[chn]; }
void chnPressure ( uchar chn, uchar vel );
uchar chnPressure ( uchar chn ) { return chn_pressure[chn]; }
void chnPitchBender ( uchar chn, uchar lsb, uchar msb );
int chnPitchBender ( uchar chn) { return chn_bender[chn]; }
void chnController ( uchar chn, uchar ctl , uchar v );
uchar chnController ( uchar chn, uchar ctl )
{ return chn_controller[chn][ctl]; }
void sysex ( uchar *data, ulong size);
void tmrSetTempo ( int v );
void sendData ( class DeviceManager *midi, int gm=1 );
};
#endif
MidiStatus::chnController
void chnController(uchar chn, uchar ctl, uchar v)
Stores a new value for controller ctl in channel chn.
Definition: midistat.cc:76
MidiStatus::MidiStatus
MidiStatus()
Constructor.
Definition: midistat.cc:36
MidiStatus::sysex
void sysex(uchar *data, ulong size)
Stores a sysex message that will be send in the next call to sendData.
MidiStatus::chnPatchChange
void chnPatchChange(uchar chn, uchar patch)
Stores a new patch in channel chn.
Definition: midistat.cc:61
MidiStatus::chnController
uchar chnController(uchar chn, uchar ctl)
Returns the value used for controller ctl in channel chn.
Definition: midistat.h:117
MidiStatus::chnPressure
uchar chnPressure(uchar chn)
Returns the pressure value currently used in channel chn.
Definition: midistat.h:97
MidiStatus::keyPressure
void keyPressure(uchar chn, uchar note, uchar vel)
Stores a new value for the key aftertouch.
MidiStatus
Stores the status of a MIDI device .
Definition: midistat.h:40
MidiStatus::chnPressure
void chnPressure(uchar chn, uchar vel)
Stores a new channel pressure value in channel chn.
Definition: midistat.cc:66
MidiStatus::chnPatch
uchar chnPatch(uchar chn)
Returns the patch currently used in channel chn.
Definition: midistat.h:86
MidiStatus::tmrSetTempo
void tmrSetTempo(int v)
Sets the tempo.
Definition: midistat.cc:84
MidiStatus::chnPitchBender
int chnPitchBender(uchar chn)
Returns the pitch bender value used in channel chn.
Definition: midistat.h:107
MidiStatus::~MidiStatus
~MidiStatus()
Destructor.
Definition: midistat.cc:54
DeviceManager
MIDI Device Manager class .
Definition: deviceman.h:47
MidiStatus::chnPitchBender
void chnPitchBender(uchar chn, uchar lsb, uchar msb)
Stores a new pitch bender value in channel chn.
Definition: midistat.cc:71
MidiStatus::sendData
void sendData(class DeviceManager *midi, int gm=1)
Sends the current MIDI state to the DeviceManager object used as parameter (you should have already s...
Definition: midistat.cc:89

KDE Home | KDE Accessibility Home | Description of Access Keys