Clef_engraver::do_creation_processing()
{
create_default_b_ = true; // should read property.
- Scalar def = get_property ("createInitdefaultClef", 0);
- if (def.to_bool ()) // egcs: Scalar to bool is ambiguous
- set_type (def);
+ SCM def = get_property ("createInitdefaultClef", 0);
+ if (gh_string_p (def))
+ set_type (ly_scm2string (def));
if (clef_type_str_.length_i ())
{
{
Clef_item *c= new Clef_item;
c->set_elt_property (break_priority_scm_sym, gh_int2scm (-2)); // ugh
- String clefstyle = get_property ("clefStyle", 0);
- if (clefstyle.length_i ())
- c->set_elt_property (style_scm_sym,
- ly_ch_C_to_scm (clefstyle.ch_C()));
+ SCM clefstyle = get_property ("clefStyle", 0);
+ if (gh_string_p(clefstyle))
+ c->set_elt_property (style_scm_sym, clefstyle);
announce_element (Score_element_info (c, clef_req_l_));
clef_p_ = c;
}
else if (create_default_b_)
{
- String type = get_property ("defaultClef", 0);
- set_type (type.length_i () ? type : "treble");
+ SCM type = get_property ("defaultClef", 0);
+ if (gh_string_p (type))
+ set_type (ly_scm2string (type));
+ else
+ set_type ( "treble");
create_clef ();
create_default_b_ =0;
}
{
if (String (output_global_ch) == "scm")
{
- *outstream_l_ << "; " << str << '\n';
+ *outstream_l_ << "; " << str << "\n";
}
else
{
Music_sequence* alt = repeated_music_l_->alternatives_p_;
Moment walk_mom = now_mom () + repeated_music_l_->repeat_body_p_->length_mom ();
- bool create_volta = ! get_property ("noVoltaBraces",0).to_bool ();
+ SCM novolta = get_property ("noVoltaBraces",0);
+ bool create_volta = gh_boolean_p (novolta) && !gh_scm2bool (novolta);
Cons_list<Bar_create_event> becel;
becel.append (new Bar_create_event (now_mom (), "|:"));
becel.append (c);
last_number = volta_number;
volta_number ++;
- Scalar l (get_property ("voltaSpannerDuration", 0));
- if (l.length_i ()) // voltaSpannerDuration OK?
+ SCM l (get_property ("voltaSpannerDuration", 0));
+ if (SMOB_IS_TYPE_B (Moment, l))
{
-
- Moment vSD_mom = l.to_rat();
+ Moment vSD_mom = *SMOB_TO_TYPE (Moment,l);
if ( vSD_mom < i->car_->length_mom() ) // terminate volta early ?
{
vSD_mom += walk_mom;
}
if (rest_p_->balltype_i_ >= 2)
{
- String reststyle = get_property ("restStyle", 0);
- if (reststyle.length_i ())
- rest_p_->set_elt_property (style_scm_sym,
- ly_ch_C_to_scm (reststyle.ch_C()));
+ SCM reststyle = get_property ("restStyle", 0);
+ if (gh_string_p (reststyle))
+ rest_p_->set_elt_property (style_scm_sym,reststyle);
}
announce_element (Score_element_info (rest_p_, rest_req_l_));
}