+ /* map each context (voice) to its own track */
+ Context *c = inf.origin_contexts (this)[0];
+ string voice;
+ if (c->is_alias (ly_symbol2scm ("Voice")))
+ voice = c->id_string ();
+ SCM channel_mapping = get_property ("midiChannelMapping");
+ string str = new_instrument_string ();
+ if (!scm_is_eq (channel_mapping, ly_symbol2scm ("instrument")))
+ channel_ = get_channel (voice);
+ else if (channel_ < 0 && str.empty ())
+ channel_ = get_channel (str);
+ if (str.length ())
+ {
+ if (!scm_is_eq (channel_mapping, ly_symbol2scm ("voice")))
+ channel_ = get_channel (str);
+ set_instrument (channel_, voice);
+ set_instrument_name (voice);
+ }
+ Audio_staff *audio_staff = get_audio_staff (voice);