Quick Sign In:  

Forum: General Discussion

Topic: Script School - Page: 38.85
locoDogPRO InfinityModeratorMember since 2013
auto_bpm_transition


Introduced in BUILD 7651 auto_bpm_transition
***Edit New additions in Early Access BUILD 7682***

What is it? How does it work? How do you script it?

So what it does; It changes the pitch of the calling deck to match the bpm of the other deck over a number of beats duration.

You call it simply with auto_bpm_transition , at that point it's on and it's going to run for the duration.

So how to set the duration?
the duration is a remembered setting [in settings...] autoBpmTransitionLength you can set it there to any positive number, I tested bigger numbers like 512, it seems there's no upper limit.
Remembered is good but going into settings is annoying, but we're in luck, another script was added to go with this script

auto_bpm_transition_options
with this we can set things that happen during the transition as well as the length

auto_bpm_transition_options length 16
that sets the length, params accepted any positive number.

auto_bpm_transition_options master_tempo
this will decide if master_tempo is used during the transition,
params accepted on or off

auto_bpm_transition_options loop
this will decide if a loop is used during the transition, the loop length used is the default loop size [the number you see on the skin for regular loops]
params accepted on or off

And a collection of stems to use in the transition buttons
auto_bpm_transition_options stems vocal
auto_bpm_transition_options stems instru
auto_bpm_transition_options stems bass
auto_bpm_transition_options stems drums

params accepted on or off
on means use this stem, off means mute this stem

***Edit New in Early Access BUILD 7682
auto_bpm_transition_options autostart
params accepted on or off
this will start the other deck when you start the transition

auto_bpm_transition has extra optional parameter to select target bpm 'source_original', 'target_original' or 'target_current'
auto_bpm_transition 'target_current'
auto_bpm_transition 'target_original'
auto_bpm_transition 'source_original'
***


Ok so a real example, I want it all ready to go on one button, I want a 16 beat transition, with master_tempo off, with a loop of 4 beats long, with everything but the vocals muted, I want it to match the other deck's current bpm, I want the other deck to start with the transition and I want it to go instantly

Just list it all

auto_bpm_transition_options length 16 & auto_bpm_transition_options master_tempo off & auto_bpm_transition_options loop on & auto_bpm_transition_options stems vocal on & auto_bpm_transition_options stems instru off & auto_bpm_transition_options stems bass off & auto_bpm_transition_options stems drums off & loop_select 4 & auto_bpm_transition_options autostart on & auto_bpm_transition 'target_current'


A bit of a mouthful but sometimes that's how it is.

And because the development staff love you, they put it all in a pad_page so you only have to pay attention to me ... if ... you're ... into knowing this kind of fine detail.
A-BPM_TR Pad page


Next episode will be a round up of the little bits added to the script engine here and there [not related to this]
 

Posted Mon 18 Sep 23 @ 8:48 am
Baldy68PRO InfinityMember since 2019
Interesting, can this stuff be triggered from POI "Tempo Start" and POI "Tempo Exit", or any other cue points?
 

Posted Tue 19 Sep 23 @ 1:08 pm
locoDogPRO InfinityModeratorMember since 2013
Not those exact poi, because they don't hold actions. And you're going to lose the battle as automix will want to do its own thing with the pitch.
But outside of automix, action poi can call this script.
 

Posted Tue 19 Sep 23 @ 1:16 pm
Hi guys, is it possible to modify this script so that the filter runs on the negative Hz side?

locodog wrote :

Strap it all together, job done

repeat_start_instant 'filtOsc' ? repeat_stop 'filtOsc' : repeat_start_instant 'filtOsc' 30ms -1 & param_bigger `get_beat_bar 8` 0.5 ? get_beat_bar 8 & param_multiply 0.6 & param_add 0.5 & param_cast & filter : get_beat_bar 8 & param_multiply -1 & param_add 1 & param_multiply 0.6 & param_add 0.5 & param_cast & filter


 

Posted Tue 19 Sep 23 @ 2:02 pm
locoDogPRO InfinityModeratorMember since 2013
Negative Hz, there's a mind blowing concept, things that don't happen so many times a second.
I joke, I know what you mean, into the left side of the dial, the lowpass part of the filter.

Sure here you go.

repeat_start_instant 'filtOsc' ? repeat_stop 'filtOsc' : repeat_start_instant 'filtOsc' 30ms -1 & param_bigger `get_beat_bar 8` 0.5 ? get_beat_bar 8 & param_multiply -1 & param_multiply 0.6 & param_add 0.5 & param_cast & filter : get_beat_bar 8 & param_multiply 0.6 & param_add -0.1 & param_cast & filter


Wow that was a blast from the past, I might work with beat_bar more again, in some ways it can work out cleaner
 

Posted Tue 19 Sep 23 @ 2:26 pm
Thanks! I was thinking the code needed to be modified changing some of the parameters from +´s to -´s (which I tried)...hence -Hz hehe

BWT I´m new to DJing (7 months now) and decided to explore this world after an accident the left me quadriplegic (4 years ago), that means that scripts, which I discovered 3 days ago, are my new best friends as I cannot move my arms (or anything from the chest down).
 

Posted Tue 19 Sep 23 @ 8:55 pm
locoDogPRO InfinityModeratorMember since 2013
Sure I totally understand the accessibility angle, with script you can do a whole lot with a simple button press. I'll be here if you have questions.
 

Posted Tue 19 Sep 23 @ 10:36 pm
locodog wrote :
Sure I totally understand the accessibility angle, with script you can do a whole lot with a simple button press. I'll be here if you have questions.


Ok, let me abuse a little; I want to automate a PullUp.

That is: 1.PullUp Sampler + 2.Backspin effect + 3.Go to cue 1 and play.

I have tried this script in every combination and it never plays in this order: I want it so that when the sampler starts, lower gain (20%) in active deck, wait 1-2 secs, and then backspin, finish effect, and then play from cue 1.

acttive_deck & effect_active 'backspin' & goto_cue 1 & play sampler_volume_master 50% &
sampler_bank 1 & sampler_play_stop 1 &
sampler_volume_master 50%

 

Posted Wed 20 Sep 23 @ 9:33 pm
locoDogPRO InfinityModeratorMember since 2013
sampler_play_stop 1 & level -20% & wait 1500ms & effect_active backspin & repeat_start_instant rsiFXcheck 25ms -1 & effect_active backspin ? nothing : repeat_stop rsiFXcheck & hot_cue 1

Something like that
 

Posted Wed 20 Sep 23 @ 11:19 pm
Almost perfect! Added & level +20% at the end to return gain back to normal. Thanks!

locodog wrote :
sampler_play_stop 1 & level -20% & wait 1500ms & effect_active backspin & repeat_start_instant rsiFXcheck 25ms -1 & effect_active backspin ? nothing : repeat_stop rsiFXcheck & hot_cue 1

Something like that


 

Posted Thu 21 Sep 23 @ 1:14 am
locoDogPRO InfinityModeratorMember since 2013
level, not gain. Gain is an amplification. The up faders / level faders, [some call them gate faders] are how much of that amplified signal you let through.

It's common for new djs to use them as synonyms.

 

Posted Thu 21 Sep 23 @ 1:30 am
locoDogPRO InfinityModeratorMember since 2013
@bjk6njhc9s, I sent you a pm with a couple of fx I think you'll like.
 

Posted Thu 21 Sep 23 @ 5:59 am
locoDogPRO InfinityModeratorMember since 2013
auto_bpm_transition page updated with early access additions.
 

Posted Thu 21 Sep 23 @ 4:05 pm
locodog wrote :
level, not gain. Gain is an amplification. The up faders / level faders, [some call them gate faders] are how much of that amplified signal you let through.

It's common for new djs to use them as synonyms.

Understood! Thanks!

 

Posted Fri 22 Sep 23 @ 12:21 am
Hi, is it possible to write a script to change the pitch tempo to a specific literal value rather than as a percentage, e.g 100 or 120 bpm by script?
 

Posted Fri 22 Sep 23 @ 10:40 pm
locoDogPRO InfinityModeratorMember since 2013
yes
pitch 120 bpm
 

Posted Fri 22 Sep 23 @ 10:43 pm
what is the BPM range that the songs need to be inside in order for one of the songs not to accidentally double or half the speed?

im trying to go from 90-124 here, but track B its shooting up to 180 and then slowing it back to 124 instead of shooting down to 90 and speeding up to 124, even though 90 is a lot closer to 124 than 180 is


if im using the regular sync button it doesnt seem to have this issue
 

Posted Wed 27 Sep 23 @ 12:54 am
That's a good question.

since the 56 BPM needed to raise the 124 BPM track to 180 is about a +45% change..
vs
the 34 BPM decrease needed to lower the 124 BPM to 90 BPM .. about a -27% change.

so would seem the latter, would be preferable.

and on the other hand.. a track sounds much better pitched up (lively, higher energy), then pitched down (dragging)


------------------

OR
not that I understand this reasoning, but if one used the 180 and 90 to calculate the percentage differences (instead of the 124 BPM)
then going to 180 would be a +31% pitch change (56/180)
and going to 90 would be a -37% change (34/90)..
so by this reasoning the math, chooses going to 180 ?


---------
its all good in the end
 

Posted Wed 27 Sep 23 @ 2:17 am
IIDEEJAYII wrote :
That's a good question.

since the 56 BPM needed to raise the 124 BPM track to 180 is about a +45% change..
vs
the 34 BPM decrease needed to lower the 124 BPM to 90 BPM .. about a -27% change.

so would seem the latter, would be preferable.

and on the other hand.. a track sounds much better pitched up (lively, higher energy), then pitched down (dragging)


------------------

OR
not that I understand this reasoning, but if one used the 180 and 90 to calculate the percentage differences (instead of the 124 BPM)
then going to 180 would be a +31% pitch change (56/180)
and going to 90 would be a -37% change (34/90)..
so by this reasoning the math, chooses going to 180 ?


---------
its all good in the end


i seem to always find a way to break things...
but this is the very first transition i tried with this effect.

i think there would want to be some built in safe guard to prevent doubling/halfing, although im not sure exactly what that would consist of.
 

Posted Wed 27 Sep 23 @ 8:46 am
IIDEEJAYII wrote :
That's a good question.


OK I think i figured it out.
track A was 93bpm, track B was 124
i think the effect is designed to take the shortest route which in this case was actually 93-62 bpm (31bpm vs 32bpm difference between 93 and 124)

so by just pitching track A up to 96bpm, then 96-124 for example, becomes the shortest route (28bpm)

i dont know though, if there could be some measure in place to avoid this, there may be some situations where you might want this? but you dont want it happening by accident either, perhaps a preview of what direction its planning to go? its a strange one.


 

Posted Wed 27 Sep 23 @ 11:24 am
86%