diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-15 16:16:37 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-15 16:16:37 +0000 |
commit | 5f948f6961c948831e259c06de9821369d46f794 (patch) | |
tree | d51d22e8f877f231dc66c45b5ab1a7433d57b282 /gtk2_ardour/midi_region_view.cc | |
parent | 3b8d6d3b56087b0e2494003f5ad9033519efdb53 (diff) |
(optionally) play note(s) as they are moved around on the pitch axis (finishes #3446)
git-svn-id: svn://localhost/ardour2/branches/3.0@7782 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 6aa83acf11..ee86a38697 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -1324,6 +1324,11 @@ MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note) const double note_length_beats = (note->off_event().time() - note->on_event().time()); nframes_t note_length_ms = beats_to_frames(note_length_beats) * (1000 / (double)route_ui->session()->nominal_frame_rate()); + + /* note: we probably should not be binding a shared_ptr<NoteType> + here. Since its a one-shot timeout, its sort of OK, but ... + */ + Glib::signal_timeout().connect(sigc::bind(sigc::mem_fun(this, &MidiRegionView::play_midi_note_off), note), note_length_ms, G_PRIORITY_DEFAULT); } |