- {
- SCM ev_acc = scm_car (s);
-
- Music * mus = unsmob_music (scm_car (ev_acc));
- if (!mus)
- programming_error ("need music in quote.");
- else if (accept_music_type (mus))
- {
- if (quote_pitch || me_pitch)
- {
- Pitch qp, mp;
- if (quote_pitch)
- qp = *quote_pitch;
- if (me_pitch)
- mp = *me_pitch;
-
- Pitch diff = pitch_interval (qp, mp);
-
- SCM copy = ly_music_deep_copy (mus->self_scm ());
- mus = unsmob_music (copy);
-
- transposed_musics_ = scm_cons (copy, transposed_musics_);
- mus->transpose (diff);
- }
-
- bool b = quote_outlet_.get_outlet ()->try_music (mus);
- if (!b)
- mus->origin ()->warning (_f ("In quotation: junking event %s", mus->name ()));
- }
- }
-
- event_idx_ ++;
+ {
+ SCM ev_acc = scm_car (s);
+
+ Stream_event *ev = unsmob<Stream_event> (scm_car (ev_acc));
+ if (!ev)
+ programming_error ("no music found in quote");
+ else if (accept_music_type (ev, is_cue))
+ {
+ /* create a transposed copy if necessary */
+ if (quote_pitch || me_pitch)
+ {
+ Pitch qp, mp;
+ if (quote_pitch)
+ qp = *quote_pitch;
+ if (me_pitch)
+ mp = *me_pitch;
+
+ Pitch diff = pitch_interval (mp, qp);
+ ev = ev->clone ();
+ ev->make_transposable ();
+ ev->transpose (diff);
+ transposed_musics_ = scm_cons (ev->unprotect (), transposed_musics_);
+ }
+ quote_outlet_.get_context ()->event_source ()->broadcast (ev);
+ }
+ }
+
+ event_idx_++;