+/**
+ analyse pitches to determine clef.
+ */
+String
+Mudela_voice::get_clef () const
+{
+ Mudela_note * n =0;
+
+ for (Cons<Mudela_item> *cp = mudela_item_l_list_.head_; !n && cp; cp = cp->next_)
+ {
+ n = dynamic_cast<Mudela_note*> (cp->car_);
+ }
+
+ if (!n)
+ return "";
+
+ const int c0_pitch = 60;
+ int p = n->pitch_i_;
+
+ if (p < 56)
+ return "\\clef \"bass\";\n";
+ else if (p > 67)
+ return "\\clef \"treble\";\n";
+ else
+ return "";
+}