Class: Musa::Scales::TwelveSemitonesScaleSystem Abstract Private
- Inherits:
-
ScaleSystem
- Object
- ScaleSystem
- Musa::Scales::TwelveSemitonesScaleSystem
- Defined in:
- lib/musa-dsl/music/scale_systems/twelve_semitones_scale_system.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Subclasses must implement ScaleSystem.frequency_of_pitch
Base class for 12-semitone scale systems.
TwelveSemitonesScaleSystem provides the foundation for any scale system using 12 semitones per octave. It defines intervals and structure but doesn't specify tuning (frequency calculation).
Concrete subclasses must implement frequency calculation:
- EquallyTempered12ToneScaleSystem: Equal temperament (12-TET)
- Other temperaments could be added (e.g., meantone, just intonation)
Intervals
Defines standard interval names using semitone distances:
{ P0: 0, m2: 1, M2: 2, m3: 3, M3: 4, P4: 5, TT: 6,
P5: 7, m6: 8, M6: 9, m7: 10, M7: 11, P8: 12 }
Direct Known Subclasses
Constant Summary collapse
- @@intervals =
This classvariable is part of a private API. You should avoid using this classvariable if possible, as it may be removed or be changed in the future.
{ P0: 0, m2: 1, M2: 2, m3: 3, M3: 4, P4: 5, TT: 6, P5: 7, m6: 8, M6: 9, m7: 10, M7: 11, P8: 12 }
Class Method Summary collapse
-
.id ⇒ Symbol
private
System identifier.
-
.intervals ⇒ Hash{Symbol => Integer}
private
Interval definitions.
-
.notes_in_octave ⇒ Integer
private
Number of distinct notes per octave.
-
.part_of_tone_size ⇒ Integer
private
Size of smallest pitch division.
Class Method Details
.id ⇒ Symbol
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
System identifier.
31 32 33 |
# File 'lib/musa-dsl/music/scale_systems/twelve_semitones_scale_system.rb', line 31 def id :et12 end |
.intervals ⇒ Hash{Symbol => Integer}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Interval definitions.
54 55 56 |
# File 'lib/musa-dsl/music/scale_systems/twelve_semitones_scale_system.rb', line 54 def intervals @@intervals end |
.notes_in_octave ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Number of distinct notes per octave.
37 38 39 |
# File 'lib/musa-dsl/music/scale_systems/twelve_semitones_scale_system.rb', line 37 def notes_in_octave 12 end |
.part_of_tone_size ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Size of smallest pitch division.
43 44 45 |
# File 'lib/musa-dsl/music/scale_systems/twelve_semitones_scale_system.rb', line 43 def part_of_tone_size 1 end |