summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2020-04-21 15:54:42 -0500
committerBe <be@mixxx.org>2020-04-21 15:54:42 -0500
commit367ee555ce9ef557c255bd19eb76cdd1b93db212 (patch)
treec6fb1b1944526afe574bdfe18d1dc81005ab3abb /res
parent1c333dd64e635852f58c244e9c704fe334a919cf (diff)
common-controller-scripts.js: fix unresolved merge conflict
Diffstat (limited to 'res')
-rw-r--r--res/controllers/common-controller-scripts.js30
1 files changed, 2 insertions, 28 deletions
diff --git a/res/controllers/common-controller-scripts.js b/res/controllers/common-controller-scripts.js
index 1c00f561d1..af8e6ae620 100644
--- a/res/controllers/common-controller-scripts.js
+++ b/res/controllers/common-controller-scripts.js
@@ -468,19 +468,6 @@ bpm.tap = []; // Tap sample values
Output: -
-------- ------------------------------------------------------ */
bpm.tapButton = function(deck) {
-<<<<<<< HEAD
- var now = new Date() / 1000; // Current time in seconds
- var tapDelta = now - bpm.tapTime;
- bpm.tapTime = now;
- if (tapDelta > 2.0) { // reset if longer than two seconds between taps
- bpm.tap = [];
- return;
- }
- bpm.tap.push(60 / tapDelta);
- if (bpm.tap.length > 8) bpm.tap.shift(); // Keep the last 8 samples for averaging
- var sum = 0;
- for (var i = 0; i < bpm.tap.length; i++) {
-=======
var now = new Date() / 1000; // Current time in seconds
var tapDelta = now - bpm.tapTime;
bpm.tapTime = now;
@@ -506,23 +493,11 @@ bpm.tapButton = function(deck) {
// Keep the last 8 samples for averaging
if (bpm.tap.length > 8) bpm.tap.shift();
var sum = 0;
- for (i=0; i<bpm.tap.length; i++) {
->>>>>>> upstream/2.2
+ for (var i=0; i<bpm.tap.length; i++) {
sum += bpm.tap[i];
}
var average = sum / bpm.tap.length;
-<<<<<<< HEAD
- var fRateScale = average / engine.getValue("[Channel" + deck + "]", "bpm");
-
- // Adjust the rate:
- fRateScale = (fRateScale - 1.) / engine.getValue("[Channel" + deck + "]", "rateRange");
-
- engine.setValue(
- "[Channel" + deck + "]", "rate",
- fRateScale * engine.getValue("[Channel" + deck + "]", "rate_dir"));
-// print("Script: BPM="+average+" setting to "+fRateScale);
-=======
var group = "[Channel" + deck + "]";
// "bpm" was changed in 1.10 to reflect the *adjusted* bpm, but I presume it
@@ -532,12 +507,11 @@ bpm.tapButton = function(deck) {
var fRateScale = average/engine.getValue(group, "file_bpm");
// Adjust the rate:
- fRateScale = (fRateScale - 1.) / engine.getValue(group, "rateRange")
+ fRateScale = (fRateScale - 1.) / engine.getValue(group, "rateRange");
engine.setValue(
group, "rate",
fRateScale * engine.getValue(group, "rate_dir"));
->>>>>>> upstream/2.2
};
// ----------------- Common regular expressions --------------------------