Class: Stave::Theory::ChordInversion
- Inherits:
-
Chord
- Object
- Core::NoteCollection
- Chord
- Stave::Theory::ChordInversion
- Defined in:
- lib/stave/theory/chord_inversion.rb
Instance Attribute Summary
Attributes inherited from Core::NoteCollection
Instance Method Summary collapse
Methods inherited from Chord
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_chord ⇒ Object
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 |
#symbol ⇒ Object
4 5 6 |
# File 'lib/stave/theory/chord_inversion.rb', line 4 def symbol "#{root_chord.symbol}#{type.symbol}" end |