[ ] PatternData, holding note and volume columns information.
[ ] PatternState, holding a state machine for the playback of a pattern.
[ ] Voice, representing the input and output of a 'channel' in a PatternState.
[ ] Integrate into matt:engine::Engine.
An Engine will have a list of PatternData, and a list of PatternState.
Whenever a pattern is played, a PatternState is created for that pattern. When it is created, the PatternState produces a brief list of Voice objects, through a function create_init_voices which returns a Vec<Voice> (with ownership) to the Engine above, which appends them to a list.
When the engine ticks, it first ticks each PatternState, letting it update itself from the content of the current row; and then the Engine requests each PatternState to update its corresponding Voice objects (by passing a &mut [Voice] and a &PatternData). Once every Voice object is updated, with information such as command and note and volume (enum NoteCommand and enum VolumeCommand), they are ready to be polled by the "routing pass":
Tracks the fleshing out of pattern code.
PatternData
, holding note and volume columns information.PatternState
, holding a state machine for the playback of a pattern.Voice
, representing the input and output of a 'channel' in aPatternState
.matt:engine::Engine
.An
Engine
will have a list ofPatternData
, and a list ofPatternState
.Whenever a pattern is played, a
PatternState
is created for that pattern. When it is created, thePatternState
produces a brief list ofVoice
objects, through a functioncreate_init_voices
which returns aVec<Voice>
(with ownership) to theEngine
above, which appends them to a list.When the engine ticks, it first ticks each
PatternState
, letting it update itself from the content of the current row; and then theEngine
requests eachPatternState
to update its correspondingVoice
objects (by passing a&mut [Voice]
and a&PatternData
). Once everyVoice
object is updated, with information such as command and note and volume (enum NoteCommand
andenum VolumeCommand
), they are ready to be polled by the "routing pass":