class MTK::Sequencers::RhythmicSequencer
A Sequencer
which uses a :rhythm type {Patterns::Pattern} to determine the delta times between entries in the {Events::Timeline}.
Public Class Methods
new(patterns, options={})
click to toggle source
Calls superclass method
# File lib/mtk/sequencers/rhythmic_sequencer.rb, line 7 def initialize(patterns, options={}) super @rhythm = options[:rhythm] or raise ArgumentError.new(":rhythm option is required") end
Public Instance Methods
rewind()
click to toggle source
Calls superclass method
# File lib/mtk/sequencers/rhythmic_sequencer.rb, line 12 def rewind super @rhythm.rewind if @rhythm end
Protected Instance Methods
advance()
click to toggle source
(see Sequencer#advance
)
# File lib/mtk/sequencers/rhythmic_sequencer.rb, line 21 def advance @time += @rhythm.next.length end