Sha256: 17db0ae0365494bb741b118127901c2d971a7590de0312ebcb8d2db668dde0ea
Contents?: true
Size: 459 Bytes
Versions: 4
Compression:
Stored size: 459 Bytes
Contents
# class IntervalSet # def initialize(*intervals) # @intervals = intervals # @number_of_frets = 24 # sum = @intervals.reduce(:+) # sum < 12 && @intervals << 12 - sum # end # def to_s # @intervals.to_s # end # def to_frets(offset = 0) # frets = [-offset] # i = 0 # while frets.last < @number_of_frets # frets << frets.last + @intervals[i % @intervals.length] # i += 1 # end # frets # end # end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
coltrane-1.0.11 | lib/coltrane/interval_set.rb |
coltrane-1.0.1 | lib/coltrane/interval_set.rb |
coltrane-1.0.0 | lib/coltrane/interval_set.rb |
coltrane-0.0.2 | lib/coltrane/interval_set.rb |