Class: Stave::Theory::ChordInversion

Inherits:
Chord show all
Defined in:
lib/stave/theory/chord_inversion.rb

Instance Attribute Summary

Attributes inherited from Core::NoteCollection

#root, #type

Instance Method Summary collapse

Methods inherited from Chord

#inversions

Methods inherited from Core::NoteCollection

inherited, #initialize, #note_at, #notes, #to_h, type_class, #uniq

Constructor Details

This class inherits a constructor from Stave::Core::NoteCollection

Instance Method Details

#root_chordObject



8
9
10
11
12
# File 'lib/stave/theory/chord_inversion.rb', line 8

def root_chord
  root = notes[type.root_position]

  Chord.new(root:, type: type.chord_type)
end

#symbolObject



4
5
6
# File 'lib/stave/theory/chord_inversion.rb', line 4

def symbol
  "#{root_chord.symbol}#{type.symbol}"
end