Class: Musa::MusicXML::Builder::Internal::Wedge 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.

Wedge hairpin direction type for crescendo/diminuendo.

Represents dynamic hairpins (crescendo <, diminuendo >). Supports niente (to/from nothing) hairpins.

Examples:

Crescendo

wedge 'crescendo'

Diminuendo to nothing

wedge 'diminuendo', niente: true

Stop wedge

wedge 'stop'

Instance Method Summary collapse

Constructor Details

#initialize(type, niente: nil, &block) ⇒ Wedge

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.

crescendo / diminuendo / stop / continue



277
278
279
280
281
282
283
284
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 277

def initialize(type, #  crescendo / diminuendo / stop / continue
               niente: nil, # true
               &block)
  @type = type
  @niente = niente

  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.



289
290
291
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 289

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