Quick Sign In:  

Forum: General Discussion

Topic: Complete my Sync lock script? - Page: 1

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

I'm trying to replica Traktor pro's sync lock function with master/slave pitch. I do NOT want beatlock or pitchlock involved.

This is how far I've gotten. Currently one deck at a time can be slave. How can I make it so several decks can be slave at the same time?

Sync:
sync & get_deck 1 ? toggle '$syncLockDeck1' : get_deck 2 ? toggle '$syncLockDeck2' : get_deck 3 ? toggle '$syncLockDeck3' : get_deck 4 ? toggle '$syncLockDeck4' :

LED_sync
device_side 1 ? var '$syncLockDeck1' ? on : :
device_side 2 ? var '$syncLockDeck2' ? on : :
device_side 3 ? var '$syncLockDeck3' ? on : :
device_side 4 ? var '$syncLockDeck4' ? on : :off

Pitch:
var '$syncLockDeck4' 0 ? var '$syncLockDeck3' 0 ? var '$syncLockDeck2' 0 ? var '$syncLockDeck1' 0 ? pitch 'dual' : masterdeck_auto 1 deck active & pitch 'dual' & deck 1 sync while_pressed : masterdeck_auto 1 deck active & pitch 'dual' & deck 2 sync while_pressed : masterdeck_auto 1 deck active & pitch 'dual' & deck 3 sync while_pressed : masterdeck_auto 1 deck active & pitch 'dual' & deck 4 sync while_pressed



Thanks for your help :)
 

Posted Thu 21 Jan 21 @ 2:39 pm
I see several wrong scripts here...
It "may" work out of pure luck but it can't be expanded as it is.

The real question though is why you don't want to use "pitchlock" (even as a part of a bigger script) as that's what will really give you the best simulation of Traktor's sync method ?

If you can answer that question, I can give you some better scripts
 

Posted Fri 22 Jan 21 @ 2:25 pm
Much appreiciated

Why pitch_lock isn't ideal for me:

When pitch_lock is activated it steers the pitch on all decks, and whichever deck you are adjusting the pitch fader on, that deck will be able to steer the tempo for all decks. It doesn't take notice if the deck that you are adjusting the pitch on is master or not.

Only the master deck should be able to adjust the pitch for all the synced decks.
 

Posted Sat 23 Jan 21 @ 9:05 pm
locodogPRO InfinityModeratorMember since 2013
just don't then... you're saying I don't want this to happen, then doing the thing that will make it happen, pitchlock follows all decks, if you don't want pitchlock on the decks you're going to change, turn pitchlock off.
 

Posted Sat 23 Jan 21 @ 10:19 pm
It's a matter of precaution
 

Posted Sat 23 Jan 21 @ 10:43 pm
Well, you could query the masterdeck then and decide to not alter the pitch.

If you enable "autoPitchLock" option then you can simply remap your pitch slider as:
masterdeck ? pitch : nothing

^This code will prevent the use of pitch slider on all "slave" decks (even if they are not in sync with masterdeck)

If you want to be able to control pitch in slave decks when they are not in sync then you can use:
masterdeck ? pitch : pitch_lock ? nothing : pitch

^This code will allow you to control pitch on a slave deck until it is in sync with master. After that, moving the pitch slider will have no effect.

Also:
The remapping of SYNC you've done is not necessary to be done with all that complexity (not to mention that it's wrong)
The easiest remapping would be:
LED_SYNC: masterdeck
SYNC: holding 500ms ? sync : masterdeck
OR:
SYNC: holding 500ms ? masterdeck : sync

PS: For most users and most cases, even setting the masterdeck "manually" is not necessary. VirtualDJ is smart enough to handle automatic masterdeck detection correctly for 90+% of cases.
So, if you try the above suggestions with pitch slider you may not need to set a masterdeck manually at all
 

Posted Sat 23 Jan 21 @ 10:49 pm
You're right! Thanks for clearing it up for me. :)

Changed it to beatlock instead.

Sync:
beatlock

Pitch:
masterdeck ? pitch : beatlock ? nothing : pitch
 

Posted Sun 24 Jan 21 @ 12:20 am
Found one concern when I use beatlock.
If I forget to turn beatlock off on the masterdeck and press play on another deck. The masterdeck gets sync-adjusted.

This is what I've tried:

Play_pause:
Play_pause & masterdeck ? beatlock 0

the led turns off but not beatlock itself. Led turns on again when not master.

how do I get beatlock turned off permanent when pressed?
 

Posted Sun 24 Jan 21 @ 5:01 pm
NicotuxHome userMember since 2014
- beatlock is deck specific
- tests often need both cases
- once engaged (by play_pause) beatlock will go on up to end, even you disable beatlock during it is active
so that
masterdeck ? beatlock off & play_pause : play_pause

 

Posted Sun 24 Jan 21 @ 5:48 pm
play_pause on the new deck should turn beatlock off on masterdeck
 

Posted Sun 24 Jan 21 @ 6:45 pm
NicotuxHome userMember since 2014
so that this is the opposite ^^ more difficult (need to specify decks)
masterdeck ? play_pause : deck master beatlock off & deck default play_pause
 

Posted Sun 24 Jan 21 @ 7:04 pm
Tried the script but pressing play on the new deck pauses master.

Do I need to specify deck in the bar above action? Never done that, if that is what you mean
 

Posted Sun 24 Jan 21 @ 8:23 pm
NicotuxHome userMember since 2014
There is no other way for the script to pause the master deck but using it on master deck
unless you call master deck something else but master deck
From where and how are you using this ?
 

Posted Sun 24 Jan 21 @ 8:53 pm
If I forget to turn beatlock off on the masterdeck before I press play on another deck. The masterdeck gets synced.

Is there any way to prevent this? :)
 

Posted Sun 24 Jan 21 @ 9:04 pm
I put a beatlock off -script on a global browser scroll knob.

Are there more things I can do?

If I could make a local button global in some way that would be great.
 

Posted Mon 25 Jan 21 @ 4:20 pm
You can use "deck all" before the action...
e.g: deck all loop
 

Posted Mon 25 Jan 21 @ 10:01 pm
This is what I want e.g deck 2 playbutton to do:
Play_pause & Deck 1 masterdeck ? Beatlock 0
 

Posted Mon 25 Jan 21 @ 11:27 pm
Just type "deck" everywhere then ?
I assume that you want this:

action_deck 1 ? deck 2 masterdeck ? deck 2 beatlock off & deck 1 play_pause : deck 1 play_pause : action_deck 2 ? deck 1 masterdeck ? deck 1 beatlock off & deck 2 play_pause : deck 2 play_pause
 

Posted Tue 26 Jan 21 @ 8:03 am
NicotuxHome userMember since 2014
That's exactly what the script does. It needs masterdeck_auto to be OFF
masterdeck ? play_pause : deck master beatlock off & deck 0 play_pause

if the script stays in a button affected to a specific deck and masterdeck_auto is turned OFF it will work
Of course if masterdeck_auto is ON clicking the button selects the default deck as master before the script to execute

PhantomDeejay script to have a single button working for both decks limited to 2

all these scripts go on loading track sync to masterdeck depending on beatlock
 

Posted Tue 26 Jan 21 @ 8:51 am
Still I believe that beatlock is not the real answer here.
I don't want to sound smart, but instead of trying to replicate one way of working, you can always put some minor effort to learn working with a slightly different way.

autoBPMMatch, autoPitchLock and quantize_all (or smart_play) are powerful enough actions to achieve a way of working similar to other programs.

Example:
With autoPitchLock and smart_play enabled:
When you press play on a non master deck, it will instantly sync the deck with the master, as long as BPM difference can be covered by current pitch range.
Then since autoPitchLock is on, the decks pitch will also lock.
You can modify the script of the pitch slider with the code I gave above if you wish.
This means that only the pitch slider of the master deck will be able to modify the pitch of all the decks.
Since "smart_play" syncs only when you start playback you don't have to worry about turning it off.
Also you can use the jog to pitch bend any deck in case CBG is slightly off (something that you can't do with beatlock since it will drag both decks)

There are also other ways to do it as well. I won't expand on them.
I'm just trying to say that with a little effort you may find an alternative way that works better than replicating a particular behavior.
 

Posted Tue 26 Jan 21 @ 9:40 am
95%