Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: VDJ mapper script: how to refer to inactive deck
Hello,
I am trying to improve a device mapper (AKAI LPD8) I devloped for mixing with the little controller, I was able to map it almost correctly, but I am stuck on a point.

- I am using a know as crossfader so when it is turned all to left the left deck will play 100%, like it is natural to expect. The action mapped to the knob is simply "crossfader" and i works fine.

- Now I would like to use a button as a loop ON/OFF for the INACTIVE deck, by "inactive" I mean the deck getting the least volume from the crossfader at the moment the button gets pressed. So if I have deck left playing (crossfader all left) I expect the loop to activate on the right deck, which I am prelistening to.

I mapped this button to action "loop" and it works most of the times, but if you move he crossfader you will see that the side on which the loop activates seems to be always the same, probably the crossfader doesn't actually change the deck on which the "loop" command operates.

I would like to do something like

deck ( get_active_deck()=='left' ? 'right' : 'left' ) & loop

but it's not quite clear how to get the active deck, it's not clar if such a "get active deck" function exists and if it returns left or right or 1 or 2 or what else, I was not able to see anything really using the "debug" verb and I got rather confused.

If anybody could shed some light on this, I could complete the emapper and contribute it to the community

 

geposted Fri 20 Oct 23 @ 4:38 pm
locoDogPRO InfinityModeratorMember since 2013
Easy way
deck 1 masterdeck ? deck 2 loop : deck 1 loop

or there's a new verb in Early Access [set_deck], a longer more confusing script, but can be useful to know, if you get complicated
deck active get_deck & param_mod 2 & param_add 1 & param_cast & set_deck & loop

active deck is the masterdeck, get the deck number
if 1; apply mod 2, which returns 1 add 1, cast that 2 to set_deck
if 2, apply mod 2 returns 0 & add 1, cast that 1 to set_deck
 

geposted Fri 20 Oct 23 @ 5:05 pm