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 first],
pitch: 0 },
             { functions: %i[II _2 supertonic second],
pitch: 2 },
             { functions: %i[III _3 mediant third],
pitch: 4 },
             { functions: %i[IV _4 subdominant fourth],
pitch: 5 },
             { functions: %i[V _5 dominant fifth],
pitch: 7 },
             { functions: %i[VI _6 submediant relative relative_minor sixth],
pitch: 9 },
             { functions: %i[VII _7 leading seventh],
pitch: 11 },
             { functions: %i[VIII _8 eighth],
pitch: 12 },
             { functions: %i[IX _9 ninth],
pitch: 12 + 2 },
             { functions: %i[X _10 tenth],
pitch: 12 + 4 },
             { functions: %i[XI _11 eleventh],
pitch: 12 + 5 },
             { functions: %i[XII _12 twelfth],
pitch: 12 + 7 },
             { functions: %i[XIII _13 thirteenth],
pitch: 12 + 9 }].freeze

Instance Attribute Summary

Attributes inherited from ScaleKind

#tuning

Class Method Summary collapse

Methods inherited from ScaleKind

#==, #[], #absolut, chromatic?, #chromatic?, #default_root, 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