Here is what I'm working on (BPM difference)
So I wanted to create a variable called $BeatDiffference which is the difference in beats between both decks. Turns out the variable listing isn't showing any subtraction (actually the script isn't even completing when I add the subtraction sign (-) and doesn't add together if I remove it.)
set '$BeatActive' '`deck active get_bpm' &
set '$BeatDefault' '`deck default get_bpm' &
get_var '$BeatActive' &
param_add -'$BeatDefault' &
param_cast &
set "$BeatDifference" &
var_list
So I wanted to create a variable called $BeatDiffference which is the difference in beats between both decks. Turns out the variable listing isn't showing any subtraction (actually the script isn't even completing when I add the subtraction sign (-) and doesn't add together if I remove it.)
发表时间 Thu 26 Jan 17 @ 11:20 pm
I haven't found a way to add [nor subtract] a variable to a variable,
you can add a real number to a variable, but you're talking plugin territory here
plugins allow much greater maths capabilities and make stuff much easier
do you know any coding languages?
you can add a real number to a variable, but you're talking plugin territory here
plugins allow much greater maths capabilities and make stuff much easier
do you know any coding languages?
发表时间 Thu 26 Jan 17 @ 11:39 pm
Although your problem might be solvable with a repeat_start script....
发表时间 Thu 26 Jan 17 @ 11:41 pm
Yeah quite a few but I don't do it everyday so I'd have to relearn the compiling steps. Is there a section on this website that can get me started. I was hoping not to have to do any compiling of fancy footwork to just do some things which I might think is extremely basic for a scripting language.
发表时间 Thu 26 Jan 17 @ 11:44 pm
I'm thinking rough here, the script is yours to work out
get default bpm save it to a var, compare smaller active bpm against default bpm, if smaller, set the default bpm +1, cycle another var up , compare again, keep doing that until bigger then -1 from default bpm and from -1 your cycling var, have a doOnce var to stop going up in +1bpms and start going up in +0.001bpms and use adding to a var method to increase the previously cycling var by 0.001 [see my blog lesser used scripts adding to var] your formerly cycling var will be your difference, reset the default bpm with the var you saved at the start
I think that will work,
get default bpm save it to a var, compare smaller active bpm against default bpm, if smaller, set the default bpm +1, cycle another var up , compare again, keep doing that until bigger then -1 from default bpm and from -1 your cycling var, have a doOnce var to stop going up in +1bpms and start going up in +0.001bpms and use adding to a var method to increase the previously cycling var by 0.001 [see my blog lesser used scripts adding to var] your formerly cycling var will be your difference, reset the default bpm with the var you saved at the start
I think that will work,
发表时间 Fri 27 Jan 17 @ 12:04 am
http://it.virtualdj.com/wiki/PluginSDK8.html
if you saw how you send commands in c++ [how script is understood by the program,] you'd see that further abstraction would spaghetti out really quickly especially
unfortunately YGTFWTDYHBG, rarely if you've a good idea, and it isn't too narrow in scope and the devs are felling cheerful a new verb might be added to the language.[rare but does happen]
if you saw how you send commands in c++ [how script is understood by the program,] you'd see that further abstraction would spaghetti out really quickly especially
unfortunately YGTFWTDYHBG, rarely if you've a good idea, and it isn't too narrow in scope and the devs are felling cheerful a new verb might be added to the language.[rare but does happen]
发表时间 Fri 27 Jan 17 @ 12:28 am
Why not using get_beatdiff ? Or I missed something ?
发表时间 Fri 27 Jan 17 @ 12:33 am
Not what he wants, he wants
deck active 130bpm
deck default 120bpm
so -10bpm
deck active 130bpm
deck default 120bpm
so -10bpm
发表时间 Fri 27 Jan 17 @ 1:07 am
Yeah using the first part of your rough idea before I fine tune this script later with the smaller pitch changes. The whole number pitch changes might go something like this:
but it's not stopping. It should stop one increment after the conditional realizes it went over. Shouldn't it?
I used 100 repeating steps just for test purposes for now, which gives it a large range to play with.
repeat_start 'pitchMatch' 10ms 100 &
set '$decka' '`deck active get_bpm' &
set '$deckd' '`deck default get_bpm' &
get_var '$decka' &
param_smaller '$deckd' ?
deck active pitch +1% &
deck default pitch -1% :
deck active pitch -1% &
deck default pitch +1%
but it's not stopping. It should stop one increment after the conditional realizes it went over. Shouldn't it?
I used 100 repeating steps just for test purposes for now, which gives it a large range to play with.
发表时间 Fri 27 Jan 17 @ 1:16 am
use a pad page with 2 of the buttons named `get_var "$deckX"` to see what's going on
like I said this one is yours to work out, but one way to get better versed with script is to help others [non script savy] with their problems.
Also, check out the users script database.
and further, repeat_starts the quickest they will run is 33ms, [so your 10ms is actually running @33ms {useful to remember if you're using a rep_script as a time counter}]
like I said this one is yours to work out, but one way to get better versed with script is to help others [non script savy] with their problems.
Also, check out the users script database.
and further, repeat_starts the quickest they will run is 33ms, [so your 10ms is actually running @33ms {useful to remember if you're using a rep_script as a time counter}]
发表时间 Fri 27 Jan 17 @ 8:56 am
Got my basic building block here working. Before I start really taking this code apart more and playing around, you can check out this auto pitch slide and manual mix (cough cough) with 2 songs 100% off BPM with the following code (this really depends on what you have the pitch range set for). Going to have it autoslide on my next change.
What can I use it for.. I don't know yet but it would be nicer if I can figure out how to match the beatgrids large ticks during sync. Warning: cover your ears if you're mixing out of 6% range
set '$latch' 0 &
repeat_start 'pitchMatch' 33ms 100 &
var_equal '$latch' 1 ?
deck default play & sync :
set '$decka' '`deck active get_bpm' &
set '$deckd' '`deck default get_bpm' &
var_smaller '$decka' '$deckd' ?
deck active pitch +1% &
deck default pitch -1% &
set '$decka' '`deck active get_bpm' &
set '$deckd' '`deck default get_bpm' &
var_bigger '$decka' '$deckd' ?
set '$latch' 1 : nothing :
deck active pitch -1% &
deck default pitch +1% &
set '$decka' '`deck active get_bpm' &
set '$deckd' '`deck default get_bpm' &
var_smaller '$decka' '$deckd' ?
set '$latch' 1 : nothing
What can I use it for.. I don't know yet but it would be nicer if I can figure out how to match the beatgrids large ticks during sync. Warning: cover your ears if you're mixing out of 6% range
发表时间 Sat 28 Jan 17 @ 4:50 am