From b997d608dcc52d9b6bb8af4043877485e19a034b Mon Sep 17 00:00:00 2001 From: "Sean M. Pappalardo" Date: Wed, 16 May 2018 16:34:34 -0700 Subject: [PATCH] AA VMS4 preset update - touch strip FX - Add effects dry/wet control to shifted touch strips - Replace setValue() with setParameter() - Delete now-unneeded strip touch button down if branch --- res/controllers/American Audio VMS4.midi.xml | 18 ++++++++++ .../American-Audio-VMS4-scripts.js | 36 +++++++++---------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/res/controllers/American Audio VMS4.midi.xml b/res/controllers/American Audio VMS4.midi.xml index 3116252a7ae..7e4d0330c88 100644 --- a/res/controllers/American Audio VMS4.midi.xml +++ b/res/controllers/American Audio VMS4.midi.xml @@ -714,6 +714,15 @@ Assumes "Post EQ" mode. (See Wiki for full setup instructions.) + + [EffectRack1_EffectUnit1] + VMS4.strip_fx_dw + 0xB1 + 0x28 + + + + [Channel1] VMS4.strip_touch @@ -1411,6 +1420,15 @@ Assumes "Post EQ" mode. (See Wiki for full setup instructions.) + + [EffectRack1_EffectUnit2] + VMS4.strip_fx_dw + 0xB1 + 0x2D + + + + [Channel2] VMS4.strip_touch diff --git a/res/controllers/American-Audio-VMS4-scripts.js b/res/controllers/American-Audio-VMS4-scripts.js index 8096205ceeb..0a001a77dcd 100644 --- a/res/controllers/American-Audio-VMS4-scripts.js +++ b/res/controllers/American-Audio-VMS4-scripts.js @@ -319,7 +319,8 @@ VMS4.effectSelect = function(channel, control, value, status, group) { diff += wrapCount*128; - engine.setValue("[EffectRack1_EffectUnit"+VMS4.GetDeckNum(group)+"_Effect1]","effect_selector",diff); + engine.setValue("[EffectRack1_EffectUnit"+VMS4.GetDeckNum(group)+"_Effect1]", + "effect_selector",diff); } VMS4.effectSelectPress = function(channel, control, value, status, group) { @@ -336,11 +337,9 @@ VMS4.effectControl = function(channel, control, value, status, group) { var deck = VMS4.GetDeck(group); var deckNum = VMS4.GetDeckNum(group); if (deck.controlEffectParameter) { - engine.setValue("[EffectRack1_EffectUnit"+deckNum+"]","super1", - script.absoluteLin(value,0,1)); + engine.setParameter("[EffectRack1_EffectUnit"+deckNum+"]","super1",value/0x7F); } else { - engine.setValue("[EffectRack1_EffectUnit"+deckNum+"]","mix", - script.absoluteLin(value,0,1)); + engine.setParameter("[EffectRack1_EffectUnit"+deckNum+"]","mix",value/0x7F); } } @@ -398,27 +397,18 @@ 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.strip_fx_dw = function(channel, control, value, status, group) { + engine.setParameter(group,"mix",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 + if ((status & 0xF0) === 0x80) { // If 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 + if ((status & 0xF0) === 0x80) { // If button up VMS4.touchStripPos["Right"] = null; } } @@ -429,7 +419,13 @@ VMS4.strip_scroll = function(channel, control, value, status, group) { 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); + if (side === "Left") { + engine.setValue("[Playlist]", "SelectPlaylist", + VMS4.touchStripPos[side] - value); + } else { + engine.setValue("[Playlist]", "SelectTrackKnob", + VMS4.touchStripPos[side] - value); + } } VMS4.touchStripPos[side] = value; }