+ SCM avc = lyrics->get_property ("associatedVoiceContext");
+ if (Context *c = unsmob_context (avc))
+ return c;
+
+ SCM voice_name = lyrics->get_property ("associatedVoice");
+ string nm = lyrics->id_string ();
+
+ if (scm_is_string (voice_name))
+ nm = ly_scm2string (voice_name);
+ else
+ {
+ ssize idx = nm.rfind ('-');
+ if (idx != NPOS)
+ nm = nm.substr (0, idx);
+ }
+
+ Context *parent = lyrics;
+ Context *voice = 0;
+ while (parent && !voice)
+ {
+ voice = find_context_below (parent, ly_symbol2scm ("Voice"), nm);
+ parent = parent->get_parent_context ();
+ }
+
+ if (voice)
+ return voice;
+
+ parent = lyrics;
+ voice = 0;
+ while (parent && !voice)