2 tie-performer.hh -- declare Tie_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
10 #ifndef TIE_PERFORMER_HH
11 #define TIE_PERFORMER_HH
14 #include "performer.hh"
16 struct CNote_melodic_tuple {
20 CNote_melodic_tuple ();
21 CNote_melodic_tuple (Audio_note*, Melodic_req*, Moment);
22 static int pitch_compare (CNote_melodic_tuple const &, CNote_melodic_tuple const &);
23 static int time_compare (CNote_melodic_tuple const &, CNote_melodic_tuple const &);
26 inline int compare (CNote_melodic_tuple const &a, CNote_melodic_tuple const &b)
28 return CNote_melodic_tuple::time_compare (a,b);
33 Manufacture ties. Acknowledge notes, and put them into a
34 priority queue. If we have a Tie_req, connect the notes that finish
35 just at this time, and note that start at this time.
37 TODO: should share code with Tie_engraver ?
39 class Tie_performer : public Performer
42 VIRTUAL_COPY_CONS(Translator);
46 PQueue<CNote_melodic_tuple> past_notes_pq_;
48 Array<CNote_melodic_tuple> now_notes_;
49 Array<CNote_melodic_tuple> stopped_notes_;
50 Link_array<Audio_tie> tie_p_arr_;
53 virtual void do_post_move_processing ();
54 virtual void do_pre_move_processing ();
55 virtual void acknowledge_element (Audio_element_info);
56 virtual bool do_try_music (Music*);
57 virtual void do_process_requests ();
58 virtual void process_acknowledged ();
63 #endif /* TIE_PERFORMER_HH */