Class: Stretto::Tokens::HarmonicChordToken
Overview
Token result from parsing a duration
Instance Method Summary collapse
-
#notes ⇒ Array<MusicElement>
The notes that form this chord.
-
#to_stretto(pattern = nil) ⇒ MusicElements::HarmonicChord
The constructed HarmonicChord element.
Methods inherited from HashToken
Instance Method Details
#notes ⇒ Array<MusicElement>
Returns The notes that form this chord.
18 19 20 21 |
# File 'lib/stretto/grammar/tokens/harmonic_chord_token.rb', line 18 def notes [_first_element.to_stretto(@pattern)] + _other_elements.elements.map{|element| element._element.to_stretto(@pattern)} end |
#to_stretto(pattern = nil) ⇒ MusicElements::HarmonicChord
Returns The constructed HarmonicChord element.
12 13 14 15 |
# File 'lib/stretto/grammar/tokens/harmonic_chord_token.rb', line 12 def to_stretto(pattern = nil) @pattern = pattern Stretto::MusicElements::HarmonicChord.new(self, pattern) end |