Quick fire examples, want to use script as a value, just wrap the script in ` `
Artist contains `deck master get_artist` FIND MORE BY CURRENT ARTIST
Bpm > `deck master get_bpm & param_multiply 0.48` and Bpm < `deck master get_bpm & param_multiply 0.52` ~0.5* BPM MATCH
key is `deck master get_key` EXACT KEY MATCH
key is `deck master get_harmonic` EXACT KEY MATCH [vdj figures out key from harmonic]
All very straight forward, lets do something interesting
A circle of 5ths, AKA +1 on the Camelot wheel, AKA harmonic
First we'll do the "I hate myself method" in steps
key is `deck master get_harmonic & param_equals "01A" ? get_text "02A" : `
if harmonic is 01A then +1 is 02A, because we're inside ` ` the filter is given what the script inside evaluates to, so get_text the value you want.
So go nuts, there's only 24 possibilities
key is `deck master get_harmonic & param_equals "01A" ? get_text "02A" : deck master get_harmonic & param_equals "02A" ? get_text "03A" : ...`
do that for 01-12 for A and carry on for 01-12 B and that's it, it's ugly but it works.
If you do it like that you'll get bored by your 6th copy paste, hopefully bored enough to think "there has to be a better way"
So a better way then,
how do we add 1 to the harmonic and for the case of 12X loop round to 1? we best try some stuff, [play along at home because I'm not going to give you the final filter]
load up a track with any key and open your custom_button editor, use this as the name
`get_harmonic`
that gives our current harmonic, not what we want yet, try adding 1
`get_harmonic & param_add 1`
same result, that doesn't work, try the other way of adding
`param_add get_harmonic 1`
different result, wrong answer, it's put a 1 in front of our harmonic
it was understood as a string, let's try cast it as an integer then add 1
`get_harmonic & param_cast 'integer' & param_add 1`
well we added 1 but a few issues, and this depends on you starting harmonic as to what you see
first off obvious, we're missing the A or B
now if your starting harmonic was 09X, 10X or 11X that's the only issue you'll see
but if it was less than 09X you'll see you lost your leading zero. or if your start harmonic was 12X you now have 13
let's deal with the leading zero, param_cast '00' will cast a number with a fixed number of digits
`get_harmonic & param_cast 'integer' & param_add 1 & param_cast '00'`
that fixes our leading zeros issue, now to try add A or B with a query on the end
`get_harmonic & param_cast 'integer' & param_add 1 & param_cast '00' & get_harmonic & param_contains "A" ? param_add "A" : param_add "B"`
that doesn't work, go back a step can we actually add a letter to it, forget the query just try add a letter on the end
`get_harmonic & param_cast 'integer' & param_add 1 & param_cast '00' & param_add "P"`
we got an P there, must be the query at fault, let's try the query at the start and double up the script, one for A case one for B case
`get_harmonic & param_contains "A" ? get_harmonic & param_cast 'integer' & param_add 1 & param_cast '00' & param_add "A" : get_harmonic & param_contains "B" ? get_harmonic & param_cast 'integer' & param_add 1 & param_cast '00' & param_add "B"`
That works, now just the issue of starting with harmonic 12X gives 13X
this is where I'm not going to give you a copy paste
if we know get_harmonic & param_contains "A" ? is true, the only thing we need to know after that is get_harmonic & param_contains "12" ? if that's true we want 01A, and I already covered that in the long boring method, : if it's false then do the other stuff.
we've got to ask the same contains 12 question after get_harmonic & param_contains "B" ? as well, but that's all there is to it.
if you've done that right your custom_button name will be == starting harmonic +1
that custom button name is what you paste into a filter that starts
key is
one tiny difference though, custom_buttons know what deck they belong to, filters follow the selected deck unless told otherwise, so when you paste it in to the filter, just after the opening ` specify deck master just before the first get_harmonic
I've told you everything here except the answer explicitly, the whole jigsaw is built up into only a couple of separate pieces, just put them together, or use the horrible way.
Or if time is money for you, I can work on those terms too.
[wow that got lengthy, but to do scripting you have to put some effort in, there won't always be a copy paste solution given]
geposted Sun 05 Nov 23 @ 1:59 am
Hey yall, my name is Big King Zilla, I just started DJing on Twitch because I figured out how to DJ using virtual DJ with my wheelchair. I am physically disabled so it pretty awsome but im trying to figure out how to do some more complex scripts for the custom buttons for better transitions that are a little more elaborate not to simple. Right now I am trying to figure out how to eq_kill_low & filter 25% & effect_active 'reverb' & mix_now 16bt but I cant get the effects to turn off automatically after I transition . If anybody can help me out I would really appreciate it.
geposted Sat 11 Nov 23 @ 7:17 am
using a wait 16bt & then calling effect_active off would be easiest.
geposted Sat 11 Nov 23 @ 7:31 am
hi at all, i have this question: i have a playlist named “Sequencer” (in browser i have seen that is a file.m3u) and this is my script:
get_browsed_folder_path & param_cast & param_contains ‘Sequencer’ ? browser_remove : playlist_add
because only in Playlist Sequencer (or folder Sequencer?) i would remove songs…in other folders i would add songs in Automix..doesn’t work (i think problem is that “Sequencer” isn’t a folder, but is a Playlist
Can you help me with correct script? Thanks
get_browsed_folder_path & param_cast & param_contains ‘Sequencer’ ? browser_remove : playlist_add
because only in Playlist Sequencer (or folder Sequencer?) i would remove songs…in other folders i would add songs in Automix..doesn’t work (i think problem is that “Sequencer” isn’t a folder, but is a Playlist
Can you help me with correct script? Thanks
geposted Sun 12 Nov 23 @ 6:45 pm
check with a custom_button LED logic
get_browsed_folder_path & param_cast & param_contains 'Sequencer' ? on : off
does it work there? also check capitalisation, also check your ' marks, vdj does not like curved ' " like you have typed here.
get_browsed_folder_path & param_cast & param_contains 'Sequencer' ? on : off
does it work there? also check capitalisation, also check your ' marks, vdj does not like curved ' " like you have typed here.
geposted Sun 12 Nov 23 @ 7:47 pm
yes, correct thanks! my ‘ wasn’t right, now it works
geposted Sun 12 Nov 23 @ 11:43 pm
hi at all! script: linein 3 get_haslinein ? on :off
doesn’t work :( i would know if is there only linein 3 in audio setup
can you help me? thanks
doesn’t work :( i would know if is there only linein 3 in audio setup
can you help me? thanks
geposted Wed 06 Dec 23 @ 5:34 pm
probably not possible. get_haslinein ? on : off is the best there is.
geposted Wed 06 Dec 23 @ 10:04 pm
Hi vdjscript Community,
I'm seeking advice on a specific VDJScript challenge. My goal is to apply the same type of filter effect on different stems within a track, but with varying intensities for each stem. For example, applying a filter to the kick drum stem at one intensity level while applying a different intensity of the same filter to the vocal stem simultaneously. I'm considering whether the 'effect_stems' command can be combined with the 'filter' command for this purpose. Has anyone successfully achieved this kind of independent stem-specific filter control? If so, how did you script it?
Any advice or shared experiences with similar scripting challenges would be greatly helpful.
Thanks a lot!
I'm seeking advice on a specific VDJScript challenge. My goal is to apply the same type of filter effect on different stems within a track, but with varying intensities for each stem. For example, applying a filter to the kick drum stem at one intensity level while applying a different intensity of the same filter to the vocal stem simultaneously. I'm considering whether the 'effect_stems' command can be combined with the 'filter' command for this purpose. Has anyone successfully achieved this kind of independent stem-specific filter control? If so, how did you script it?
Any advice or shared experiences with similar scripting challenges would be greatly helpful.
Thanks a lot!
geposted Thu 07 Dec 23 @ 12:45 am
native fx are limited to one instance of that effect per deck. Truth be told so are non native fx BUT you can rename them to dodge that limitation.
SBDJ has a solid filter fx available
https://forum.sbdj.co.uk/topic/2/sbdj-filter-v2-0-released
install, make several copies, give each a name that makes sense like
filterRhythm
then call them like so
effect_active rhythm filterRhythm
and control like so
effect_slider rhythm filterRhythm 1 20%
or show the gui
effect_show_gui Rhythm filterRhythm
SBDJ has a solid filter fx available
https://forum.sbdj.co.uk/topic/2/sbdj-filter-v2-0-released
install, make several copies, give each a name that makes sense like
filterRhythm
then call them like so
effect_active rhythm filterRhythm
and control like so
effect_slider rhythm filterRhythm 1 20%
or show the gui
effect_show_gui Rhythm filterRhythm
geposted Thu 07 Dec 23 @ 1:18 am
Hi Locodog,
Thank you for your insightful response. I appreciate the clarity you've provided about the limitations of native effects and the workaround with non-native effects. The suggestion to use SBDJ's filter fx, make copies, and rename them for individual stem control seems like a practical solution to my challenge. I will definitely try implementing this method and see how it works out.
Thanks again for your advice and for sharing your expertise!
Thank you for your insightful response. I appreciate the clarity you've provided about the limitations of native effects and the workaround with non-native effects. The suggestion to use SBDJ's filter fx, make copies, and rename them for individual stem control seems like a practical solution to my challenge. I will definitely try implementing this method and see how it works out.
Thanks again for your advice and for sharing your expertise!
geposted Sun 10 Dec 23 @ 12:27 pm
effect_stems applies the active effects on the standard effect slots to the specified stem.
Specific effects on specific stems follows the syntax I posted above, here's a video proving just that.
Specific effects on specific stems follows the syntax I posted above, here's a video proving just that.
geposted Sun 10 Dec 23 @ 10:56 pm