1 #ifndef AL_SEQUENCERMIDI_H
2 #define AL_SEQUENCERMIDI_H
45 #include "al/io/al_MIDI.hpp"
46 #include "al/scene/al_SynthSequencer.hpp"
87 void open(
int deviceIndex,
PolySynth &synth);
89 void open(
int deviceIndex);
97 void setSynthSequencer(
PolySynth &synth) { mSynth = &synth; }
99 void connectNoteOnToFunction(std::function<
void(
int,
int,
int)>
function);
100 void connectNoteOffToFunction(std::function<
void(
int,
int,
int)>
function);
108 std::vector<std::function<void(
int,
int,
int)>> mNoteOnFunctions;
109 std::vector<std::function<void(
int,
int,
int)>> mNoteOffFunctions;
A PolySynth manages polyphony and rendering of SynthVoice instances.
The SequencerMIDI class connects PolySynth objects to MIDI messages.
virtual void onMIDIMessage(const MIDIMessage &m) override
Called when a MIDI message is received.