Sha256: 4f10dab2c4885a6847d8d4d2a67ce7701c01e5992ac98370021cca323b6c0f98

Contents?: true

Size: 449 Bytes

Versions: 33

Compression:

Stored size: 449 Bytes

Contents

module Music
module Transcription

module Pitches
  # Define pitch objects for octaves octave 0 through 9
  {
    :Bb => 10, :B => 11,
    :Cb => 11, :C => 0,
    :Db => 1, :D => 2,
    :Eb => 3, :E => 4,
    :Fb => 4, :F => 5,
    :Gb => 6, :G => 7,
    :Ab => 8, :A => 9,
  }.each do |sym,pc|
    (0..9).each do |octave|
      obj = Pitch.new octave: octave, semitone: pc
      Pitches.const_set(:"#{sym}#{octave}",obj)
    end
  end
end

end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
music-transcription-0.6.3 lib/music-transcription/pitches.rb
music-transcription-0.6.2 lib/music-transcription/pitches.rb
music-transcription-0.6.1 lib/music-transcription/pitches.rb
music-transcription-0.6.0 lib/music-transcription/pitches.rb
music-transcription-0.5.11 lib/music-transcription/pitches.rb
music-transcription-0.5.10 lib/music-transcription/pitches.rb
music-transcription-0.5.9 lib/music-transcription/pitches.rb
music-transcription-0.5.8 lib/music-transcription/pitches.rb
music-transcription-0.5.7 lib/music-transcription/pitches.rb
music-transcription-0.5.6 lib/music-transcription/pitches.rb
music-transcription-0.5.5 lib/music-transcription/pitches.rb
music-transcription-0.5.3 lib/music-transcription/pitches.rb
music-transcription-0.5.2 lib/music-transcription/pitches.rb