diff options
Diffstat (limited to 'gtk2_ardour/note_player.h')
-rw-r--r-- | gtk2_ardour/note_player.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gtk2_ardour/note_player.h b/gtk2_ardour/note_player.h new file mode 100644 index 0000000000..7df4af4445 --- /dev/null +++ b/gtk2_ardour/note_player.h @@ -0,0 +1,34 @@ +#ifndef __gtk2_ardour_note_player_h__ +#define __gtk2_ardour_note_player_h__ + +#include <vector> +#include <boost/shared_ptr.hpp> +#include <sigc++/trackable.h> + +#include "evoral/Note.hpp" + +namespace ARDOUR { + class MidiTrack; +} + +class NotePlayer : public sigc::trackable { + public: + typedef Evoral::Note<Evoral::MusicalTime> NoteType; + + NotePlayer (boost::shared_ptr<ARDOUR::MidiTrack>); + ~NotePlayer () {} + + void add (boost::shared_ptr<NoteType>); + void play (); + void off (); + + static bool _off (NotePlayer*); + + private: + typedef std::vector<boost::shared_ptr<NoteType> > NoteList; + + boost::shared_ptr<ARDOUR::MidiTrack> track; + NoteList notes; +}; + +#endif /* __gtk2_ardour_note_player_h__ */ |