Class: Lydown::Rendering::Rest
- Includes:
- Notes
- Defined in:
- lib/lydown/rendering/music.rb
Constant Summary
Constants included from Notes
Notes::ADD_LINK_COMMAND, Notes::DYNAMICS, Notes::LILYPOND_EXPRESSIONS, Notes::MARKUP_ALIGNMENT, Notes::TEXTMATE_URL, Notes::TRANSPARENT_NOTE, Notes::TRANSPARENT_TIE
Constants included from Figures
Figures::ALTERATION, Figures::ALTERATION_RE, Figures::BLANK_EXTENDER, Figures::BLANK_EXTENDER_START, Figures::BLANK_EXTENDER_STOP, Figures::EXTENDERS_OFF, Figures::EXTENDERS_ON, Figures::HIDDEN_FORMAT
Instance Method Summary collapse
Methods included from Notes
#add_chord, add_duration_macro_group, #add_macro_event, #add_macro_note, #add_note, cleanup_duration_macro, #cross_bar_dot_lilypond_note, #lilypond_chord, #lilypond_note, #lilypond_phrasing, #lydown_phrasing_close, #lydown_phrasing_open, #note_event_url_link, #translate_expressions, #translate_string_expression
Methods included from Figures
#add_figures, #add_stand_alone_figures, #check_tenues, #lilypond_figures, #next_figures_event, #translate_figures
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
#translate ⇒ Object
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/lydown/rendering/music.rb', line 205 def translate translate_expressions if @event[:multiplier] value = Duration.(@context.get_current_setting(:time)) @context['process/duration_macro'] = nil unless @context['process/macro_group'] if value @event[:rest_value] = "#{value}*#{@event[:multiplier]}" @event[:head] = "#{@event[:head]}#{@event[:rest_value]}" else @event[:head] = "#{@event[:head]}#{@event[:multiplier]}*#{ @context.get_current_setting(:time)}" end # reset the last value so the next note will be rendered with its value @context['process/last_value'] = nil @context['process/duration_values'] = [] end add_note(@event) end |