Class: HeadMusic::Notation::ABC::Parser::PendingNote

Inherits:
Data
  • Object
show all
Defined in:
lib/head_music/notation/abc/parser.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) ⇒ PendingNote

Returns a new instance of PendingNote.



43
44
45
# File 'lib/head_music/notation/abc/parser.rb', line 43

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

Instance Attribute Details

#lengthObject (readonly, private)

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



42
43
44
# File 'lib/head_music/notation/abc/parser.rb', line 42

def length
  @length
end

#pitchesObject (readonly, private)

Returns the value of attribute pitches

Returns:

  • (Object)

    the current value of pitches



42
43
44
# File 'lib/head_music/notation/abc/parser.rb', line 42

def pitches
  @pitches
end

#scaleObject (readonly, private)

Returns the value of attribute scale

Returns:

  • (Object)

    the current value of scale



42
43
44
# File 'lib/head_music/notation/abc/parser.rb', line 42

def scale
  @scale
end

#tied_prefixObject (readonly, private)

Returns the value of attribute tied_prefix

Returns:

  • (Object)

    the current value of tied_prefix



42
43
44
# File 'lib/head_music/notation/abc/parser.rb', line 42

def tied_prefix
  @tied_prefix
end