+ /*
+ properties override default equaliser setting
+ */
+ SCM min = get_property ("midiMinimumVolume");
+ SCM max = get_property ("midiMaximumVolume");
+ if (scm_is_number (min) || scm_is_number (max))
+ {
+ Interval iv (0, 1);
+ if (scm_is_number (min))
+ iv[MIN] = scm_to_double (min);
+ if (scm_is_number (max))
+ iv[MAX] = scm_to_double (max);
+ volume = iv[MIN] + iv.length () * volume;
+ }
+ else
+ {
+ /*
+ urg, code duplication:: staff_performer
+ */
+ SCM s = get_property ("midiInstrument");
+
+ if (!scm_is_string (s))
+ s = get_property ("instrumentName");
+
+ if (!scm_is_string (s))
+ s = scm_from_locale_string ("piano");
+
+ SCM eq = get_property ("instrumentEqualizer");
+ if (ly_is_procedure (eq))
+ s = scm_call_1 (eq, s);
+
+ if (is_number_pair (s))
+ {
+ Interval iv = ly_scm2interval (s);
+ volume = iv[MIN] + iv.length () * volume;
+ }
+ }
+ return volume;