Class: HeadMusic::Notation::ABC::Parser::VoiceState
- Inherits:
-
Object
- Object
- HeadMusic::Notation::ABC::Parser::VoiceState
- Defined in:
- lib/head_music/notation/abc/parser.rb
Overview
Per-voice interpretation state. Accidentals, the deferred note, and volta tracking are all independent between voices.
Instance Attribute Summary collapse
-
#active_passes ⇒ Object
Returns the value of attribute active_passes.
-
#awaiting_scale ⇒ Object
Returns the value of attribute awaiting_scale.
-
#broken_line ⇒ Object
Returns the value of attribute broken_line.
-
#pending_note ⇒ Object
Returns the value of attribute pending_note.
-
#pitch_builder ⇒ Object
readonly
Returns the value of attribute pitch_builder.
-
#tie_line ⇒ Object
Returns the value of attribute tie_line.
-
#tie_open ⇒ Object
Returns the value of attribute tie_open.
-
#voice ⇒ Object
readonly
Returns the value of attribute voice.
-
#volta_start_bar ⇒ Object
Returns the value of attribute volta_start_bar.
Instance Method Summary collapse
-
#completed_bar_number ⇒ Object
-
#entered_bar_number ⇒ Object
-
#initialize(voice, pitch_builder) ⇒ VoiceState
constructor
A new instance of VoiceState.
Constructor Details
#initialize(voice, pitch_builder) ⇒ VoiceState
Returns a new instance of VoiceState.
55 56 57 58 |
# File 'lib/head_music/notation/abc/parser.rb', line 55 def initialize(voice, pitch_builder) @voice = voice @pitch_builder = pitch_builder end |
Instance Attribute Details
#active_passes ⇒ Object
Returns the value of attribute active_passes.
52 53 54 |
# File 'lib/head_music/notation/abc/parser.rb', line 52 def active_passes @active_passes end |
#awaiting_scale ⇒ Object
Returns the value of attribute awaiting_scale.
52 53 54 |
# File 'lib/head_music/notation/abc/parser.rb', line 52 def awaiting_scale @awaiting_scale end |
#broken_line ⇒ Object
Returns the value of attribute broken_line.
52 53 54 |
# File 'lib/head_music/notation/abc/parser.rb', line 52 def broken_line @broken_line end |
#pending_note ⇒ Object
Returns the value of attribute pending_note.
52 53 54 |
# File 'lib/head_music/notation/abc/parser.rb', line 52 def pending_note @pending_note end |
#pitch_builder ⇒ Object (readonly)
Returns the value of attribute pitch_builder.
51 52 53 |
# File 'lib/head_music/notation/abc/parser.rb', line 51 def pitch_builder @pitch_builder end |
#tie_line ⇒ Object
Returns the value of attribute tie_line.
52 53 54 |
# File 'lib/head_music/notation/abc/parser.rb', line 52 def tie_line @tie_line end |
#tie_open ⇒ Object
Returns the value of attribute tie_open.
52 53 54 |
# File 'lib/head_music/notation/abc/parser.rb', line 52 def tie_open @tie_open end |
#voice ⇒ Object (readonly)
Returns the value of attribute voice.
51 52 53 |
# File 'lib/head_music/notation/abc/parser.rb', line 51 def voice @voice end |
#volta_start_bar ⇒ Object
Returns the value of attribute volta_start_bar.
52 53 54 |
# File 'lib/head_music/notation/abc/parser.rb', line 52 def @volta_start_bar end |
Instance Method Details
#completed_bar_number ⇒ Object
60 61 62 |
# File 'lib/head_music/notation/abc/parser.rb', line 60 def voice.last_placement&.position&. end |
#entered_bar_number ⇒ Object
64 65 66 |
# File 'lib/head_music/notation/abc/parser.rb', line 64 def voice.next_position. end |