lib/head_music/scale.rb in head_music-6.0.0 vs lib/head_music/scale.rb in head_music-6.0.1

- old
+ new

@@ -26,9 +26,13 @@ @pitches ||= {} @pitches[direction] ||= {} @pitches[direction][octaves] ||= determine_scale_pitches(direction, octaves) end + def pitch_classes + pitches.map(&:pitch_class).uniq + end + def spellings(direction: :ascending, octaves: 1) pitches(direction: direction, octaves: octaves).map(&:spelling).map(&:to_s) end def pitch_names(direction: :ascending, octaves: 1)