Class: Stave::Theory::Chord

Inherits:
Core::NoteCollection show all
Defined in:
lib/stave/theory/chord.rb

Direct Known Subclasses

ChordInversion

Instance Attribute Summary

Attributes inherited from Core::NoteCollection

#root, #type

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

#inversionsObject



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

#symbolObject



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

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