+#include "context.hh"
+#include "international.hh"
+#include "performer-group.hh"
+#include "warn.hh"
+
+/* Perform a staff. Individual notes should have their instrument
+ (staff-wide) set, so we override play_element ()
+*/
+class Staff_performer : public Performer
+{
+public:
+ TRANSLATOR_DECLARATIONS (Staff_performer);
+ ~Staff_performer ();
+
+protected:
+ virtual void acknowledge_audio_element (Audio_element_info info);
+ virtual void finalize ();
+ virtual void initialize ();
+ void process_music ();
+ void stop_translation_timestep ();
+
+private:
+ string new_instrument_string ();
+ void set_instrument_name (string voice);
+ void set_instrument (int channel, string voice);
+ int get_channel (string instrument);
+ Audio_staff *get_audio_staff (string voice);
+ Audio_staff *new_audio_staff (string voice);
+ Audio_dynamic *get_dynamic (string voice);
+
+ string instrument_string_;
+ int channel_;
+ Audio_instrument *instrument_;
+ Audio_text *instrument_name_;
+ Audio_text *name_;
+ Audio_tempo *tempo_;
+ map<string, Audio_staff *> staff_map_;
+ map<string, int> channel_map_;
+ map<string, Audio_dynamic *> dynamic_map_;
+ // Would prefer to have the following two items be
+ // members of the containing class Performance,
+ // so they can be reset for each new midi file output.
+ static map<string, int> static_channel_map_;
+ static int channel_count_;
+ // For now, ask the last Staff_performer clean up during its finalize method
+ static int staff_performer_count_;
+};
+
+map<string, int> Staff_performer::static_channel_map_;
+int Staff_performer::channel_count_ = 0;
+int Staff_performer::staff_performer_count_ = 0;
+
+#include "translator.icc"
+
+ADD_TRANSLATOR (Staff_performer,
+ /* doc */
+ "",
+
+ /* create */
+ "",
+
+ /* read */
+ "",