- clef_->set_property ("staff-position", cpos);
-
- SCM oct = get_property ("clefOctavation");
- if (scm_is_number (oct) && scm_to_int (oct))
- {
- Item *g = make_item ("OctavateEight", SCM_EOL);
-
- int abs_oct = scm_to_int (oct);
- int dir = sign (abs_oct);
- abs_oct = abs (abs_oct) + 1;
-
- SCM txt = scm_number_to_string (scm_from_int (abs_oct),
- scm_from_int (10));
-
- g->set_property ("text",
- scm_list_n (ly_lily_module_constant ("vcenter-markup"),
- txt, SCM_UNDEFINED));
- Side_position_interface::add_support (g, clef_);
-
- g->set_parent (clef_, Y_AXIS);
- g->set_parent (clef_, X_AXIS);
- g->set_property ("direction", scm_from_int (dir));
- octavate_ = g;
- }
+ clef_->set_property ("staff-position", cpos);
+
+ SCM transp = get_property ("clefTransposition");
+ if (scm_is_number (transp) && scm_to_int (transp))
+ {
+ Item *g = make_item ("ClefModifier", SCM_EOL);
+
+ int abs_transp = scm_to_int (transp);
+ int dir = sign (abs_transp);
+ abs_transp = abs (abs_transp) + 1;
+
+ SCM txt = scm_number_to_string (scm_from_int (abs_transp),
+ scm_from_int (10));
+
+ SCM style = get_property ("clefTranspositionStyle");
+
+ SCM formatter = get_property ("clefTranspositionFormatter");
+ if (ly_is_procedure (formatter))
+ g->set_property ("text", scm_call_2 (formatter, txt, style));
+
+ Side_position_interface::add_support (g, clef_);
+
+ g->set_parent (clef_, Y_AXIS);
+ g->set_parent (clef_, X_AXIS);
+ g->set_property ("direction", scm_from_int (dir));
+ modifier_ = g;
+ }