diff options
author | Sean M. Pappalardo <pegasus@renegadetech.com> | 2018-05-15 15:52:32 -0700 |
---|---|---|
committer | Sean M. Pappalardo <pegasus@renegadetech.com> | 2018-05-17 07:12:23 -0700 |
commit | a8269117932b078e93b8b0f65a4178994c23214f (patch) | |
tree | a2d2a69ed5a718bd76188954e99a3e3373ac2eaf /res/controllers | |
parent | 2d912dc18558b73153c43bf365c8a85c4084f0a0 (diff) |
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
Diffstat (limited to 'res/controllers')
-rw-r--r-- | res/controllers/American Audio VMS4.midi.xml | 91 | ||||
-rw-r--r-- | res/controllers/American-Audio-VMS4-scripts.js | 49 |
2 files changed, 124 insertions, 16 deletions
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 @@ <name>American Audio VMS4/4.1</name> <author>Anders Gunnarsson & Sean M. Pappalardo</author> <wiki>http://mixxx.org/wiki/doku.php/american_audio_vms4</wiki> - <description>2-deck control/4-deck mixer preset for Mixxx 2.1. Assumes "Post EQ" mode. (See Wiki for full setup instructions.)</description> + <description>2-deck control/4-deck mixer preset for Mixxx 2.1. +Assumes "Post EQ" mode. (See Wiki for full setup instructions.)</description> </info> <controller id="American Audio VMS4"> <scriptfiles> @@ -270,13 +271,13 @@ </control> <control><!-- on --> <group>[Channel1]</group> - <key>cue_play</key> + <key>cue_gotoandplay</key> <status>0x91</status> <midino>0x0C</midino> </control> <control><!-- off --> <group>[Channel1]</group> - <key>cue_play</key> + <key>cue_gotoandplay</key> <status>0x81</status> <midino>0x0C</midino> </control> @@ -705,14 +706,50 @@ </options> </control> <control> - <group>[Channel1]</group> - <key>VMS4.touch_strip</key> + <group>[Library]</group> + <key>VMS4.strip_scroll</key> <status>0xB0</status> <midino>0x28</midino> <options> <Script-Binding/> </options> </control> + <control> + <group>[Channel1]</group> + <key>VMS4.strip_touch</key> + <status>0x90</status> + <midino>0x57</midino> + <options> + <Script-Binding/> + </options> + </control> + <control> + <group>[Channel1]</group> + <key>VMS4.strip_touch</key> + <status>0x80</status> + <midino>0x57</midino> + <options> + <Script-Binding/> + </options> + </control> + <control> <!-- Shifted --> + <group>[Channel1]</group> + <key>VMS4.strip_touch</key> + <status>0x91</status> + <midino>0x57</midino> + <options> + <Script-Binding/> + </options> + </control> + <control> + <group>[Channel1]</group> + <key>VMS4.strip_touch</key> + <status>0x81</status> + <midino>0x57</midino> + <options> + <Script-Binding/> + </options> + </control> <!-- Deck B --> <control> @@ -936,13 +973,13 @@ </control> <control><!-- on --> <group>[Channel2]</group> - <key>cue_play</key> + <key>cue_gotoandplay</key> <status>0x91</status> <midino>0x2E</midino> </control> <control><!-- off --> <group>[Channel2]</group> - <key>cue_play</key> + <key>cue_gotoandplay</key> <status>0x81</status> <midino>0x2E</midino> </control> @@ -1366,14 +1403,50 @@ </options> </control> <control> - <group>[Channel2]</group> - <key>VMS4.touch_strip</key> + <group>[Library]</group> + <key>VMS4.strip_scroll</key> <status>0xB0</status> <midino>0x2D</midino> <options> <Script-Binding/> </options> </control> + <control> + <group>[Channel2]</group> + <key>VMS4.strip_touch</key> + <status>0x90</status> + <midino>0x58</midino> + <options> + <Script-Binding/> + </options> + </control> + <control> + <group>[Channel2]</group> + <key>VMS4.strip_touch</key> + <status>0x80</status> + <midino>0x58</midino> + <options> + <Script-Binding/> + </options> + </control> + <control> <!-- Shifted --> + <group>[Channel2]</group> + <key>VMS4.strip_touch</key> + <status>0x91</status> + <midino>0x58</midino> + <options> + <Script-Binding/> + </options> + </control> + <control> + <group>[Channel2]</group> + <key>VMS4.strip_touch</key> + <status>0x81</status> + <midino>0x58</midino> + <options> + <Script-Binding/> + </options> + </control> <!-- Mixer main--> <control> 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) { |