Class: MTK::Sequencers::LegatoSequencer
- Defined in:
- lib/mtk/sequencers/legato_sequencer.rb
Overview
A Sequencer which uses the longest duration of the events at each step to determine the delta times between entries in the Events::Timeline.
Instance Attribute Summary
Attributes inherited from Sequencer
#event_builder, #max_steps, #max_time, #patterns, #step, #time
Instance Method Summary collapse
-
#advance ⇒ Object
protected
Advance @time to the next time for the Events::Timeline being produced by Sequencer#to_timeline.
-
#next ⇒ Object
Advanced the step index and time, and return the next list of events built from the sequencer patterns.
Methods inherited from Sequencer
#initialize, #rewind, #to_timeline
Constructor Details
This class inherits a constructor from MTK::Sequencers::Sequencer
Instance Method Details
#advance ⇒ Object (protected)
Advance @time to the next time for the Events::Timeline being produced by Sequencer#to_timeline
17 18 19 |
# File 'lib/mtk/sequencers/legato_sequencer.rb', line 17 def advance @time += @previous_events.map{|event| event.length }.max end |
#next ⇒ Object
this is called automatically by Sequencer#to_timeline, so you can ignore this method unless you want to hack on sequencers at a lower level.
Advanced the step index and time, and return the next list of events built from the sequencer patterns.
9 10 11 |
# File 'lib/mtk/sequencers/legato_sequencer.rb', line 9 def next @previous_events = super end |