I have a question about this script I've been using:
toggle '$SyncMode' & var '$SyncMode' ? setting 'autoBpmMatch' 'always' & deck all quantize_all on & deck all auto_pitch_lock on & deck all smart_play on & (masterdeck ? nothing : sync) : setting 'autoBpmMatch' 'no' & deck all quantize_all off & deck all auto_pitch_lock off & deck all smart_play off & deck all sync off
Sometimes, when repeatedly turning SyncMode on and off during live performances, the master deck would somehow start syncing or drifting in BPM, making the track speed up.
This was confusing because I was protecting the master deck in the script.
Could you please take a look and tell me which command might be causing this behavior? What could be responsible for the BPM drift even though the master deck is protected?
Thanks!
Posted 2 days ago @ 5:53 pm
The commands that can affect the master deck (despite your protection) are the deck all ... ones, especially auto_pitch_lock and quantize_all.
Your protection (masterdeck ? nothing : sync) only guards the explicit sync action. Everything else uses deck all, which applies to every deck including the master. In VirtualDJ, certain related actions are also effectively global.
Most likely culprits
deck all auto_pitch_lock on (and the lack of an explicit pitch_lock off when turning the mode off)
auto_pitch_lock automatically engages pitch_lock whenever BPMs match.
pitch_lock is a global action — it links the pitch sliders of all decks, no matter which deck you trigger it from.
When you repeatedly toggle the mode, re-enabling auto_pitch_lock can cause virtualdj to re-evaluate the lock. If any non-master deck is slightly off (or if residual state remains), the master can get pulled toward it, producing the BPM drift / speed-up you describe.
Your “off” branch only does auto_pitch_lock off. It does not explicitly do pitch_lock off. Residual locking can therefore persist or re-trigger incorrectly on the next “on” cycle.
deck all quantize_all on
Also i believe that quantize_all can override other settings and force BPM matching / sync-like behavior even when autoBPMMatch, smartPlay, etc. are disabled.
It is applied to every deck (including the master). When combined with the other auto features and toggled repeatedly, it can contribute to the unwanted matching.
deck all smart_play on
This is Auto Sync on Play. Together with the above, it reinforces automatic alignment behavior that is not protected by the masterdeck check.
setting 'autoBpmMatch' 'always' is less likely to be the direct cause of live drift on an already-playing master (it mainly affects newly loaded tracks), but it interacts with the other settings.
deck all includes the master.
pitch_lock / auto_pitch_lock affect all decks globally.
Running sync on the master itself makes the master sync to the other deck (which is why the (masterdeck ? nothing : sync) guard exists).
The other auto/quantize features can still induce matching or locking that the single guard does not prevent.
When you toggle the mode on and off repeatedly, the combination of re-applying these global/all-deck settings creates inconsistent lock/match state that eventually moves the master deck’s pitch.
try this script and see if it works better ( i am not an expert like locodog or Adion but you can try this)
toggle '$SyncMode' & var '$SyncMode' ? setting 'autoBpmMatch' 'always' & deck all quantize_all on & deck all auto_pitch_lock on & deck all smart_play on & (masterdeck ? nothing : sync) : setting 'autoBpmMatch' 'no' & deck all quantize_all off & deck all auto_pitch_lock off & pitch_lock off & deck all smart_play off & deck all sync off
Your protection (masterdeck ? nothing : sync) only guards the explicit sync action. Everything else uses deck all, which applies to every deck including the master. In VirtualDJ, certain related actions are also effectively global.
Most likely culprits
deck all auto_pitch_lock on (and the lack of an explicit pitch_lock off when turning the mode off)
auto_pitch_lock automatically engages pitch_lock whenever BPMs match.
pitch_lock is a global action — it links the pitch sliders of all decks, no matter which deck you trigger it from.
When you repeatedly toggle the mode, re-enabling auto_pitch_lock can cause virtualdj to re-evaluate the lock. If any non-master deck is slightly off (or if residual state remains), the master can get pulled toward it, producing the BPM drift / speed-up you describe.
Your “off” branch only does auto_pitch_lock off. It does not explicitly do pitch_lock off. Residual locking can therefore persist or re-trigger incorrectly on the next “on” cycle.
deck all quantize_all on
Also i believe that quantize_all can override other settings and force BPM matching / sync-like behavior even when autoBPMMatch, smartPlay, etc. are disabled.
It is applied to every deck (including the master). When combined with the other auto features and toggled repeatedly, it can contribute to the unwanted matching.
deck all smart_play on
This is Auto Sync on Play. Together with the above, it reinforces automatic alignment behavior that is not protected by the masterdeck check.
setting 'autoBpmMatch' 'always' is less likely to be the direct cause of live drift on an already-playing master (it mainly affects newly loaded tracks), but it interacts with the other settings.
deck all includes the master.
pitch_lock / auto_pitch_lock affect all decks globally.
Running sync on the master itself makes the master sync to the other deck (which is why the (masterdeck ? nothing : sync) guard exists).
The other auto/quantize features can still induce matching or locking that the single guard does not prevent.
When you toggle the mode on and off repeatedly, the combination of re-applying these global/all-deck settings creates inconsistent lock/match state that eventually moves the master deck’s pitch.
try this script and see if it works better ( i am not an expert like locodog or Adion but you can try this)
toggle '$SyncMode' & var '$SyncMode' ? setting 'autoBpmMatch' 'always' & deck all quantize_all on & deck all auto_pitch_lock on & deck all smart_play on & (masterdeck ? nothing : sync) : setting 'autoBpmMatch' 'no' & deck all quantize_all off & deck all auto_pitch_lock off & pitch_lock off & deck all smart_play off & deck all sync off
Posted 8 hours ago
Probably not related to your issue, but also keep in mind that deck all affects all the commands following it, so with 4 decks you are turning off smart_play 64x. (4x4x4)
This can actually cause bugs if something following it is not explicitly telling the on or off state, since it would just cause a double toggle.
Either wrap it in brackets or keep just one deck all per side of the if then else side.
This can actually cause bugs if something following it is not explicitly telling the on or off state, since it would just cause a double toggle.
Either wrap it in brackets or keep just one deck all per side of the if then else side.
Posted 6 hours ago
Thanks guys for your help.
I have another question. In VirtualDJ, there is only one Sync mapping, even when using a 4-deck controller. So you have to write one script that handles all four decks, and specify in the script what each deck should do.
I managed to separate the commands so that each deck has its own toggle for Smart Play, Quantize and the other features. This way, each deck can control these features independently.
But unfortunately, I ran into a problem with Pitch Lock. It seems to be a global setting, so when I turn it on or off for one deck, it affects all the other decks as well.
I tried many ways to make Pitch Lock work separately for each deck, but couldn't find a solution.
I really wish Pitch Lock could be separated per deck, so I can have a fully independent Sync toggle for each deck, controlling Smart Play, Pitch Lock and Quantize together.
I managed to do this with all the other commands, but Pitch Lock is the only one that remains global.
Is there any way to make Pitch Lock work independently for each deck through scripting?
Thanks again for your help!
I have another question. In VirtualDJ, there is only one Sync mapping, even when using a 4-deck controller. So you have to write one script that handles all four decks, and specify in the script what each deck should do.
I managed to separate the commands so that each deck has its own toggle for Smart Play, Quantize and the other features. This way, each deck can control these features independently.
But unfortunately, I ran into a problem with Pitch Lock. It seems to be a global setting, so when I turn it on or off for one deck, it affects all the other decks as well.
I tried many ways to make Pitch Lock work separately for each deck, but couldn't find a solution.
I really wish Pitch Lock could be separated per deck, so I can have a fully independent Sync toggle for each deck, controlling Smart Play, Pitch Lock and Quantize together.
I managed to do this with all the other commands, but Pitch Lock is the only one that remains global.
Is there any way to make Pitch Lock work independently for each deck through scripting?
Thanks again for your help!
Posted an hour ago
No, pitch_lock is a global action.
For most users it makes sense to be global. You lock all the pitch sliders so that you can adjust the BPM/Pitch of all decks by using one (any) pitch slider.
Personally I don't see the benefit of having it separate either.
I mean there are 2 cases:
1) You have all decks (2 or more) synced together. Therefore if you lock pitch, and you use any pitch slider you control the speed of all decks at the same time. In this scenario I can't think of a case where you would want to alter the speed of let's say only 2 decks while the other decks remain unaffected and therefore they now get out of sync with the rest decks.
2) You only have some decks synced together. In this case one would lock the pitch only to control the synced decks together. The rest of the decks would also change pitch, but since they are not synced I don't think it really matters ?
Anyway, that's how I understand the function. As a way to temporarily* change the pitch/tempo of all the decks that are synced together, without losing their sync.
PS: By temporarily I mean that pitch_lock, unlike "smart_play, quantize_all, smart_cue" e.t.c. is an action that I would turn on only for a very limited amount of time, just to do what I need and then I would immediately turn it off again.
For most users it makes sense to be global. You lock all the pitch sliders so that you can adjust the BPM/Pitch of all decks by using one (any) pitch slider.
Personally I don't see the benefit of having it separate either.
I mean there are 2 cases:
1) You have all decks (2 or more) synced together. Therefore if you lock pitch, and you use any pitch slider you control the speed of all decks at the same time. In this scenario I can't think of a case where you would want to alter the speed of let's say only 2 decks while the other decks remain unaffected and therefore they now get out of sync with the rest decks.
2) You only have some decks synced together. In this case one would lock the pitch only to control the synced decks together. The rest of the decks would also change pitch, but since they are not synced I don't think it really matters ?
Anyway, that's how I understand the function. As a way to temporarily* change the pitch/tempo of all the decks that are synced together, without losing their sync.
PS: By temporarily I mean that pitch_lock, unlike "smart_play, quantize_all, smart_cue" e.t.c. is an action that I would turn on only for a very limited amount of time, just to do what I need and then I would immediately turn it off again.
Posted 4 minutes ago





