25 #include "audio/mididrv.h" 26 #include "audio/mididrv_ms.h" 80 static const int CASIO_CHANNEL_POLYPHONY[4];
83 static const uint8 INSTRUMENT_REMAPPING_CT460_TO_MT540[30];
85 static const uint8 INSTRUMENT_REMAPPING_MT540_TO_CT460[30];
88 static const uint8 RHYTHM_INSTRUMENT_MT540;
90 static const uint8 RHYTHM_INSTRUMENT_CT460;
93 static const uint8 BASS_INSTRUMENT_MT540;
96 static const uint8 BASS_INSTRUMENT_CT460;
117 void close()
override;
118 bool isOpen()
const override;
121 void send(int8 source, uint32 b)
override;
122 void metaEvent(int8 source, byte type, byte *data, uint16 length)
override;
124 void stopAllNotes(
bool stopSustainedNotes =
false)
override;
150 virtual void processEvent(int8 source, uint32 b, uint8 outputChannel);
161 virtual void noteOff(byte outputChannel, byte command, byte note, byte velocity, int8 source);
170 virtual void noteOn(byte outputChannel, byte note, byte velocity, int8 source);
180 virtual void programChange(byte outputChannel, byte patchId, int8 source,
bool applyRemapping =
true);
189 virtual void controlChange(byte outputChannel, byte controllerNumber, byte controllerValue, int8 source);
201 virtual int8
mapNote(byte outputChannel, byte note);
224 virtual byte
mapInstrument(byte program,
bool applyRemapping =
true);
238 void stopAllNotes(uint8 source, uint8 channel)
override;
253 byte _instruments[4];
256 bool _rhythmChannel[4];
265 byte *_rhythmNoteRemapping;
273 bool _sendUntrackedNoteOff;
279 static void timerCallback(
void *data);
virtual void noteOn(byte outputChannel, byte note, byte velocity, int8 source)
uint32 getBaseTempo() override
virtual byte mapInstrument(byte program, bool applyRemapping=true)
void send(int8 source, uint32 b) override
Definition: mididrv_ms.h:86
MusicType
Definition: mididrv.h:44
virtual int8 mapNote(byte outputChannel, byte note)
void applySourceVolume(uint8 source) override
Definition: mididrv.h:300
void stopAllNotes(bool stopSustainedNotes=false) override
bool isOpen() const override
virtual void processEvent(int8 source, uint32 b, uint8 outputChannel)
virtual byte calculateVelocity(int8 source, byte velocity)
virtual void noteOff(byte outputChannel, byte command, byte note, byte velocity, int8 source)
virtual int8 mapSourceChannel(uint8 source, uint8 dataChannel)
Definition: mididrv.h:520
MidiDriver_Casio(MusicType midiType)
void metaEvent(int8 source, byte type, byte *data, uint16 length) override
virtual bool isRhythmChannel(uint8 outputChannel)
virtual void send(uint32 b)=0
virtual void controlChange(byte outputChannel, byte controllerNumber, byte controllerValue, int8 source)
virtual void programChange(byte outputChannel, byte patchId, int8 source, bool applyRemapping=true)