28 #include <libtdemid/dattypes.h>
29 #include <tdelibs_export.h>
31 #define KM_NAME_SIZE 30
62 class MidiMapperPrivate;
71 char name[KM_NAME_SIZE];
85 Keymap *channelKeymap[16];
92 int channelPatchForced[16];
100 Keymap *patchKeymap[128];
118 int mapExpressionToVolumeEvents;
133 int pitchBenderRatio;
135 void getValue(
char *s,
char *v);
136 void removeSpaces(
char *s);
137 int countWords(
char *s);
138 void getWord(
char *t,
char *s,
int w);
141 void deallocateMaps(
void);
142 Keymap *createKeymap(
char *name,uchar use_same_note=0,uchar note=0);
143 void readPatchmap(FILE *fh);
144 void readKeymap(FILE *fh,
char *first_line);
145 void readChannelmap(FILE *fh);
146 void readOptions(FILE *fh);
148 void addKeymap(Keymap *newkm);
149 Keymap *keymap(
char *n);
167 void loadFile(
const char *name);
172 int ok(
void) {
return _ok; }
177 uchar
channel(uchar chn) {
return channelmap[chn];}
182 uchar patch(uchar chn,uchar pgm);
188 uchar key(uchar chn,uchar pgm, uchar note);
194 void pitchBender(uchar chn,uchar &lsb,uchar &msb);
200 void controller(uchar chn,uchar &ctl,uchar &v);
206 const char *filename(
void);
A Midi Mapper class which defines the way MIDI events are translated (or "mapped") to different ones.
uchar channel(uchar chn)
Returns the channel which chn should be mapped to.
int ok(void)
Returns the status of the object.