Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: How to get a stem to automatically do a smooth crossfade between 2 deck by a button push?
Baldy68PRO InfinityMember since 2019
Since I only use stems for smooth transitions between songs and usually use the same few techniques I thought why not have a couple of preset automatic stem transitions mapped to a few buttons.

I have tried for example with filter 0% 32bt and filter 0% 10000ms But I can't even get the bass-stem/filter to move automatically smooth between 2 values. It always jump immediately to the predefined value.

I read the VDJ script for parameters and searched the forum but can't find any (probably) easy script examples. Anyone understands what I am after and can help me with a quick example or a link where to find the information?
 

Posted Fri 19 Jul 24 @ 1:10 pm
Baldy68PRO InfinityMember since 2019

 

Posted Fri 19 Jul 24 @ 2:49 pm
locoDogPRO InfinityModeratorMember since 2013
I wrote a couple of posts on automation, see them in script school thread
LINK
be sure to read the follow on link about using bt and variables in rsi scripts.
[an annoyance of being mod, links to page numbers take me to different pages than what you see, I have to contend with raised posts invisible to other users]

I'm not sure on your source for what you tried, but it looks made up, let me just state for fact, GPT or any LLMs are completely useless at writing script, so I wouldn't bother, you're literally wasting water even trying.

here's an example of automation of dials on 2 decks, it could be a little smarter but I'd be explaining further away than the core concept.

( action_deck 1 ? deck 2 filter 0.0 : deck 1 filter 0.0 ) & repeat_start rsiDialExample 0.125bt 256 & filter -0.001953125 & action_deck 1 ? deck 2 filter +0.001953125 : deck 1 filter +0.001953125


Why 0.125bt? faster than 1/8th can be inaccurate for faster bpms [rsi speed limit is like ~33ms, bpm > 227.3 @1/8th resolution are just (just) too fast for that 33ms limit]
why 256 ? 256 * 0.125 = 32 beats
why 0.001953125 ? 0.5 [the amount we want a dial to travel] / 256 = 0.001953125
 

Posted Fri 19 Jul 24 @ 4:33 pm
Baldy68PRO InfinityMember since 2019
Wow, it is always way more complicated then I think! This works but in opposite direction!
Let me explain further. When I press play on deck 1 the stems shall fade from full on on deck 2 to full on on deck 1 while fading away from deck 2.

I tried now by adding minus where there was plus little here and there, but I can't get it to work right. Of course, since I do not understand this script at all. I do not even understand how to learn this, lol.

But if I get one script working I should be able to just edit the stem-names for the others.
I think it also needs a check function or stop at max 50% since depending on where the knob are from beginning it can go over 50% which I never use. Thank you so far though! You are outstanding!

This is my script for play button for the moment:

deck 1 Play & sync & pitch_reset 32bt & ( action_deck 1 ? deck 2 filter 0.0 : deck 1 filter 0.0 ) & repeat_start rsiDialExample 0.125bt 256 & filter -0.001953125 & action_deck 1 ? deck 2 filter +0.001953125 : deck 1 filter +0.001953125

Edit, after further trial and error I can use your script for play button on deck 2, how do I reverse it for deck 1?
 

Posted Fri 19 Jul 24 @ 5:48 pm
locoDogPRO InfinityModeratorMember since 2013
deck 1 play & sync & pitch_reset 32bt & filter 0.0 & repeat_start rsidialexample 0.125bt 256 & filter +0.001953125 & action_deck 1 ? deck 2 filter -0.001953125 : deck 1 filter -0.001953125


as an upgrade
deck 1 play & sync & pitch_reset 32bt & filter 0.0 & repeat_start rsiDialExample 0.125bt 256 & ( deck 2 filter -0.001953125 ) & param_smaller 0.5 filter ? filter +0.001953125 : filter 0.5
 

Posted Fri 19 Jul 24 @ 6:07 pm
Baldy68PRO InfinityMember since 2019
Wow, now it is perfect, I thought I tryed to exchange those 2 plus and minuses, but I guess I failed at that even. Thank you so much!

Do you also know how to get the other black buttons to work as buttons? I think they are encoders? And also to get the pressure sensitivity to work on the white buttons would be awesome for effects I think. And also to get some LED's lighting up would be super!
I suspect this is even more complicated so if you can help me with this, beer money will come later this month :-)
 

Posted Fri 19 Jul 24 @ 6:17 pm
locoDogPRO InfinityModeratorMember since 2013
A push mk2 I'm not sure on how the LEDs work, they can be quite complicated.
to get full control [like LEDs] from a device like that you need to write a definition file.
 

Posted Fri 19 Jul 24 @ 6:50 pm
Baldy68PRO InfinityMember since 2019
Now I just replaced the filter text in the script with eq_low in the same script for same button and it is ignored. Is there a variable that is used so I need a new variable for every stem or what am I doing wrong now? Maybe I can add all stems somehow in same script since they will do the same thing? Except vocals..

deck 2 play & sync & pitch_reset 32bt & filter 0.0 & repeat_start rsiDialExample 0.125bt 256 & ( deck 1 filter -0.001953125 ) & param_smaller 0.5 filter !? filter 0.5 : filter +0.001953125 : filter 0.5 & eq_low 0.0 & repeat_start rsiDialExample 0.125bt 256 & ( deck 1 eq_low -0.001953125 ) & param_smaller 0.5 eq_low !? eq_low 0.5 : eq_low +0.001953125 : eq_low 0.5
 

Posted Fri 19 Jul 24 @ 7:14 pm
locoDogPRO InfinityModeratorMember since 2013
logically it never gets there,

you've got a not smaller query, a yes & a no reply, then a : so that's where the script ends. everything after the complete quey is ignored.
Don't just bash bits together because it might work but it might not work well and you won't learn much from it

deck 2 play & sync & pitch_reset 32bt & filter 0.0 & eq_low 0.0 & repeat_start rsiDialExample 0.125bt 256 & ( deck 1 filter -0.001953125 & eq_low -0.001953125 ) & ( param_smaller 0.5 filter !? filter 0.5 : filter +0.001953125 ) & ( param_smaller 0.5 eq_low !? eq_low 0.5 : eq_low +0.001953125 )


Try understand this, look at how it's different to your guess, and ask about about anything you don't understand.
 

Posted Fri 19 Jul 24 @ 7:31 pm
Baldy68PRO InfinityMember since 2019
Works flawless! Thx again! :-D
 

Posted Fri 19 Jul 24 @ 7:53 pm