summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-08 13:21:05 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-08 13:21:05 +0000
commitfa19e1a9d0b97233e130d301d906b3867a585950 (patch)
tree24d9e680073065545cc173ac0d0760d4f6fdc0eb /gtk2_ardour/midi_region_view.h
parent33ffe733f1bb10c7a53951e2092443524545dc32 (diff)
When sounding notes on selection / note movements, play the note for as long as the mouse button is held down (#4574).
git-svn-id: svn://localhost/ardour2/branches/3.0@12606 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r--gtk2_ardour/midi_region_view.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index 8ad1214c78..0663e75a7b 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -64,6 +64,7 @@ class AutomationRegionView;
class MidiCutBuffer;
class MidiListEditor;
class EditNoteDialog;
+class NotePlayer;
class MidiRegionView : public RegionView
{
@@ -232,6 +233,8 @@ public:
MouseState mouse_state() const { return _mouse_state; }
+ void note_button_release ();
+
struct NoteResizeData {
ArdourCanvas::CanvasNote *canvas_note;
ArdourCanvas::SimpleRect *resize_rect;
@@ -338,8 +341,9 @@ private:
/** Play the NoteOn event of the given note immediately
* and schedule the playback of the corresponding NoteOff event.
*/
- void play_midi_note(boost::shared_ptr<NoteType> note);
- void play_midi_chord (std::vector<boost::shared_ptr<NoteType> > notes);
+ void play_midi_note (boost::shared_ptr<NoteType> note);
+ void start_playing_midi_note (boost::shared_ptr<NoteType> note);
+ void start_playing_midi_chord (std::vector<boost::shared_ptr<NoteType> > notes);
void clear_events();
@@ -473,6 +477,8 @@ private:
Gdk::Cursor* pre_enter_cursor;
Gdk::Cursor* pre_press_cursor;
+
+ NotePlayer* _note_player;
};