From bdef9b2466a3658a564d65ab0be4c7471159a104 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sat, 13 Feb 2016 03:25:43 +1100 Subject: [PATCH] Tempo ramps - fix constant tempo assumption wrt midi ghost note. --- gtk2_ardour/midi_region_view.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 61e9dea9d7..e3ff928e1d 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -4088,10 +4088,10 @@ framepos_t MidiRegionView::snap_frame_to_grid_underneath (framepos_t p, framecnt_t& grid_frames) const { PublicEditor& editor = trackview.editor (); - + const Evoral::Beats p_beat = region_frames_to_region_beats (p); const Evoral::Beats grid_beats = get_grid_beats(p); - grid_frames = region_beats_to_region_frames (grid_beats); + grid_frames = region_beats_to_region_frames (p_beat + grid_beats) - region_beats_to_region_frames (p_beat); /* Hack so that we always snap to the note that we are over, instead of snapping to the next one if we're more than halfway through the one we're over.