Class: Lydown::Rendering::Chord

Inherits:
Base
  • Object
show all
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

#translateObject



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/lydown/rendering/music.rb', line 138

def translate
  translate_expressions
  
  look_ahead_idx = @idx + 1
  while event = @stream[look_ahead_idx]
    case event[:type]
    when :beam_close
      @event[:beam_close] = true
    when :slur_close
      @event[:slur_close] = true
    else
      break
    end
    look_ahead_idx += 1
  end
  
  add_chord(@event)
end