Skip to content

Commit

Permalink
Merge remote-tracking branch 'mixxx/2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Dec 8, 2023
2 parents 42762b3 + f69e0db commit bdfb495
Show file tree
Hide file tree
Showing 26 changed files with 208 additions and 175 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": [ "eslint:recommended",
"plugin:jsdoc/recommended"],
"plugin:jsdoc/recommended",
"plugin:diff/diff"],

"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ repos:
- eslint-plugin-jsdoc@^v46.5.1
- "@typescript-eslint/eslint-plugin"
- "@typescript-eslint/parser"
- eslint-plugin-diff@^2.0.3
- repo: local
hooks:
- id: clang-format
Expand Down
7 changes: 4 additions & 3 deletions res/controllers/KANE_QuNeo_scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,8 @@ KANE_QuNeo.closeSliderMode = function () {
KANE_QuNeo.deckZoom = function (deck, value) {
var channel = deck - 1; // track channels start at 0 to properly reference arrays
var channelName = KANE_QuNeo.getChannelName(deck)
var normalized = Math.ceil(6 * ((127 - value) / 127))
// range is 1..10
const normalized = Math.ceil(9 * ((127 - value) / 127)) + 1;
// adjust zoom
engine.setValue(channelName, "waveform_zoom", normalized)
}
Expand Down Expand Up @@ -2347,8 +2348,8 @@ KANE_QuNeo.masterVuMeter = function (value) {
// Sliders
KANE_QuNeo.deckZoomLEDs = function (deck, value) {
var LEDGroup = KANE_QuNeo.getLEDGroup(deck);
// normalize zoom LED value to be 0-127
var zoom = ((value - 1) / 5) * 127
// normalize zoom LED value to be 0-127, range is 1..10
const zoom = ((value - 1) / 9) * 127;
// determine which control we are manipulating
var control = KANE_QuNeo.getSliderControl(deck, 0)
// emit message
Expand Down
8 changes: 4 additions & 4 deletions res/controllers/Korg-nanoKONTROL-2-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,9 @@ NK2.toggleBinaryControlAll = function toggleBinaryControlAll(control){
NK2.wavezoomAll = function wavezoomAll(value){
if (NK2.debug>2){print("##function: "+NK2.getFunctionName())};

var range=6-1;
const range=10-1;
var newValue=Math.round(1+((value/127)*range));
if (newValue>6)newValue=6;
if (newValue>10) { newValue=10; }
if (newValue<1)newValue=1;
if (NK2.lastwavevalue!=value){
for (var i=1; i<9; i++){
Expand All @@ -522,9 +522,9 @@ NK2.wavezoomDeck = function wavezoomDeck(value, group){
if (NK2.debug>2){print("##function: "+NK2.getFunctionName())};
if (group=="default"){group=NK2.Deck[NK2.curDeck];};

var range=6-1;
const range=10-1;
var newValue=Math.round(1+((value/127)*range));
if (newValue>6)newValue=6;
if (newValue>10) { newValue=10; }
if (newValue<1)newValue=1;
if (NK2.lastwavevalue!=value){
engine.setValue(group, "waveform_zoom", newValue);
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Novation-Launchpad MK2-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4410,7 +4410,7 @@ var NLMK2 = (function () {
waveform_zoom: {
group: `[${type}${i}]`,
name: 'waveform_zoom',
type: '1.0 - 6.0'
type: '1.0 - 10.0'
},
waveform_zoom_up: {
group: `[${type}${i}]`,
Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Novation-Launchpad Mini MK3-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4410,7 +4410,7 @@ var NLMMK3 = (function () {
waveform_zoom: {
group: `[${type}${i}]`,
name: 'waveform_zoom',
type: '1.0 - 6.0'
type: '1.0 - 10.0'
},
waveform_zoom_up: {
group: `[${type}${i}]`,
Expand Down
5 changes: 3 additions & 2 deletions res/controllers/Novation-Launchpad-Mini-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,11 @@ function ZoomKey(dir) {
that.onPushOrig = that.onPush;
that.onPush = function()
{
if ( ZoomKey.zoom < 6 && this.dir == "+" ) {
// range is 1..10
if (ZoomKey.zoom < 10 && this.dir === "+") {
ZoomKey.zoom++;
}
if ( ZoomKey.zoom > 1 && this.dir == "-") {
if (ZoomKey.zoom > 1 && this.dir === "-") {
ZoomKey.zoom--;
}

Expand Down
2 changes: 1 addition & 1 deletion res/controllers/Novation-Launchpad-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4410,7 +4410,7 @@ var NLMK1 = (function () {
waveform_zoom: {
group: `[${type}${i}]`,
name: 'waveform_zoom',
type: '1.0 - 6.0'
type: '1.0 - 10.0'
},
waveform_zoom_up: {
group: `[${type}${i}]`,
Expand Down
4 changes: 2 additions & 2 deletions res/skins/Deere/vumeter_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
<Layout>horizontal</Layout>
<Children>
<Template src="skin:vumeter_v.xml">
<SetVariable name="group">[Master]</SetVariable>
<SetVariable name="group">[Main]</SetVariable>
<SetVariable name="side">_left</SetVariable>
<SetVariable name="tooltip_meter">main_VuMeterL</SetVariable>
<SetVariable name="tooltip_clip">main_peak_indicator_left</SetVariable>
</Template>
<Template src="skin:vumeter_v.xml">
<SetVariable name="group">[Master]</SetVariable>
<SetVariable name="group">[Main]</SetVariable>
<SetVariable name="side">_right</SetVariable>
<SetVariable name="tooltip_meter">main_VuMeterR</SetVariable>
<SetVariable name="tooltip_clip">main_peak_indicator_right</SetVariable>
Expand Down
10 changes: 0 additions & 10 deletions src/control/controlmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ ControlModel::ControlModel(QObject* pParent)
// Add all controls to Model
const QList<QSharedPointer<ControlDoublePrivate>> controlsList =
ControlDoublePrivate::getAllInstances();
const QHash<ConfigKey, ConfigKey> controlAliases =
ControlDoublePrivate::getControlAliases();

for (const QSharedPointer<ControlDoublePrivate>& pControl : controlsList) {
if (!pControl) {
Expand All @@ -28,14 +26,6 @@ ControlModel::ControlModel(QObject* pParent)
addControl(pControl->getKey(),
pControl->name(),
pControl->description());

ConfigKey aliasKey = controlAliases[pControl->getKey()];
if (aliasKey.isValid()) {
addControl(aliasKey,
pControl->name(),
QStringLiteral("Alias for ") + pControl->getKey().group +
pControl->getKey().item);
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/controllers/controlpickermenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,11 @@ ControlPickerMenu::ControlPickerMenu(QWidget* pParent)
loopmoveBwdSubmenu);
}

addDeckControl("loop_remove",
tr("Remove Temporary Loop"),
tr("Remove the temporary loop"),
loopMenu);

addSeparator();

// Library Controls
Expand Down
3 changes: 3 additions & 0 deletions src/controllers/legacycontrollermappingfilehandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ QFileInfo findScriptFile(std::shared_ptr<LegacyControllerMapping> mapping,
// static
std::shared_ptr<LegacyControllerMapping> LegacyControllerMappingFileHandler::loadMapping(
const QFileInfo& mappingFile, const QDir& systemMappingsPath) {
if (mappingFile.path().isEmpty()) {
return nullptr;
}
if (!mappingFile.exists() || !mappingFile.isReadable()) {
qDebug() << "Mapping" << mappingFile.absoluteFilePath()
<< "does not exist or is unreadable.";
Expand Down
2 changes: 1 addition & 1 deletion src/encoder/encodersndfileflac.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#ifdef Q_OS_WIN
#ifdef _WIN32
//Enable unicode in libsndfile on Windows
//(sf_open uses UTF-8 otherwise)
#include <windows.h>
Expand Down
2 changes: 1 addition & 1 deletion src/encoder/encoderwave.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#ifdef Q_OS_WIN
#ifdef _WIN32
// Enable unicode in libsndfile on Windows
// (sf_open uses UTF-8 otherwise)
#include <windows.h>
Expand Down

0 comments on commit bdfb495

Please sign in to comment.