Class: Musa::MusicXML::Builder::Internal::Pedal Private

Inherits:
DirectionType
  • Object
show all
Includes:
Helper
Defined in:
lib/musa-dsl/musicxml/builder/direction.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Piano sustain pedal marking direction type.

Represents pedal down/up markings. Supports start, stop, change, and continue types with optional line display.

Examples:

Pedal down

pedal 'start', line: true

Pedal up

pedal 'stop'

Pedal change

pedal 'change'

Instance Method Summary collapse

Constructor Details

#initialize(type, line: nil, &block) ⇒ Pedal

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

start / stop / change / continue



340
341
342
343
344
345
346
347
348
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 340

def initialize(type, # start / stop / change / continue
               line: nil, # true
               &block)

  @type = type
  @line = line

  super
end

Instance Method Details

#_direction_type_to_xml(io, indent:, tabs:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



353
354
355
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 353

def _direction_type_to_xml(io, indent:, tabs:)
  io.puts "#{tabs}<pedal type=\"#{@type}\"#{ decode_bool_or_string_attribute(@line, 'line', 'yes', 'no') }/>"
end