Quick Sign In:  

Forum: Old versions

Topic: How do I map this? - Page: 1

This part of topic is old and might contain outdated or incorrect information

Is there a way to setup a mapping in VDJ like in Traktor where you can assign a 'shift' button that toggles a different button to another mode? I want to toggle my pads between loop roll mode and FX mode. I also want to be able to set each pad to trigger a different effect when it's held down and cease doing so when released.

I know these are probably quite complex mappings which is why I ask for help.
 

Posted Mon 15 Apr 13 @ 4:58 am
It's not too difficult to achieve, you just need a few conditional variables. VDJ is much better for mapping as you aren't restricted to only 8 modifiers, and you can give them meaningful names.

a conditional variable is a simple true or false query, to have multiple shifts you just need to put a few together.

structure - you need to set a variable from another button on your controller, you can use 'set', 'toggle' or 'cycle'

set 'myVarName' 1

then on the control you want shifted query the variable using the 'var' keyword. You can also use 'var_equal', 'var_greater', 'var_smaller', 'var_not_equal' etc...

var 'myVarName' ? 1 action if true : action if false

Now that you have the basic concept you just expand it to meet your needs. 'this has three modes: looproll, effects and hotcue, just make sure that you modify the bold parts

buttons to change the mode

set 'padShift' 0
set 'padShift' 1
set 'padShift' 2

buttons affected by the shift

var 'padShift' ? 1 loop_roll 1 while_pressed : var 'padShift' 2 ? effect 'effect_name' active while_pressed : hot_cue 1
 

Posted Mon 15 Apr 13 @ 5:32 am
This makes my brain hurt lol. This is how it's setup right now.

The SHIFT button (I realize this is not arbitrary and can be any button) is set like so.

set 'shift' 1 & set '$shift' 1 & holding ? set 'shift' 0 & set '$shift' 0 : set 'shift' 0 & set '$shift' 0 & leftdeck ? deck 1 leftdeck ? deck 3 leftdeck : deck 1 leftdeck : rightdeck ? deck 2 rightdeck ? deck 4 rightdeck : deck 2 rightdeck : nothing

There are 4 buttons for selecting the pad modes.

I want to modify the button 2 behaviour at present it is set as sampler

set 'mode' 1

Pad 1 is set thus

var 'mode' 1 ? var 'shift' ? deck active sampler 1 rec & sampler 1 select : sampler 1 play_stop while_pressed & sampler 1 select : var 'mode' 2 ? loop 0.125 : var 'mode' 3 ? loop_roll 0.125 while_pressed : var 'shift' ? delete_cue 1 : hot_cue 1

I want to switch mode 1 to another mode (not modes 0-3 as they present are set on 4 buttons) when shift toggles key 2 (mode 1) to FX mode. I am not sure this is possible and may require a different custom mapping but I have found if I create a custom map I cannot switch into it 'on-the-fly'. VDJ lacks the ability to 'switch' mappings? I don't know if this is due to a limitation of it detecting the device automatically on startup.

Anyhow I really need to learn this stuff.

Once I have shift button, button 2 and pad 1 working I will be able to set the other pads OK I think.
 

Posted Mon 15 Apr 13 @ 6:08 am
The reason you start from 'mode' 0 is that the last part of the script will be the default action if none of the shifts are active, in this case hot cues. I changed the functionality of the shift button as I didn't like the way you had it set in yours. Now it will toggle the shift on and off if you don't hold it and the led should blink, or will toggle left/right deck if you do hold it, the led if not shifted should be on for decks 1 & 2 and off for 3 & 4.

shift button

holding ? device_side 'left' ? deck 1 leftdeck ? deck 3 leftdeck : deck 1 leftdeck : deck 2 rightdeck ? deck 4 rightdeck : deck 2 rightdeck : var'shift' 1 ? blink 400ms & set 'shift' 0 & set '$shift' 0 : set 'shift' 1 & set '$shift' 1 & device_side 'left' ? deck 1 leftdeck ? on : off : deck 2 rightdeck ? on : off

I made a couple of changes to Pad 1 that probably don't do anything but it makes more sense in my head LOL.

var 'mode' 1 ? var 'shift' ? sampler 1 select & sampler 1 rec : down ? sampler 1 select & sampler 1 play : sampler 1 stop : var 'mode' 2 ? loop 0.125 : var 'mode' 3 ? loop_roll 0.125 while_pressed : var 'shift' ? delete_cue 1 : hot_cue 1

For the amount of modes you have it is completely up to you... If you want 8 different modes, for example you could have the mode buttons select between mode 4 and 7 if shifted eg.

var 'shift' ? set 'mode' 4 : set 'mode' 0 & var 'mode' 4 ? blink 400ms : var 'mode' 0 ? off : off
var 'shift' ? set 'mode' 5 : set 'mode' 1 & var 'mode' 5 ? blink 400ms : var 'mode' 1 ? off : off
var 'shift' ? set 'mode' 6 : set 'mode' 2 & var 'mode' 6 ? blink 400ms : var 'mode' 2 ? off : off
etc...

then you just query mode's 1 through 7 and have the default at the end. If you are getting this involved in mapping it hurts your brain less if you break it down into sections that are easier to manage. eg.


var 'mode' 1 ? var 'shift' ? sampler 1 select & sampler 1 rec : down ? sampler 1 select & sampler 1 play : sampler 1 stop :
var 'mode' 2 ? loop 0.125 :
var 'mode' 3 ? loop_roll 0.125 while_pressed :
var 'mode' 4 ? something :
var 'mode' 5 ? somethingElse :
var 'mode' 6 ? anotherThing :
var 'mode' 7 ? youGetTheIdea :
var 'shift' ? delete_cue 1 : hot_cue 1

then put it all back together to test it once your happy
 

Posted Mon 15 Apr 13 @ 6:43 am
Good job I backed up the mapping before trying those. The shift button and pad 1 you gave me caused the playback button to break (plays and can't be stopped just jumps back to first cue point) and all hot cue pads and sampler pads cease to function. Looks like I will have to learn how to script before I can get this working how I want to :/

I've set another button for set mode 4 and I think I am getting there. Now I need to figure out how to assign an effect to a pad while_pressed.
 

Posted Mon 15 Apr 13 @ 7:03 am
It looks like it should work.. I can't test unfortunately.. try this instead I just removed the led controls, but it is essentially the same. If you have duplicated the mapping xml, make sure you put the old one in a different folder otherwise they may clash.

shift button
holding ? device_side 'left' ? deck 1 leftdeck ? deck 3 leftdeck : deck 1 leftdeck : deck 2 rightdeck ? deck 4 rightdeck : deck 2 rightdeck : var'shift' 1 ? set 'shift' 0 & set '$shift' 0 : set 'shift' 1 & set '$shift' 1

Pad 1
var 'mode' 1 ? var 'shift' ? sampler 1 select & sampler 1 rec : down ? sampler 1 select & sampler 1 play_stop while_pressed : var 'mode' 2 ? loop 0.125 : var 'mode' 3 ? loop_roll 0.125 while_pressed : var 'shift' ? delete_cue 1 : hot_cue 1
 

Posted Mon 15 Apr 13 @ 7:27 am
Hmmm. Now I can't delete hot cues and the sampler pads get tied to the hot cues so the hot cues trigger at the same time as samples. on button 2 (sampler pads select).

I wonder if there is a limitation on my controller in being able to assign more than 4 modes.
 

Posted Mon 15 Apr 13 @ 7:44 am
what controller do you have? and try to get rid of the global shift and just make it local to the side you are pressing the button on.

shift button
holding ? device_side 'left' ? deck 1 leftdeck ? deck 3 leftdeck : deck 1 leftdeck : deck 2 rightdeck ? deck 4 rightdeck : deck 2 rightdeck : var'shift' 1 ? set 'shift' 0 : set 'shift' 1
 

Posted Mon 15 Apr 13 @ 7:48 am
Novation Twitch.
 

Posted Mon 15 Apr 13 @ 7:49 am
I think it's because the twitch has a hard shift for the pads. it will take a bit more scripting to achieve 8 modes, but it's not impossible by any means.
 

Posted Mon 15 Apr 13 @ 8:21 am
If you figure it out please let me know. BTW if I just want to clear mode 1 (button 2) for FX instead of sampler how do I go about doing that for each of the 4 pads 'while_pressed'?

EDIT: Nevermind figured that one out. I need a mode 4 though ;)
 

Posted Mon 15 Apr 13 @ 8:42 am
Yeah I know. Each key is linked through mapping to another key and it has a knock on effect if you don't know which keys is doing what with another. BTW the above did zilch it just clears the key entirely and it stays default red.

The other thing is I could have samples assigned to the left 8 pads and FX to the right 8 pads if I could figure out how to do it. Right now they are tied together so they perform the same actions left and right to the active deck.

EDIT: I think I need to put your above code in LED_PAD1 not PAD1?

EDIT2: I tried that and not the LED is unlit.
 

Posted Mon 15 Apr 13 @ 9:01 am
Yeah already tried that for mode 1 sampler. No go. Deck 2 LED's still light and either deck controls the same samples. Limiting to 8 samples instead of 16. Might be a mapping or driver issue though. I can't believe the pads are not independent for the Slicer/Sampler mode. Normally Itch software uses that mode for beat Slicer. I will have to see if it does a similar thing in Itch when using Slicer.

EDIT: Nope. Slicer mode both decks operate independently. I wonder why VDJ is triggering samples 1-8 from both decks and not allowing me to split 1-8 and 9-12.
 

Posted Mon 15 Apr 13 @ 11:50 am
I think I almost sussed it.
 

Posted Mon 15 Apr 13 @ 12:20 pm
you probably need to change the LED mapping as well if they are separate in the mapper. Also for some stupid reason the default behaviour of effects is that they are linked between the decks until both sides effects are activated at the same time, you may run into this
 

Posted Mon 15 Apr 13 @ 1:21 pm
OK I managed to split FX to pads 1-8 on the left deck and samples 1-8 on the right deck. However I broke all other modes in the process so hot cue's, auto loop and loop roll no longer work. A little help perhaps?

pad 1

var 'mode' 1 ? device_side 'left' ? effect 'flanger' active while_pressed : var 'mode' 1 ? device_side 'right' ? var 'shift' ? sampler 1 rec & sampler 1 select : sampler 1 play_stop while_pressed & sampler 1 select : var 'mode' 2 ? var 'mode' 2 ? loop 0.125 : device_side 'left' ? var 'mode' 3 ? loop_roll 0.125 while_pressed : device_side 'left' ? var 'shift' ? delete_cue 1 : device_side 'left' ? hot_cue 1
 

Posted Mon 15 Apr 13 @ 1:44 pm
Almost there with the above. You have a problem with the LED's still though. Normally it lights yellow when cue is on and weak red for nothing. Let me paste the old defaults for LED_PAD1 for you to check against.

var 'mode' 0 ? hot_cue 1 ? get constant 0.62 : get constant 0.51 : var 'mode' 1 ? var 'shift' ? deck active sampler 1 rec ? blink ? get constant 0.12 : get constant 0.01 : sampler 1 play ? get constant 0.12 : get constant 0.01 : sampler 1 play ? get constant 0.12 : get constant 0.01 : loop 0.125 ? get constant 1.0 : get constant 0.9

I am eating some soup so may be distracted ;)
 

Posted Mon 15 Apr 13 @ 2:09 pm
OK I am quite happy with how things are for the moment. Having the ability to have multiple effects to keys is awesome (flanger + autocut for example)!

The LED's work as expect other than the samples lighting up on deck 1. Maybe you will figure that out. I still would love a toggle across pads 1-8 though so I can have a full set of 16 samples and 16 effects etc. Something to look into later eh? :)
 

Posted Mon 15 Apr 13 @ 2:56 pm
OK I have hit a snag. The effects pads only work on deck 1 when it's playing. I guess the device_side 'left' means it only applys the effects to the deck it's assigned to. Hmm. I can use deck 3 and toggle but that's awkward.
 

Posted Mon 15 Apr 13 @ 3:48 pm
Still not able to trigger effects on both deck 1 and deck 2. Deck 1 effect lights on the effect section in VDJ. I need both to light.

EDIT: fixed it.

var 'mode' 1 ? device_side 'left' ? effect 'dfv flanger' active while_pressed & deck 2 effect 'dfv flanger' active while_pressed : var 'shift' ? deck active sampler 1 rec & sampler 1 select : sampler 1 play_stop while_pressed & sampler 1 select : var 'mode' 2 ? loop 0.125 : var 'mode' 3 ? loop 0.125 while_pressed : var 'shift' ? delete_cue 1 : hot_cue 1
 

Posted Tue 16 Apr 13 @ 6:46 am
69%