Method: MTK::Sequencers::Sequencer#to_timeline

Defined in:
lib/mtk/sequencers/sequencer.rb

#to_timelineObject

Produce a Events::Timeline from the Patterns::Patterns in this Sequencer.



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/mtk/sequencers/sequencer.rb', line 49

def to_timeline
  rewind
  timeline =  MTK::Events::Timeline.new
  loop do
    events = self.next
    if events
      events = events.reject{|e| e.rest? }
      timeline[@time] = events unless events.empty?
    end
  end
  timeline
end