Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Get the duration of one beat, or repeat_start after one beat?
I am creating an echo out effect using VDJScript that turns on echo, waits a bit, then stops the track (and turns off echo again):

padfx "echo" 70% 62% "TRAILING:on" & repeat_start 'delayedstop' 2000ms 1 & pause & padfx "echo"

But I'd rather the delay were a single beat, rather than a fixed 2000ms, as it throws the timing and sometimes throws odd artefacts into the echo. I have tried just adding '1' but that seems to be interpretted as 1ms. Can I get the ms of a single beat to pass to `repeat_start`?

Also, probably nigh impossible, could we do a `padfx "backspin" X%` a single beat length? 100% is 12 seconds, so we'd need to pass it `beatlength_ms/120`. (Actually a fraction less, as 0% is 0.1s, but close enough.)

Finally, fairly unrelated, but anyone else think it'd be good to have an 'scratchAcceleration' option that determines the variability of speed on the Backspin and Scratch DNA functions? For longer than a beat they sound a bit flat to my ears as the speed plateaus, whereas real scratching or backspins are almost never constant speed (more constant acceleration). Just an idea..
 

Posted Wed 21 Oct 20 @ 12:47 pm
You can do repeats based on beats, but it's not really built in, so you basically have the repeat very short, and then look at when the beat indicator switches
Locodog is the master of those kind of scripts :)

For instance I use this script to have my Shaders change within a shaders group every 16 beats (and yes it was partly stole from a locodog script :) )

repeat_start_instant 'AS' 25ms & deck master get_beat_bar 16 & param_smaller 0.5 ? var 'AOVdoOnce' 0 ? effect_string 'audioonlyvisualisation' 1 +1 & set 'AOVdoOnce' 1 : nothing : set 'AOVdoOnce' 0
 

Posted Wed 21 Oct 20 @ 1:14 pm
'Could try this, didnt test, but something along

padfx "echo" 70% 62% "TRAILING STOP:on" & param_multiply "get_bpm & param_1_x" 60000 & param_cast "ms" & repeat_start 'delayedstop' & pause & padfx "echo" & repeat_stop "delayedstop"


param_multiply "get_bpm & param_1_x" 60000 should get the time of a beat (in milliseconds)


(only issue is that the trailing should probably be on also after you turn off the padFX, so might leave that out, and turn trailing on in the FX settings instead. PadFX are temporary fx settings)
 

Posted Wed 21 Oct 20 @ 2:07 pm
locoDogPRO InfinityModeratorMember since 2013
I remember things can get sketchy when you cast a time to a RSI, I can't remember exactly what, something like the cast value becomes the implicit and it gets everywhere.

@techtitch why not use the echo out fx [there might be a reason, but maybe you forgot it exists]

let me go digging I've got a single beat capture script somewhere
 

Posted Wed 21 Oct 20 @ 2:50 pm
Wait.....what?! @locodog I have loop out, but don't see an echo out effect? Are there hidden effects?

This is really handy anyway though, thank you! I want to do some synced brake and backspin effects too.

Also handy for getting my head round how values are retrieved and passed down the chain - sort of a stack? Rune your comments clarify several things that were baffling me thank you! Your code worked perfectly out of the box. I am really inspired by padfx with repeat_starts!
 

Posted Wed 21 Oct 20 @ 3:02 pm
Yes, an Echo Out exists. You need to install it via Add-Ons tab on settings

Also this was my "echo out" script before:
padfx 'echo' 90% 70% 11% 75% 'Mute Source:on'
 

Posted Wed 21 Oct 20 @ 3:19 pm
locoDogPRO InfinityModeratorMember since 2013
*edit insert, oh yeah mute source, I keep forgetting that got fixed*

echo out, check for it in extensions, it's a native fx but needs installing

backspin time duration is tricky because it's not linear, it's either logarithmic or quadratic
but you could do this
effect_active 'backspin' & padfx "echo" 70% 62% "TRAILING STOP:on" & param_multiply "get_bpm & param_1_x" 60000 & param_cast "ms" & repeat_start 'delayedstop' & pause & padfx "echo" & repeat_stop "delayedstop" & effect_active 'backspin' off


I've also got this that watches for manual backspins, with a little gain correction
repeat_start 'CatchSpin' ? on & repeat_stop 'CatchSpin' : off & set 'howMany' 0 & set 'trackT' `get_time 'elapsed' 44100` & repeat_start 'CatchSpin' 25ms & param_bigger "get_time 'elapsed' 44100" "get_var 'trackT'" ? set 'trackT'  `get_time 'elapsed' 44100` & var 'howMany' 2 ? gain -22% & cycle 'howMany' 1000 & effect_button 'echo' 2 1 & effect_active "echo" & set 'beatvar' `get_bpm & param_1_x & param_multiply 60000` & get_var 'beatvar' & param_cast "ms" & repeat_start 'rsiOnebeat' & effect_active 'echo' off & pause & repeat_stop 'rsiOnebeat' : cycle 'howMany' 1000 : set 'trackT' `get_time 'elapsed' 44100` & var_smaller 'howMany' 3 ? set 'howMany' 0 : gain +22% & set 'howMany' 0


Also sync'd brake, wouldn't slipbrake8 do the job?
 

Posted Wed 21 Oct 20 @ 3:19 pm
Are those extra two parameters and switch in padfx 'echo' 90% 70% 11% 75% 'Mute Source:on' in the docs? - I was looking at the effect config but only see two?

I'd avoided the extensions misguidedly for fear of clogging up the processor with inefficient code, but I've downloaded some from the regulars on here to look at. Back spin beat length with echo wasn't what I expected, think I'm imagining with delay, and I've got all I need in this thread to experiment.

Enormous thanks, really appreciate all your time.
 

Posted Wed 21 Oct 20 @ 8:50 pm
techtitch wrote :
Are those extra two parameters and switch in padfx 'echo' 90% 70% 11% 75% 'Mute Source:on' in the docs? - I was looking at the effect config but only see two?.


Echo has 4 parameters (as used as percentage values above), and two buttons ("Mute Source", "Trailing Stop")
If you press the [+] button next to the effect, you'll see all the parameters and settings of any effect

Btw, if you leave the 2 buttons on, you can script things much easier, since Mute Source will as it imply mute the deck, so it doesnt matter when you activate pause or if the pause is applied at time of a beat etc :) Keeping it simpler


 

Posted Wed 21 Oct 20 @ 8:56 pm
I'm an idiot, sorry, huge thanks of course. Sorry and thanks again. Really not sure how I missed them.
 

Posted Wed 21 Oct 20 @ 8:58 pm
techtitch wrote :
Are those extra two parameters and switch in padfx 'echo' 90% 70% 11% 75% 'Mute Source:on' in the docs?

VirtualDJ action description wrote :
Activate/deactivate named effect with a single key. Effect parameters can be specified as well.
'padfx "echo" 40% 90%' to start/stop the echo effect with first parameter at 40% and second parameter at 90%. When the effect is stopped, the parameters return to their original values.
'padfx "echo" 40% 90% smart_pressed' smart_pressed works as a toggle when pressing the button shortly, or as a temporary while holding the button pressed
'padfx "echo" 40% 90% "TRAIL:on"' after the sliders, it is possible to add strings to disable or enable switch parameters by defining their name, a colon and "on" to enable or "off" to disable

So basically I just used values for all 4 sliders of echo effect (to set low and high pass)
 

Posted Wed 21 Oct 20 @ 8:58 pm
techtitch wrote :
I'm an idiot, sorry, huge thanks of course. Sorry and thanks again. Not sure how I missed them.


No worries ;-) hehe.. its all good.. thats what the forum is for, ask when stuck, or something wasnt immediately clear
 

Posted Wed 21 Oct 20 @ 9:04 pm
Oops sorry deleted, clicked quote but meant to edit.. Thanks
 

Posted Wed 21 Oct 20 @ 9:12 pm
For anyone else following this thread, I ended up building the following effects, should anyone want to use them. I didn't brake beat length as I wanted a slightly longer brake than beat length to fill the echo.

This is a kind of 'Spiral Out' - it engages the enigma jet at 1 beat (install from extensions) and flanger at 4 beat so you get an upwards overlapping thing, and then adds echo out and eq10 (also an extension) to taper the bass and treble. After the track stops and the trails peter out, the effects are reset and the deck paused. If you press the button again before the deck is paused, all the effects are released and the track continues playing. By some magic I don't understand the button flashes while the effects are in action.

padfx "enigma jet" 64% 64% & padfx "flanger" 55% 100% 93% 25% & padfx "echo out" 56% 82% 30% 60% & padfx "eq10" 0% 20% 35% 45% 45% 45% 45% 35% 20% 0% & repeat_start 'delayedstop' 9000ms & padfx "enigma jet"  ? pause & repeat_start 'delayedstop' 50ms & padfx "enigma jet"  ? pause & padfx "enigma jet" & padfx "eq10" & padfx "echo out" & padfx "flanger" & repeat_stop "delayedstop" : nothing


This is a brake echo, we've all probably got these.. It applies a slow brake, then half a second later adds echo, then half a second adds reverb and trims the frequency with the hp and lp filter (figured this might use less CPU than the eq10), then after another couple seconds wacks on a strong echo out trail and narrows the frequency a bit further. Like above after the trails end the effects are reset and the deck paused. If you press the button again before the deck is paused, all the effects are released and the track continues playing.

padfx "brakestart" 65% & repeat_start 'delayedecho' 500ms 1 & padfx "echo" 45% 40% 10% 50% "Mute Source:off" "Trailing Stop:off" & repeat_stop "delayedecho" & repeat_start 'delayedfx' 500ms 1 & padfx "reverb" 26% 68% 37% 29% "Wet Only:off" "Trailing Stop:on" & padfx "filter lp" 55% 71% & padfx "filter hp" 25% 71% & repeat_stop "delayedfx" & repeat_start 'delayedechoboost' 2000ms 1 & padfx "echo" 75% 40% 10% 50% "Mute Source:off" "Trailing Stop:on" & padfx "filter lp" 65% 71% & padfx "filter hp" 30% 71% & repeat_stop "delayedechoboost" & repeat_start 'delayedstop' 6000ms 1 & padfx "echo" ? padfx "echo" & padfx "reverb" & padfx "filter lp" & padfx "filter hp" & repeat_stop "delayedstop" : nothing
 

Posted Wed 28 Oct 20 @ 4:14 pm
Hola espero que estén muy bien!, estube leyendo atentamente con mi lector de pantaya porque soy invidente y e creado diferentes atajos de teclado o comandos para VDJ, pero no entiendo muchas cosas porque loss comandos están en inglés y yo ablo español. Si quiero un atajo que redusca el volumen a un 0% en un canal con una duración de 16 o 8 beats, como puedo hacerlo?, cuál sería el comando para que una acción ovedesca cada beat?, yo creé uno como esto:
fader' && effect_slider 'echo' 1 80% && effect_slider 'echo' 2 70% & effect_active 'echo' & Repeat_start 'waitforit' 1100ms 1 & Repeat_start 'waitforit' 100ms 20 & level -2
Si me funcionó pero quiero que el volumen se disminuya gradualmente a la velocidad del beat y no del tiempo porque un tema de 100 bpm no es lo mismo de 130 bpm. Espero puedan entenderme amigos.
 

Posted Fri 19 Nov 21 @ 12:11 am
me podrían traducir correctamente que significan cada uno de los comandos mas usados por favor?
repeat_start_instant
e visto que en lugar de 'this' ponen muchas otras cosas y no se que signifícan, como: 'waitforit'
'AS'
También quiero saver si es posible, que significa?:
get_beat_bar
param_smaller
'AOVdoOnce'
Gracias por su tiempo y aquí les dejo unos scratch que e editado para almenos dejar algo.

Scratch 1 compás

play & scratch_dna 'HaaGeA.GaHA.GdaFda.EADA'
play & scratch_dna 'EcaDcADA.GaFa.FAEA.EaDA'
play & scratch_dna 'GcaFcACA.HaGa.DAFA.EADA'
play & scratch_dna 'DADcAEA.BCEffECABCDEFGHa.BCEffECABCDEFGHa.FAEA'
play & scratch_dna 'BCEffECABCDEFGHa.EaDcAEA.BCEffECABCDEFGHa.EADA'

Scratch medio compás:

play & scratch_dna 'GaDbADA.FcAECA'
play & scratch_dna 'DAEafaDA.GADA'
play & scratch_dna 'IaHA.GAEA'
play & scratch_dna 'BCDEeECABCDEFGHa.EcADcA'
play & scratch_dna 'BCEffECABCDEFGHa.FaEA'
scratch_dna 'BCDEFECABCDEFGHa.FcADA'

Scratch 4 compás:

play & scratch_dna 'BCEffECABCDEFGHa.FaaEcADcA.BCEffECABCDEFGHa.EADA.FcAEcADcA.BCDEFGHaBDEffECA.EaDa.EcADcADcA.BCDEFGHaBDEffEDA.FAEA.EaDA.BCDEFECABCDEFGHa.DcADcA.BCDeFGHaBCDEFGHa.GaFcA.EADA'
play & scratch_dna 'FAEA.EaDA.BCDEFECABCDEFGHa.DcADcA.BCDeFGHaBCDEFGHa.GaFcA.EADA.BCEffECABCDEFGHa.FaaEcADcA.BCEffECABCDEFGHa.EADA.FcAEcADcA.BCDEFGHaBDEffECA.EaDa.EcADcADcA.EADcA'

yo hago mucho scratch en vivo y así me encargué de hacer algo similar! espero les sirba!
 

Posted Fri 19 Nov 21 @ 12:23 am
locoDogPRO InfinityModeratorMember since 2013
answered on facebook.
I understand using a screen reader and having to translate will make some scripts difficult to understand.
 

Posted Fri 19 Nov 21 @ 3:33 pm