Class: Lydown::Rendering::RepeatVolta

Inherits:
Base
  • Object
show all
Defined in:
lib/lydown/rendering/repeats.rb

Instance Method Summary collapse

Methods inherited from Base

#find_prev_event, #initialize, #next_event, #prev_event

Constructor Details

This class inherits a constructor from Lydown::Rendering::Base

Instance Method Details

#translateObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/lydown/rendering/repeats.rb', line 9

def translate
  @context['process/volta_count'] ||= 0
  
  if @context['process/volta_count'] == 0
    @context.emit(:music, "} \\alternative { { ")
  else
    @context.emit(:music, "} { ")
  end
  @context['process/volta_count'] += 1
end