- (UGH UGH, pulled amount of space out of thin air)
- */
-
- text_->translate_axis (0.66, X_AXIS);
-
- announce_grob(text_, req_->self_scm());
- req_ = 0;
+Context*
+get_voice_to_lyrics (Context *lyrics)
+{
+ 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 (ly_c_string_p (voice_name))
+ nm = ly_scm2string (voice_name);
+ else
+ {
+ int idx = nm.index_last ('-');
+ if (idx >= 0)
+ nm = nm.left_string (idx);
+ }
+
+ Context *parent = lyrics;
+ Context *voice = 0;
+ while (parent && !voice)
+ {
+ voice = find_context_below (parent, ly_symbol2scm ("Voice"), nm);
+ parent = parent->get_parent_context ();