+
+ 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)
+ {
+ voice = find_context_below (parent, ly_symbol2scm ("Voice"), "");
+ parent = parent->get_parent_context ();
+ }
+
+ return voice;
+}
+
+Grob *
+get_current_note_head (Context *voice)
+{
+ for (SCM s = voice->get_property ("busyGrobs");
+ scm_is_pair (s); s = scm_cdr (s))
+ {
+ Item *g = dynamic_cast<Item*> (unsmob_grob (scm_cdar (s)));
+
+ if (g && !g->get_column ()
+ && Note_head::has_interface (g))
+ return g;
+ }
+
+ return 0;