Class: Musa::Scales::EquallyTempered12ToneScaleSystem

Inherits:
TwelveSemitonesScaleSystem show all
Defined in:
lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb

Class Method Summary collapse

Methods inherited from TwelveSemitonesScaleSystem

id, intervals, notes_in_octave, part_of_tone_size

Methods inherited from ScaleSystem

#==, [], chromatic_class, default_a_frequency, #default_a_frequency, default_tuning, #frequency_of_pitch, #id, id, intervals, #intervals, #notes_in_octave, notes_in_octave, offset_of_interval, #part_of_tone_size, part_of_tone_size, register, scale_kind_class, scale_kind_class?, scale_kind_classes

Class Method Details

.frequency_of_pitch(pitch, _root_pitch, a_frequency) ⇒ Object



29
30
31
# File 'lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb', line 29

def frequency_of_pitch(pitch, _root_pitch, a_frequency)
  (a_frequency * Rational(2)**Rational(pitch - 69, 12)).to_f
end