Class: Musa::Scales::MajorScaleKind

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

Overview

Major scale kind (Ionian mode).

MajorScaleKind defines the major scale, the fundamental scale of Western tonal music. It follows the pattern: W-W-H-W-W-W-H (whole-half steps) or intervals: M2-M2-m2-M2-M2-M2-m2 from the root.

Pitch Structure

7 diatonic degrees plus extended harmony (8th-13th):

Scale Degrees (Roman numerals, uppercase for major):

  • I (tonic): Root (0 semitones)
  • II (supertonic): Major second (2 semitones)
  • III (mediant): Major third (4 semitones)
  • IV (subdominant): Perfect fourth (5 semitones)
  • V (dominant): Perfect fifth (7 semitones)
  • VI (submediant): Major sixth (9 semitones, relative minor)
  • VII (leading): Major seventh (11 semitones)

Extended degrees (for extended harmony):

  • VIII-XIII: Compound intervals (8th, 9th, 10th, 11th, 12th, 13th)

Function Aliases

Each degree has multiple function names:

  • Numeric: _1, _2, _3, _4, _5, _6, _7 (ordinal)
  • Roman: I, II, III, IV, V, VI, VII (harmonic analysis)
  • Function: tonic, supertonic, mediant, subdominant, dominant, submediant, leading
  • Ordinal: first, second, third, fourth, fifth, sixth, seventh
  • Special: relative/relative_minor for VI (relative minor root)

Usage

c_major = Scales[:et12][440.0][:major][60]
c_major.tonic      # C (60)
c_major.dominant   # G (67)
c_major.VI         # A (69) - relative minor root
c_major.relative_minor.scale(:minor)  # A minor scale

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

Class Method Summary collapse

Constructor Details

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

Class Method Details

.gradesInteger

Number of diatonic degrees.

Returns:

  • (Integer)

    7



285
286
287
# File 'lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb', line 285

def grades
  7
end

.idSymbol

Scale kind identifier.

Returns:

  • (Symbol)

    :major



291
292
293
# File 'lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb', line 291

def id
  :major
end

.pitchesArray<Hash>

Pitch structure.

Returns:

  • (Array<Hash>)

    pitch definitions with functions and offsets



279
280
281
# File 'lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb', line 279

def pitches
  @@pitches
end