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.
-
#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.
49 50 51 52 |
# File 'lib/head_music/notation/abc/parser.rb', line 49 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.
46 47 48 |
# File 'lib/head_music/notation/abc/parser.rb', line 46 def active_passes @active_passes end |
#awaiting_scale ⇒ Object
Returns the value of attribute awaiting_scale.
46 47 48 |
# File 'lib/head_music/notation/abc/parser.rb', line 46 def awaiting_scale @awaiting_scale end |
#broken_line ⇒ Object
Returns the value of attribute broken_line.
46 47 48 |
# File 'lib/head_music/notation/abc/parser.rb', line 46 def broken_line @broken_line end |
#pending_note ⇒ Object
Returns the value of attribute pending_note.
46 47 48 |
# File 'lib/head_music/notation/abc/parser.rb', line 46 def pending_note @pending_note end |
#pitch_builder ⇒ Object (readonly)
Returns the value of attribute pitch_builder.
45 46 47 |
# File 'lib/head_music/notation/abc/parser.rb', line 45 def pitch_builder @pitch_builder end |
#voice ⇒ Object (readonly)
Returns the value of attribute voice.
45 46 47 |
# File 'lib/head_music/notation/abc/parser.rb', line 45 def voice @voice end |
#volta_start_bar ⇒ Object
Returns the value of attribute volta_start_bar.
46 47 48 |
# File 'lib/head_music/notation/abc/parser.rb', line 46 def @volta_start_bar end |
Instance Method Details
#completed_bar_number ⇒ Object
54 55 56 |
# File 'lib/head_music/notation/abc/parser.rb', line 54 def voice.last_placement&.position&. end |
#entered_bar_number ⇒ Object
58 59 60 |
# File 'lib/head_music/notation/abc/parser.rb', line 58 def voice.next_position. end |