Module: Musa::Transcriptors::FromGDV::ToMusicXML

Defined in:
lib/musa-dsl/transcription/from-gdv-to-musicxml.rb

Overview

MusicXML-specific GDV transcriptors for music notation output.

Transcribes GDV events to MusicXML format, handling ornaments and articulations as notation metadata rather than expanded note sequences. MusicXML is an XML-based standard for representing Western music notation.

MusicXML vs MIDI Approach

MusicXML transcription differs from MIDI transcription:

  • MusicXML: Preserves ornaments as notation symbols (grace notes, trills, etc.)
  • MIDI: Expands ornaments to explicit note sequences for playback

Supported Features

  • Appogiatura: Grace note ornaments marked with :grace attribute

Usage

transcriptor = Musa::Transcription::Transcriptor.new(
  Musa::Transcriptors::FromGDV::ToMusicXML.transcription_set,
  base_duration: 1/4r,
  tick_duration: 1/96r
)
result = transcriptor.transcript(gdv_event)

Transcription Set

The transcription_set method returns an array of transcriptors applied in order:

  1. Appogiatura - Process appogiatura ornaments
  2. Base - Process base/rest markers

Examples:

MusicXML appogiatura

gdv = {
  grade: 0,
  duration: 1r,
  appogiatura: { grade: -1, duration: 1/8r }
}
transcriptor = Musa::Transcriptors::FromGDV::ToMusicXML::Appogiatura.new
result = transcriptor.transcript(gdv, base_duration: 1/4r, tick_duration: 1/96r)
# => [
#   { grade: -1, duration: 1/8r, grace: true },
#   { grade: 0, duration: 1r, graced: true, graced_by: {...} }
# ]

See Also:

Defined Under Namespace

Classes: Appogiatura

Class Method Summary collapse

Class Method Details

.transcription_setArray<FeatureTranscriptor>

Returns standard transcription set for MusicXML output.

Creates array of transcriptors for processing GDV to MusicXML format.

Examples:

Create MusicXML transcription chain

transcriptors = Musa::Transcriptors::FromGDV::ToMusicXML.transcription_set
transcriptor = Musa::Transcription::Transcriptor.new(
  transcriptors,
  base_duration: 1/4r
)

Returns:

  • (Array<FeatureTranscriptor>)

    transcriptor chain



71
72
73
74
# File 'lib/musa-dsl/transcription/from-gdv-to-musicxml.rb', line 71

def self.transcription_set
  [ Appogiatura.new,
    Base.new ]
end