- SCM column_scm = get_property ("currentMusicalColumn");
- if (column_scm == SCM_EOL)
- {
- programming_error("failed retrieving current column");
- }
- else
- {
- if (Pitch::compare (pitch_min_, pitch_max_) <= 0)
- {
- Real y_bottom = 0.5 * pitch_min_.steps ();
- SCM c0 = get_property ("centralCPosition");
- if (gh_number_p (c0))
- y_bottom += 0.5 * gh_scm2int (c0);
- else
- programming_error ("Cluster_engraver: failed evaluating c0");
- Real y_top = y_bottom +
- 0.5 * (pitch_max_.steps () - pitch_min_.steps ());
- column_scm = Protected_scm (column_scm);
- SCM segment = scm_list_n (column_scm,
- gh_double2scm (y_bottom),
- gh_double2scm (y_top),
- SCM_UNDEFINED);
- segment = scm_list_n (segment, SCM_UNDEFINED);
- columns_scm_ = (columns_scm_ != SCM_EOL) ?
- gh_append2 (columns_scm_, segment) : segment;
- }
- else
- {
- /* This timestep is caused by a different voice of the
- same staff and hence should be ignored. */
- }
- }
-
- if (reqs_drul_[STOP])
- {
- reqs_drul_[STOP] = 0;
- cluster_->set_grob_property ("segments", columns_scm_);
- typeset_grob (cluster_);
- cluster_ = 0;
- columns_scm_ = SCM_EOL;
- }