Class: Stretto::Tokens::NoteToken

Inherits:
HashToken show all
Includes:
WithAttackDecayToken, WithDurationToken, WithNoteStringToken
Defined in:
lib/stretto/grammar/tokens/note_token.rb

Overview

Token result from parsing a note element. It includes the note string, attack, decay and duration

Examples:

"C", "F#6", "[60]w.", "Gb/3.0a100d100"

Instance Method Summary collapse

Methods included from WithAttackDecayToken

#attack, #decay

Methods included from WithNoteStringToken

#accidental, #key, #octave, #pitch

Methods included from WithDurationToken

#duration

Methods inherited from HashToken

#[]

Instance Method Details

#to_stretto(pattern = nil) ⇒ MusicElements::Note



19
20
21
# File 'lib/stretto/grammar/tokens/note_token.rb', line 19

def to_stretto(pattern = nil)
  Stretto::MusicElements::Note.new(self, pattern)
end