Index: lily/audio-item.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/audio-item.cc,v retrieving revision 1.37 diff -u -p -u -r1.37 audio-item.cc --- lily/audio-item.cc 11 Feb 2006 11:35:18 -0000 1.37 +++ lily/audio-item.cc 4 Sep 2006 02:10:41 -0000 @@ -21,12 +21,13 @@ Audio_item::Audio_item () audio_column_ = 0; } -Audio_note::Audio_note (Pitch p, Moment m, int transposing_i) +Audio_note::Audio_note (Pitch p, Moment m, bool tie_event, int transposing_i) { pitch_ = p; length_mom_ = m; tied_ = 0; transposing_ = transposing_i; + tie_event_ = tie_event; } void Index: lily/drum-note-performer.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/drum-note-performer.cc,v retrieving revision 1.30 diff -u -p -u -r1.30 drum-note-performer.cc --- lily/drum-note-performer.cc 1 Sep 2006 02:01:01 -0000 1.30 +++ lily/drum-note-performer.cc 4 Sep 2006 02:10:41 -0000 @@ -10,6 +10,7 @@ #include "audio-item.hh" #include "audio-column.hh" #include "global-context.hh" +#include "music.hh" #include "pitch.hh" #include "stream-event.hh" #include "translator.icc" @@ -51,7 +52,22 @@ Drum_note_performer::process_music () if (Pitch *pit = unsmob_pitch (defn)) { - Audio_note *p = new Audio_note (*pit, get_event_length (n), 0); + SCM articulations = n->get_property ("articulations"); + Music *tie_event = 0; + for (SCM s = articulations; + !tie_event && scm_is_pair (s); + s = scm_cdr (s)) + { + Music *m = unsmob_music (scm_car (s)); + if (!m) + continue; + + if (m->is_mus_type ("tie-event")) + tie_event = m; + } + + Audio_note *p = new Audio_note (*pit, get_event_length (n), + tie_event); Audio_element_info info (p, n); announce_element (info); notes_.push_back (p); Index: lily/note-performer.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/note-performer.cc,v retrieving revision 1.73 diff -u -p -u -r1.73 note-performer.cc --- lily/note-performer.cc 1 Sep 2006 02:01:01 -0000 1.73 +++ lily/note-performer.cc 4 Sep 2006 02:10:42 -0000 @@ -10,6 +10,7 @@ #include "audio-item.hh" #include "audio-column.hh" #include "global-context.hh" +#include "music.hh" #include "stream-event.hh" #include "warn.hh" @@ -52,7 +53,22 @@ Note_performer::process_music () if (Pitch *pitp = unsmob_pitch (pit)) { - Audio_note *p = new Audio_note (*pitp, get_event_length (n), - transposing); + SCM articulations = n->get_property ("articulations"); + Music *tie_event = 0; + for (SCM s = articulations; + !tie_event && scm_is_pair (s); + s = scm_cdr (s)) + { + Music *m = unsmob_music (scm_car (s)); + if (!m) + continue; + + if (m->is_mus_type ("tie-event")) + tie_event = m; + } + + Audio_note *p = new Audio_note (*pitp, get_event_length (n), + tie_event, - transposing); Audio_element_info info (p, n); announce_element (info); notes_.push_back (p); Index: lily/tie-performer.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/tie-performer.cc,v retrieving revision 1.63 diff -u -p -u -r1.63 tie-performer.cc --- lily/tie-performer.cc 19 Jul 2006 21:33:03 -0000 1.63 +++ lily/tie-performer.cc 4 Sep 2006 02:10:42 -0000 @@ -17,8 +17,8 @@ class Tie_performer : public Performer { Stream_event *event_; - Stream_event *last_event_; vector now_heads_; + vector now_tied_heads_; vector heads_to_tie_; bool ties_created_; @@ -36,7 +36,6 @@ public: Tie_performer::Tie_performer () { event_ = 0; - last_event_ = 0; ties_created_ = false; } @@ -59,7 +58,11 @@ Tie_performer::acknowledge_audio_element { if (Audio_note *an = dynamic_cast (inf.elem_)) { - now_heads_.push_back (inf); + if (an->tie_event_) { + now_tied_heads_.push_back (inf); + } else { + now_heads_.push_back (inf); + } for (vsize i = heads_to_tie_.size (); i--;) { Stream_event *right_mus = inf.event_; @@ -91,17 +94,22 @@ Tie_performer::stop_translation_timestep if (ties_created_) { heads_to_tie_.clear (); - last_event_ = 0; ties_created_ = false; } if (event_) { heads_to_tie_ = now_heads_; - last_event_ = event_; } + + for (vsize i = now_tied_heads_.size(); i--;) + { + heads_to_tie_.push_back (now_tied_heads_[i]); + } + event_ = 0; now_heads_.clear (); + now_tied_heads_.clear (); } ADD_TRANSLATOR (Tie_performer, Index: lily/include/audio-item.hh =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/include/audio-item.hh,v retrieving revision 1.39 diff -u -p -u -r1.39 audio-item.hh --- lily/include/audio-item.hh 11 Feb 2006 11:35:17 -0000 1.39 +++ lily/include/audio-item.hh 4 Sep 2006 02:10:42 -0000 @@ -55,7 +55,7 @@ public: class Audio_note : public Audio_item { public: - Audio_note (Pitch p, Moment m, int transposing_i = 0); + Audio_note (Pitch p, Moment m, bool tie_event, int transposing_i = 0); void tie_to (Audio_note *); @@ -63,6 +63,7 @@ public: Moment length_mom_; int transposing_; Audio_note *tied_; + bool tie_event_; }; class Audio_piano_pedal : public Audio_item