Class: Musa::Neumas::Decoders::NeumaDifferentialDecoder

Inherits:
DifferentialDecoder show all
Defined in:
lib/musa-dsl/neumas/neuma-gdvd-decoder.rb

Overview

to get a GDVd

Instance Method Summary collapse

Methods inherited from DifferentialDecoder

#decode

Methods inherited from ProtoDecoder

#decode, #subcontext

Constructor Details

#initialize(base_duration: nil) ⇒ NeumaDifferentialDecoder

Returns a new instance of NeumaDifferentialDecoder.



6
7
8
# File 'lib/musa-dsl/neumas/neuma-gdvd-decoder.rb', line 6

def initialize(base_duration: nil)
  @base_duration = base_duration || Rational(1,4)
end

Instance Method Details

#process(gdvd) ⇒ Object



10
11
12
# File 'lib/musa-dsl/neumas/neuma-gdvd-decoder.rb', line 10

def process(gdvd)
  gdvd.clone.tap { |_| _.base_duration = @base_duration }
end