Allolib
1.0
C++ Components For Interactive Multimedia
|
The SynthRecorder class records the events arriving at a PolySynth. More...
Public Types | |
enum | TextFormat { SEQUENCER_EVENT , SEQUENCER_TRIGGERS , CPP_FORMAT , NONE } |
Public Member Functions | |
SynthRecorder (TextFormat format=SEQUENCER_EVENT) | |
void | setDirectory (std::string path) |
void | startRecord (std::string name="", bool overwrite=false, bool startOnEvent=true) |
void | stopRecord () |
void | setMaxRecordTime (al_sec maxTime) |
void | verbose (bool verbose) |
bool | verbose () |
SynthRecorder & | operator<< (PolySynth &handler) |
void | registerPolySynth (PolySynth &polySynth) |
Static Public Member Functions | |
static bool | onTriggerOn (SynthVoice *voice, int offsetFrames, int id, void *userData) |
onTriggerOn callback for trigger on events More... | |
static bool | onTriggerOff (int id, void *userData) |
onTriggerOff callback for trigger off events More... | |
The SynthRecorder class records the events arriving at a PolySynth.
Events are stored in a text file that looks like:
The '+' command triggers the start of an event and the '-' command triggers the end of the event. The first number after the command is the time at which it should happen and the second one is the id of the event, used to connect the 'trigger off' to a previous 'trigger on'.
Alternatively, the sequence can be recorded in CPP_FORMAT that produces C++ code that can be pasted to deliver the sequence.
The sequences stored in the text file can be played back using SynthSequencer You must make sre that the synthesizers referenced in the sequence have enough allocated polyphony for the whole sequence or alternatively that the class has been registered to the PolySynth using registerSynthClass().
Definition at line 92 of file al_SynthRecorder.hpp.
|
inlinestatic |
onTriggerOff callback for trigger off events
id | |
userData |
Definition at line 179 of file al_SynthRecorder.hpp.
|
inlinestatic |
onTriggerOn callback for trigger on events
voice | |
offsetFrames | |
id | |
userData |
Definition at line 144 of file al_SynthRecorder.hpp.