From 7bc9d8aa90031046cfce233dd171b19d0deab6df Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 26 Jun 2015 16:16:25 -0400 Subject: swing quantize should skip the FIRST note and start on the SECOND, then alternate, notes --- libs/ardour/quantize.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/quantize.cc b/libs/ardour/quantize.cc index 6604469007..163bb66f62 100644 --- a/libs/ardour/quantize.cc +++ b/libs/ardour/quantize.cc @@ -72,7 +72,7 @@ Quantize::operator () (boost::shared_ptr model, for (std::vector::Notes>::iterator s = seqs.begin(); s != seqs.end(); ++s) { even = false; - +; /* TODO 'swing' probably requires a 2nd iteration: * first quantize notes to the grid, then apply beat shift */ @@ -81,7 +81,7 @@ Quantize::operator () (boost::shared_ptr model, double new_start = round (((*i)->time().to_double() - offset) / _start_grid) * _start_grid + offset; double new_end = round (((*i)->end_time().to_double() - offset) / _end_grid) * _end_grid + offset; - if (_swing > 0.0 && !even) { + if (_swing > 0.0 && even) { double next_grid = new_start + _start_grid; @@ -92,7 +92,7 @@ Quantize::operator () (boost::shared_ptr model, new_start = new_start + (2.0/3.0 * _swing * (next_grid - new_start)); new_end = new_end + (2.0/3.0 * _swing * (next_grid - new_start)); - } else if (_swing < 0.0 && !even) { + } else if (_swing < 0.0 && even) { double prev_grid = new_start - _start_grid; -- cgit v1.2.3