Skip to content

Commit

Permalink
AA VMS4 preset update - touch strip FX
Browse files Browse the repository at this point in the history
- Add effects dry/wet control to shifted touch strips
- Replace setValue() with setParameter()
- Delete now-unneeded strip touch button down if branch
  • Loading branch information
Pegasus-RPG committed May 16, 2018
1 parent 0ecc316 commit b997d60
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 20 deletions.
18 changes: 18 additions & 0 deletions res/controllers/American Audio VMS4.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,15 @@ Assumes "Post EQ" mode. (See Wiki for full setup instructions.)</description>
<Script-Binding/>
</options>
</control>
<control> <!-- Shifted -->
<group>[EffectRack1_EffectUnit1]</group>
<key>VMS4.strip_fx_dw</key>
<status>0xB1</status>
<midino>0x28</midino>
<options>
<Script-Binding/>
</options>
</control>
<control>
<group>[Channel1]</group>
<key>VMS4.strip_touch</key>
Expand Down Expand Up @@ -1411,6 +1420,15 @@ Assumes "Post EQ" mode. (See Wiki for full setup instructions.)</description>
<Script-Binding/>
</options>
</control>
<control> <!-- Shifted -->
<group>[EffectRack1_EffectUnit2]</group>
<key>VMS4.strip_fx_dw</key>
<status>0xB1</status>
<midino>0x2D</midino>
<options>
<Script-Binding/>
</options>
</control>
<control>
<group>[Channel2]</group>
<key>VMS4.strip_touch</key>
Expand Down
36 changes: 16 additions & 20 deletions res/controllers/American-Audio-VMS4-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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;
}
Expand Down

0 comments on commit b997d60

Please sign in to comment.