Class: Brevity::MonophonicNoteNode
- Inherits:
-
NoteNode
- Object
- Treetop::Runtime::SyntaxNode
- NoteNode
- Brevity::MonophonicNoteNode
- Defined in:
- lib/brevity/parsing/note/note_nodes.rb
Instance Method Summary collapse
Methods inherited from NoteNode
Instance Method Details
#to_note ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/brevity/parsing/note/note_nodes.rb', line 38 def to_note pitches = [ pl.pitch.to_pitch ] links = {} unless pl.the_link.empty? links[pitches[0]] = pl.the_link.to_link end if acc.empty? Music::Transcription::Note.new(duration.to_r,pitches,links:links) else accent = acc.text_value.to_accent Music::Transcription::Note.new(duration.to_r,pitches,links:links,accent:accent) end end |