From a8269117932b078e93b8b0f65a4178994c23214f Mon Sep 17 00:00:00 2001 From: "Sean M. Pappalardo" Date: Tue, 15 May 2018 15:52:32 -0700 Subject: American Audio VMS4 updates: - Change CUP button to use cue_gotoandplay - Add strip scroll and touch functions that make the absolute-position touch scripts behave like relative-mode ones for scrolling through the library - Comment-out needle drop function in preparation for replacing it with effect dry/wet - Update script version and date --- res/controllers/American Audio VMS4.midi.xml | 91 +++++++++++++++++++++++--- res/controllers/American-Audio-VMS4-scripts.js | 49 ++++++++++++-- 2 files changed, 124 insertions(+), 16 deletions(-) (limited to 'res/controllers') diff --git a/res/controllers/American Audio VMS4.midi.xml b/res/controllers/American Audio VMS4.midi.xml index 147d89d857..3116252a7a 100644 --- a/res/controllers/American Audio VMS4.midi.xml +++ b/res/controllers/American Audio VMS4.midi.xml @@ -4,7 +4,8 @@ American Audio VMS4/4.1 Anders Gunnarsson & Sean M. Pappalardo http://mixxx.org/wiki/doku.php/american_audio_vms4 - 2-deck control/4-deck mixer preset for Mixxx 2.1. Assumes "Post EQ" mode. (See Wiki for full setup instructions.) + 2-deck control/4-deck mixer preset for Mixxx 2.1. +Assumes "Post EQ" mode. (See Wiki for full setup instructions.) @@ -270,13 +271,13 @@ [Channel1] - cue_play + cue_gotoandplay 0x91 0x0C [Channel1] - cue_play + cue_gotoandplay 0x81 0x0C @@ -705,14 +706,50 @@ - [Channel1] - VMS4.touch_strip + [Library] + VMS4.strip_scroll 0xB0 0x28 + + [Channel1] + VMS4.strip_touch + 0x90 + 0x57 + + + + + + [Channel1] + VMS4.strip_touch + 0x80 + 0x57 + + + + + + [Channel1] + VMS4.strip_touch + 0x91 + 0x57 + + + + + + [Channel1] + VMS4.strip_touch + 0x81 + 0x57 + + + + @@ -936,13 +973,13 @@ [Channel2] - cue_play + cue_gotoandplay 0x91 0x2E [Channel2] - cue_play + cue_gotoandplay 0x81 0x2E @@ -1366,14 +1403,50 @@ - [Channel2] - VMS4.touch_strip + [Library] + VMS4.strip_scroll 0xB0 0x2D + + [Channel2] + VMS4.strip_touch + 0x90 + 0x58 + + + + + + [Channel2] + VMS4.strip_touch + 0x80 + 0x58 + + + + + + [Channel2] + VMS4.strip_touch + 0x91 + 0x58 + + + + + + [Channel2] + VMS4.strip_touch + 0x81 + 0x58 + + + + diff --git a/res/controllers/American-Audio-VMS4-scripts.js b/res/controllers/American-Audio-VMS4-scripts.js index 6f4d95a731..8096205cee 100644 --- a/res/controllers/American-Audio-VMS4-scripts.js +++ b/res/controllers/American-Audio-VMS4-scripts.js @@ -1,7 +1,7 @@ /** - * American Audio VMS4 controller script v2.0 for Mixxx v2.0 + * American Audio VMS4 controller script v2.1 for Mixxx v2.1.x * Copyright (C) 2010 Anders Gunnarsson - * Copyright (C) 2011-2015 Sean M. Pappalardo + * Copyright (C) 2011-2018 Sean M. Pappalardo * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -228,6 +228,8 @@ VMS4.Deck.prototype.keyLockButtonHandler = function(value) { } VMS4.Deck.prototype.effectParamButtonHandler = function(value) { + // Couldn't get this to work. The buttons are mapped instead to VMS4.effectParameterButton + // if(value == ButtonState.pressed) { // this.controlEffectParameter=!this.controlEffectParameter; // if (this.controlEffectParameter) { @@ -244,6 +246,10 @@ VMS4.Deck.prototype.effectParamButtonHandler = function(value) { VMS4.Decks = {"Left":new VMS4.Deck(1,"[Channel1]"), "Right":new VMS4.Deck(2,"[Channel2]")}; VMS4.GroupToDeck = {"[Channel1]":"Left", "[Channel2]":"Right"}; VMS4.GroupToDeckNum = {"[Channel1]":1, "[Channel2]":2, "[Channel3]":3, "[Channel4]":4}; +VMS4.StripToSide = {0x28:"Left", 0x2D:"Right"}; +VMS4.touchStripPos = {"Left":null, "Right":null}; // Stores the position on touch + // to convert the absolute sliders + // to relative ones VMS4.GetDeck = function(group) { try { @@ -392,11 +398,40 @@ VMS4.jog_move_msb = function(channel, control, value, status, group) { deck.jogMsb = value; } -VMS4.touch_strip = function(channel, control, value, status, group) { - // Only modify the playposition if the deck is NOT playing! - if (engine.getValue(group, "play") === 0) { - engine.setValue(group, "playposition", value/0x7F); - } +// VMS4.touch_strip = function(channel, control, value, status, group) { +// // Only modify the playposition if the deck is NOT playing! +// if (engine.getValue(group, "play") === 0) { +// engine.setValue(group, "playposition", value/0x7F); +// } +// } + +VMS4.strip_touch = function(channel, control, value, status, group) { + var deck = VMS4.GetDeckNum(group); + if (deck === 1) { // Left side + if ((status & 0xF0) === 0x90) { // If button down + // TODO: Need a CO to focus explicitly on category selection pane + // "[Library]","MoveFocus" just toggles and is frustrating + } else { // Button up + VMS4.touchStripPos["Left"] = null; + } + } else { // Right side + if ((status & 0xF0) === 0x90) { // If button down + // TODO: Need a CO to focus explicitly on track selection pane + // "[Library]","MoveFocus" just toggles and is frustrating + } else { // Button up + VMS4.touchStripPos["Right"] = null; + } + } +} + +VMS4.strip_scroll = function(channel, control, value, status, group) { + var side = VMS4.StripToSide[control]; + if (VMS4.touchStripPos[side] != null) { + // Higher on the strip gives a higher value, and up is negative on Library + // scroll controls + engine.setValue(group, "MoveVertical", VMS4.touchStripPos[side] - value); + } + VMS4.touchStripPos[side] = value; } VMS4.vinyl = function(channel, control, value, status, group) { -- cgit v1.2.3