Class: Musa::Scales::ChromaticScaleKind Private
- Defined in:
- lib/musa-dsl/music/scale_kinds/chromatic_scale_kind.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.
Chromatic scale kind (all 12 semitones).
ChromaticScaleKind defines the chromatic scale containing all 12 semitones of the octave. It's used as a fallback for chromatic (non-diatonic) notes and for atonal or twelve-tone compositions.
Pitch Structure
Contains 12 pitch classes, one for each semitone:
- Degrees: _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12
- Pitches: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 (semitones from root)
Special Properties
- chromatic?: Returns true (only scale kind with this property)
- Used automatically when accessing non-diatonic notes in diatonic scales
Usage
chromatic = Scales[:et12][440.0][:chromatic][60]
chromatic._1 # C
chromatic._2 # C#/Db
chromatic._3 # D
# ... all 12 semitones
Constant Summary collapse
- @@pitches =
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.
[{ functions: [:_1], pitch: 0 }, { functions: [:_2], pitch: 1 }, { functions: [:_3], pitch: 2 }, { functions: [:_4], pitch: 3 }, { functions: [:_5], pitch: 4 }, { functions: [:_6], pitch: 5 }, { functions: [:_7], pitch: 6 }, { functions: [:_8], pitch: 7 }, { functions: [:_9], pitch: 8 }, { functions: [:_10], pitch: 9 }, { functions: [:_11], pitch: 10 }, { functions: [:_12], pitch: 11 }].freeze
Class Method Summary collapse
-
.chromatic? ⇒ Boolean
private
Indicates if this is a chromatic scale.
-
.id ⇒ Symbol
private
Scale kind identifier.
-
.pitches ⇒ Array<Hash>
private
Pitch structure.
Constructor Details
This class inherits a constructor from Musa::Scales::ScaleKind
Class Method Details
.chromatic? ⇒ Boolean
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.
Indicates if this is a chromatic scale.
71 72 73 |
# File 'lib/musa-dsl/music/scale_kinds/chromatic_scale_kind.rb', line 71 def chromatic? true end |
.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.
Scale kind identifier.
65 66 67 |
# File 'lib/musa-dsl/music/scale_kinds/chromatic_scale_kind.rb', line 65 def id :chromatic end |