• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libtdemid
 

libtdemid

  • libtdemid
midistat.h
1 /* midistat.h - class midiStat, change it internally and then send it.
2  This file is part of LibKMid 0.9.5
3  Copyright (C) 1997,98,99,2000 Antonio Larrosa Jimenez
4  LibKMid's homepage : http://www.arrakis.es/~rlarrosa/libtdemid.html
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 
21  Send comments and bug fixes to Antonio Larrosa <larrosa@kde.org>
22 
23  ***************************************************************************/
24 #ifndef _MIDISTAT_H
25 #define _MIDISTAT_H
26 
27 #include <libtdemid/dattypes.h>
28 
40 class MidiStatus
41 {
42  private:
43  class MidiStatusPrivate;
44  MidiStatusPrivate *d;
45 
46  ulong tempo;
47 
48  unsigned char chn_patch [16];
49  int chn_bender [16];
50  unsigned char chn_pressure[16];
51  unsigned char chn_controller[16][256];
52 
53  int chn_lastisvolumeev[16];
54 
55  public:
59  MidiStatus();
60 
64  ~MidiStatus();
65 
66 
67  // void noteOn ( uchar chn, uchar note, uchar vel );
68  // void noteOff ( uchar chn, uchar note, uchar vel );
69 
74  void keyPressure ( uchar chn, uchar note, uchar vel );
75 
81  void chnPatchChange ( uchar chn, uchar patch );
82 
86  uchar chnPatch ( uchar chn ) { return chn_patch[chn]; }
87 
92  void chnPressure ( uchar chn, uchar vel );
93 
97  uchar chnPressure ( uchar chn ) { return chn_pressure[chn]; }
98 
102  void chnPitchBender ( uchar chn, uchar lsb, uchar msb );
103 
107  int chnPitchBender ( uchar chn) { return chn_bender[chn]; }
108 
112  void chnController ( uchar chn, uchar ctl , uchar v );
113 
117  uchar chnController ( uchar chn, uchar ctl )
118  { return chn_controller[chn][ctl]; }
119 
123  void sysex ( uchar *data, ulong size);
124 
130  void tmrSetTempo ( int v );
131 
132 
140  void sendData ( class DeviceManager *midi, int gm=1 );
141 };
142 
143 #endif
DeviceManager
MIDI Device Manager class .
Definition: deviceman.h:48
MidiStatus
Stores the status of a MIDI device .
Definition: midistat.h:41
MidiStatus::chnPitchBender
void chnPitchBender(uchar chn, uchar lsb, uchar msb)
Stores a new pitch bender value in channel chn.
Definition: midistat.cpp:71
MidiStatus::~MidiStatus
~MidiStatus()
Destructor.
Definition: midistat.cpp:54
MidiStatus::keyPressure
void keyPressure(uchar chn, uchar note, uchar vel)
Stores a new value for the key aftertouch.
MidiStatus::chnPressure
void chnPressure(uchar chn, uchar vel)
Stores a new channel pressure value in channel chn.
Definition: midistat.cpp:66
MidiStatus::tmrSetTempo
void tmrSetTempo(int v)
Sets the tempo.
Definition: midistat.cpp:84
MidiStatus::chnPressure
uchar chnPressure(uchar chn)
Returns the pressure value currently used in channel chn.
Definition: midistat.h:97
MidiStatus::sysex
void sysex(uchar *data, ulong size)
Stores a sysex message that will be send in the next call to sendData.
MidiStatus::chnController
uchar chnController(uchar chn, uchar ctl)
Returns the value used for controller ctl in channel chn.
Definition: midistat.h:117
MidiStatus::chnController
void chnController(uchar chn, uchar ctl, uchar v)
Stores a new value for controller ctl in channel chn.
Definition: midistat.cpp:76
MidiStatus::chnPatchChange
void chnPatchChange(uchar chn, uchar patch)
Stores a new patch in channel chn.
Definition: midistat.cpp:61
MidiStatus::chnPatch
uchar chnPatch(uchar chn)
Returns the patch currently used in channel chn.
Definition: midistat.h:86
MidiStatus::chnPitchBender
int chnPitchBender(uchar chn)
Returns the pitch bender value used in channel chn.
Definition: midistat.h:107
MidiStatus::MidiStatus
MidiStatus()
Constructor.
Definition: midistat.cpp:36
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.cpp:89

libtdemid

Skip menu "libtdemid"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libtdemid

Skip menu "libtdemid"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for libtdemid by doxygen 1.9.1
This website is maintained by Timothy Pearson.