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/editor_drag.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/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index e3e2f3a519..35183c59f5 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3722,7 +3722,14 @@ NoteDrag::motion (GdkEvent *, bool) char buf[12]; snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (_primary->note()->note() + dy).c_str(), (int) floor (_primary->note()->note() + dy)); - + + if (dy) { + boost::shared_ptr<Evoral::Note<Evoral::MusicalTime> > + moved_note (new Evoral::Note<Evoral::MusicalTime> (*(_primary->note()))); + moved_note->set_note (moved_note->note() + dy); + _region->play_midi_note (moved_note); + } + _editor->show_verbose_canvas_cursor_with (buf); } } |