- text_p_->set_elt_property ("text",
- ly_str02scm ((req_l_->text_str_ + " ").ch_C ()));
+ text_->set_property ("text", event_->get_property ("text"));
+ }
+}
+
+
+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 ();
+ }
+
+ if (voice)
+ return voice;