Class: Musa::Scales::MajorScaleKind

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

Constant Summary collapse

@@pitches =
{ functions: %i[I _1 tonic],
pitch: 0 },
             { functions: %i[II _2 supertonic],
pitch: 2 },
             { functions: %i[III _3 mediant],
pitch: 4 },
             { functions: %i[IV _4 subdominant],
pitch: 5 },
             { functions: %i[V _5 dominant],
pitch: 7 },
             { functions: %i[VI _6 submediant relative relative_minor],
pitch: 9 },
             { functions: %i[VII _7 leading],
pitch: 11 },
             { functions: %i[VIII _8],
pitch: 12 },
             { functions: %i[IX _9],
pitch: 12 + 2 },
             { functions: %i[X _10],
pitch: 12 + 4 },
             { functions: %i[XI _11],
pitch: 12 + 5 },
             { functions: %i[XII _12],
pitch: 12 + 7 },
             { functions: %i[XIII _13],
pitch: 12 + 9 }].freeze

Instance Attribute Summary

Attributes inherited from ScaleKind

#tuning

Class Method Summary collapse

Methods inherited from ScaleKind

#==, #[], #absolut, #chromatic?, chromatic?, grade_of_function, #grades, grades_functions, #id, #initialize, #inspect, #pitches

Constructor Details

This class inherits a constructor from Musa::Scales::ScaleKind

Class Method Details

.gradesObject



104
105
106
# File 'lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb', line 104

def grades
  7
end

.idObject



108
109
110
# File 'lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb', line 108

def id
  :major
end

.pitchesObject



100
101
102
# File 'lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb', line 100

def pitches
  @@pitches
end