summaryrefslogtreecommitdiff
path: root/libs/ardour/quantize.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-06-26 16:16:25 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-26 16:16:25 -0400
commit7bc9d8aa90031046cfce233dd171b19d0deab6df (patch)
tree7462d26903ebcbcbab25e603bd746ab2dafe7db4 /libs/ardour/quantize.cc
parentee791f251aa25a441d3c78d1b8c09b3c8f7c44cf (diff)
swing quantize should skip the FIRST note and start on the SECOND, then alternate, notes
Diffstat (limited to 'libs/ardour/quantize.cc')
-rw-r--r--libs/ardour/quantize.cc6
1 files 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<MidiModel> model,
for (std::vector<Evoral::Sequence<Evoral::Beats>::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<MidiModel> 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<MidiModel> 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;