Sha256: 905215665a94356e82ae1a071235df4c66c79887f790c25412bf108597c9bfbe

Contents?: true

Size: 489 Bytes

Versions: 3

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true
# 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

3 entries across 3 versions & 1 rubygems

Version Path
coltrane-1.0.21 lib/coltrane/interval_set.rb
coltrane-1.0.20 lib/coltrane/interval_set.rb
coltrane-1.0.2 lib/coltrane/interval_set.rb