+ extract_grob_set (g, "note-heads", note_heads);
+ int glissando_index = 0;
+ for (vsize i = 0; i < note_column_1.size (); i++)
+ {
+ if (note_column_2[i] >= note_heads.size ())
+ {
+ kill_me_.push_back (lines_[i]);
+ announce_end_grob (lines_[i], SCM_EOL);
+ }
+ else
+ {
+ lines_[i]->set_bound (RIGHT, note_heads[note_column_2[i]]);
+ lines_[i]->set_property ("glissando-index", scm_from_int (glissando_index));
+ glissando_index++;
+ announce_end_grob (lines_[i], note_heads[note_column_2[i]]->self_scm ());
+ }
+ }
+ lines_.clear ();
+ note_column_1.clear ();
+ note_column_2.clear ();
+ stop_glissandi_ = false;
+ }
+
+ if (start_glissandi_)
+ {
+ extract_grob_set (g, "note-heads", note_heads);
+ SCM map = get_property ("glissandoMap");
+ if (scm_is_null (map))
+ for (vsize i = 0; i < note_heads.size (); i++)
+ {
+ note_column_1.push_back (i);
+ note_column_2.push_back (i);
+ }
+ else
+ for (SCM m = map; scm_is_pair (m); m = scm_cdr (m))
+ {
+ SCM candidate = scm_car (m);
+ if (!scm_is_pair (candidate))
+ continue;
+ int n1 = robust_scm2int (scm_car (candidate), -1);
+ int n2 = robust_scm2int (scm_cdr (candidate), -1);
+ if ((n1 < 0) || (n2 < 0) || (size_t (n1) >= note_heads.size ()))
+ continue;
+ note_column_1.push_back (vsize (n1));
+ note_column_2.push_back (vsize (n2));
+ }
+ for (vsize i = 0; i < note_column_1.size (); i++)
+ {
+ lines_.push_back (make_spanner ("Glissando", event_->self_scm ()));
+ lines_.back ()->set_bound (LEFT, note_heads[note_column_1[i]]);
+ }
+ }