Class: Stave::Theory::Chord
- Inherits:
-
Core::NoteCollection
- Object
- Core::NoteCollection
- Stave::Theory::Chord
- Defined in:
- lib/stave/theory/chord.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Core::NoteCollection
Instance Method Summary collapse
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
#inversions ⇒ Object
8 9 10 11 12 |
# File 'lib/stave/theory/chord.rb', line 8 def inversions notes.drop(1).zip(type.inversion_types).map do |root, type| ChordInversion.new(root:, type:) end end |
#symbol ⇒ Object
4 5 6 |
# File 'lib/stave/theory/chord.rb', line 4 def symbol "#{root.symbol}#{type.symbol}" end |