Class: HeadMusic::Notation::ABC::VoiceState::PendingNote

Inherits:
Data
  • Object
show all
Defined in:
lib/head_music/notation/abc/voice_state.rb

Overview

A note or chord whose placement is deferred until we know whether a broken-rhythm mark follows it. The pitches are computed eagerly so bar-line accidental resets cannot corrupt them. tied_prefix, when present, is the already-built rhythmic value of everything tied ahead of this note; its own value is appended at flush time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pitches:, length:, scale:, tied_prefix: nil, beam_break: nil) ⇒ PendingNote

Returns a new instance of PendingNote.



19
20
21
# File 'lib/head_music/notation/abc/voice_state.rb', line 19

def initialize(pitches:, length:, scale:, tied_prefix: nil, beam_break: nil)
  super
end

Instance Attribute Details

#beam_breakObject (readonly)

Returns the value of attribute beam_break

Returns:

  • (Object)

    the current value of beam_break



18
19
20
# File 'lib/head_music/notation/abc/voice_state.rb', line 18

def beam_break
  @beam_break
end

#lengthObject (readonly)

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



18
19
20
# File 'lib/head_music/notation/abc/voice_state.rb', line 18

def length
  @length
end

#pitchesObject (readonly)

Returns the value of attribute pitches

Returns:

  • (Object)

    the current value of pitches



18
19
20
# File 'lib/head_music/notation/abc/voice_state.rb', line 18

def pitches
  @pitches
end

#scaleObject (readonly)

Returns the value of attribute scale

Returns:

  • (Object)

    the current value of scale



18
19
20
# File 'lib/head_music/notation/abc/voice_state.rb', line 18

def scale
  @scale
end

#tied_prefixObject (readonly)

Returns the value of attribute tied_prefix

Returns:

  • (Object)

    the current value of tied_prefix



18
19
20
# File 'lib/head_music/notation/abc/voice_state.rb', line 18

def tied_prefix
  @tied_prefix
end