Method: Musicality::Note#tie_to

Defined in:
lib/musicality/notation/model/note.rb

#tie_to(pitches) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
# File 'lib/musicality/notation/model/note.rb', line 64

def tie_to pitches
  new_note = self.clone
  if pitches.is_a? Pitch
    pitches = [pitches]
  end

  pitches.each do |pitch|
    new_note.links[pitch] = Link::Tie.new
  end
  return new_note
end