Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (23 sloc) 0.504 kB
module Archaeopteryx
class Sequence
attr_accessor :current
def initialize(attributes)
@measures = attributes[:measures]
@array = attributes[:array]
@ceiling = @array.size - 1
@current = -1
@floor = 0
end
def notes(beat)
@array[@current][].notes(beat)
end
def mutate(measure)
return unless 0 == (measure - 1) % @measures
if @current < @ceiling
@current += 1
else
@current = @floor
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.