X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-performer.cc;h=1c7d5c0b0548e3dc66e0822461f22ce7cf221496;hb=1753b1a73742a5b0893037116bb6f2febba277f3;hp=800ccafe11a4661a358e1b769570a98c2a3f37b7;hpb=1b9fc29140bd1d9345f784595afd22158876dfb7;p=lilypond.git diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 800ccafe11..1c7d5c0b05 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2002 Jan Nieuwenhuizen + (c) 1997--2003 Jan Nieuwenhuizen */ #include "translator-group.hh" @@ -94,7 +94,11 @@ Staff_performer::stop_translation_timestep () UGH. -> don't use eval. */ - SCM proc = scm_primitive_eval (ly_symbol2scm ("percussion?")); + static SCM proc; + + if (!proc) + proc = scm_primitive_eval (ly_symbol2scm ("percussion?")); + SCM drums = gh_call1 (proc, ly_symbol2scm (instrument_string_.to_str0 ())); audio_staff_->channel_ = (drums == SCM_BOOL_T ? 9 : -1 ); if (name_) @@ -134,9 +138,6 @@ Staff_performer::new_instrument_string () // mustn't ask Score for instrument: it will return piano! SCM minstr = get_property ("midiInstrument"); - if (!gh_string_p (minstr)) - minstr = get_property ("instrument"); - if (!gh_string_p (minstr) || ly_scm2string (minstr) == instrument_string_) return "";