- if (s.right_str (2) == "_8") // Down one octave
- {
- octave_dir_ = DOWN;
- s = s.left_str (s.length_i () - 2);
- }
- else if (s.right_str (2) == "^8") // Up one octave
- {
- octave_dir_ = UP;
- s = s.left_str (s.length_i () - 2);
- }
- else
- octave_dir_ = CENTER;
-
- SCM c = get_property ("supportedClefTypes");
- SCM p = get_property ("clefPitches");
-
- if (gh_list_p (c))
- {
- SCM found = scm_assoc (ly_str02scm (s.ch_C ()), c);
- if (found == SCM_BOOL_F)
- return false;
-
- SCM glyph = gh_cadr (found);
- SCM pos = gh_caddr (found);
-
- daddy_trans_l_->set_property ("clefGlyph", glyph);
- daddy_trans_l_->set_property ("clefPosition", pos);
-
- found = scm_assoc (glyph, p);
- if (found == SCM_BOOL_F)
- return false;
-
- int c0_position = gh_scm2int (pos) + gh_scm2int (gh_cdr (found));
- daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (c0_position));
- }
-
- int c0_position = gh_scm2int (get_property ("clefCentralCPosition"));
- c0_position -= (int)octave_dir_ * 7;
- daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (c0_position));
-