// loopingcontrol.cpp
// Created on Sep 23, 2008
// Author: asantoni, rryan
#include <QtDebug>
#include "control/controlobject.h"
#include "control/controlpushbutton.h"
#include "engine/controls/bpmcontrol.h"
#include "engine/controls/enginecontrol.h"
#include "engine/controls/loopingcontrol.h"
#include "engine/enginebuffer.h"
#include "preferences/usersettings.h"
#include "util/compatibility.h"
#include "util/math.h"
#include "util/sample.h"
#include "track/track.h"
#include "track/beats.h"
double LoopingControl::s_dBeatSizes[] = { 0.03125, 0.0625, 0.125, 0.25, 0.5,
1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };
// Used to generate the beatloop_%SIZE, beatjump_%SIZE, and loop_move_%SIZE CO
// ConfigKeys.
ConfigKey keyForControl(QString group, QString ctrlName, double num) {
ConfigKey key;
key.group = group;
key.item = ctrlName.arg(num);
return key;
}
// static
QList<double> LoopingControl::getBeatSizes() {
QList<double> result;
for (unsigned int