summaryrefslogtreecommitdiff
path: root/gtk2_ardour/note_player.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-09-15 18:54:04 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-09-15 18:54:04 +0000
commit084dda86a7c4391aba4e9f37f752af4846ded15d (patch)
tree067abd6a4ad767958bc3a391c96f5486f8e3462f /gtk2_ardour/note_player.h
parent7eea9fac9d23cdb2a6b39c2fbd4b680fafb40a5c (diff)
when there is a chord at the beginning of a note selection, play the whole chord during drags, not just the first note. seems to be able to send a bank swap message - probably an existingbug
git-svn-id: svn://localhost/ardour2/branches/3.0@7784 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/note_player.h')
-rw-r--r--gtk2_ardour/note_player.h34
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__ */