Class: Musa::Transcriptors::FromGDV::Base
- Inherits:
-
Musa::Transcription::FeatureTranscriptor
- Object
- Musa::Transcription::FeatureTranscriptor
- Musa::Transcriptors::FromGDV::Base
- Defined in:
- lib/musa-dsl/transcription/from-gdv.rb
Overview
Base transcriptor for processing .base or .b attributes.
Converts GDV events marked with :base or :b to zero-duration events,
useful for representing rests or structural markers.
Processing
- Checks for
:baseor:battribute - If found, replaces event with
{duration: 0}marked asAbsD - If not found, passes through unchanged
Instance Method Summary collapse
-
#transcript(gdv, base_duration:, tick_duration:) ⇒ Hash
Transcribes GDV event, converting base markers to zero-duration events.
Instance Method Details
#transcript(gdv, base_duration:, tick_duration:) ⇒ Hash
Transcribes GDV event, converting base markers to zero-duration events.
90 91 92 93 94 95 |
# File 'lib/musa-dsl/transcription/from-gdv.rb', line 90 def transcript(gdv, base_duration:, tick_duration:) base = gdv.delete :base base ||= gdv.delete :b super base ? { duration: 0 }.extend(Musa::Datasets::AbsD) : gdv, base_duration: base_duration, tick_duration: tick_duration end |