XIVAN MAR. wrote :
effect_active 'brakestart' while_pressed
effect_active 'brakestart' while_pressed
works fine here. What you want to happen?
发表时间 Tue 16 Mar 21 @ 8:57 pm
I would like:
Hold down the pad to turn the effect on and releasing the pad pressure turns the effect off.
Hold down the pad to turn the effect on and releasing the pad pressure turns the effect off.
Rune (dj-in-norway) wrote :
works fine here. What you want to happen?
XIVAN MAR. wrote :
effect_active 'brakestart' while_pressed
effect_active 'brakestart' while_pressed
works fine here. What you want to happen?
发表时间 Tue 16 Mar 21 @ 9:19 pm
XIVAN MAR. wrote :
I would like:
Hold down the pad to turn the effect on and releasing the pad pressure turns the effect off.
Hold down the pad to turn the effect on and releasing the pad pressure turns the effect off.
effect_active 'brakestart' while_pressed already does that.. works that way.
Maybe you spelled something wrong? Or used somewhere wrong?
Use it as regular action if on pads.. (not "pad pressure" but push action)
发表时间 Tue 16 Mar 21 @ 9:54 pm
Because releasing the pressure of the pad continues to activate the effect.
Okay, I'll re-activate it and test it in push action.
Okay, I'll re-activate it and test it in push action.
Rune (dj-in-norway) wrote :
effect_active 'brakestart' while_pressed already does that.. works that way.
Maybe you spelled something wrong? Or used somewhere wrong?
Use it as regular action if on pads.. (not "pad pressure" but push action)
XIVAN MAR. wrote :
I would like:
Hold down the pad to turn the effect on and releasing the pad pressure turns the effect off.
Hold down the pad to turn the effect on and releasing the pad pressure turns the effect off.
effect_active 'brakestart' while_pressed already does that.. works that way.
Maybe you spelled something wrong? Or used somewhere wrong?
Use it as regular action if on pads.. (not "pad pressure" but push action)
发表时间 Tue 16 Mar 21 @ 10:09 pm
I've been compiling a little list of script methods I found interesting. I might explain in detail later, higher level stuff [mostly, but not all], but I figure if you can read these you might learn a trick or two
Test if several things are true with just one question mark
set 'a' 1 & set 'b' 2 & set 'c' 3 & param_equal "`var 'a' 1 && var 'b' 2 && var 'c' 3`" 1 ? set 'result' 1 : set 'result' 0
between 2 values one question mark
param_equal "`param_smaller 'effect_slider echo 1' 0.1`" "`param_bigger 'effect_slider echo 1' 0.2`" ? [in between 0.1 & 0.2] : [not inbetween]
Increment vars [really old but it was a surprise to me when I found it]
set 'a' +1
set 'a' -1
cast then query for things that aren't straight forward [some verbs are only queries and can't be cast to in usual ways]
set 'a' 2 & get_var 'a' & param_cast 'integer' & has_cue & param_equal 1 ? [cue 2 exists] : [it doesn't]
inverted queries [pretty basic, but nice to know]
set 'a' 1 & set 'b' 1 & var_equal 'a' 'b' !? [not equal] : [equal]
Dynamic variable names [very recent discovery, kind of interesting, maybe needlessly complicated]
set '$myvar' 4 & param_add `get_var '$myvar' & param_cast 'text'` `get_text '$mynewvar'` & param_cast 'text' & toggle
result toggle $mynewvar4
Test if several things are true with just one question mark
set 'a' 1 & set 'b' 2 & set 'c' 3 & param_equal "`var 'a' 1 && var 'b' 2 && var 'c' 3`" 1 ? set 'result' 1 : set 'result' 0
between 2 values one question mark
param_equal "`param_smaller 'effect_slider echo 1' 0.1`" "`param_bigger 'effect_slider echo 1' 0.2`" ? [in between 0.1 & 0.2] : [not inbetween]
Increment vars [really old but it was a surprise to me when I found it]
set 'a' +1
set 'a' -1
cast then query for things that aren't straight forward [some verbs are only queries and can't be cast to in usual ways]
set 'a' 2 & get_var 'a' & param_cast 'integer' & has_cue & param_equal 1 ? [cue 2 exists] : [it doesn't]
inverted queries [pretty basic, but nice to know]
set 'a' 1 & set 'b' 1 & var_equal 'a' 'b' !? [not equal] : [equal]
Dynamic variable names [very recent discovery, kind of interesting, maybe needlessly complicated]
set '$myvar' 4 & param_add `get_var '$myvar' & param_cast 'text'` `get_text '$mynewvar'` & param_cast 'text' & toggle
result toggle $mynewvar4
发表时间 Sat 20 Mar 21 @ 10:52 pm
Indirect name can be simple as well
the base: get_text 'tstvar' & param_cast text & toggle
the indirect: set tstname `get_text tstvar` & get_var tstname & param_cast text & toggle
in your example: uni dimensional array
and very more complex with a 2 dim array
set '$myvarX' 4 & set '$myvarY' 2 & param_add `param_add "get_var '$myvarY' & param_cast text" "get_var '$myvarX' & param_cast text & param_add 'x'"` "get_text '$mynewname'" & param_cast text & toggle
will toggle $mynewname4x2
(note param_add can add function with backquotes in the variable name in many case, maybe can be hack to indirect functions as well - I think to custom_button hack but didn't test)
Fine you talk about the increment and decrement because set behavior changed again with b6334;
HOW TO affect a negative value to a variable and deal with it is over complicated now?
no need of "set v 0 & set v -1" ... sounds like a good idea... at first
But side effects (and missing in implementation) brake many things :
i.e.: automatically casts parameter to relative :
set v `constant -1 & param cast_absolute`
Badly this is cast parameter as relative anyway
set v `constant -1 & param cast_absolute` & param_cast absolute
or better : "param_add 0 -1 & set v"
now parameter is absolute value -1
so that there is no gain compare to old behavior
BUT if its not a constant ....
set v2 `get_var v`
TOTALLY WRONG
result is undefined ; either v2 -v or v result being relative or absolute depending on v
HAVE TO set
set v2 `get_var v & param_cast absolute` & param_cast absolute
or
set v2 `get_var v & param_cast relative` & param_cast absolute
HOWEVER the parameter is now TOTALLY STRANGE
result parameter with positive values are now missing (more exactly a boolean takes place of the value)
if you test result : v2 < 0 then you can verify its value or go on affect other variables
but if V2 is positive the parameter becomes this time BOOLEAN :
set v `constant -42 & param_cast absolute` & param_cast absolute & set v2
v == v2 == -42
set v 42 & set v2
v==42 , v2 == 0
set v 0 , set v2
v==0 , v2 ==1
"set v0 `get_var v` & set v1 & set v2..."
depends on the value of v
.. not talking about text or uninit vars...
the base: get_text 'tstvar' & param_cast text & toggle
the indirect: set tstname `get_text tstvar` & get_var tstname & param_cast text & toggle
in your example: uni dimensional array
and very more complex with a 2 dim array
set '$myvarX' 4 & set '$myvarY' 2 & param_add `param_add "get_var '$myvarY' & param_cast text" "get_var '$myvarX' & param_cast text & param_add 'x'"` "get_text '$mynewname'" & param_cast text & toggle
will toggle $mynewname4x2
(note param_add can add function with backquotes in the variable name in many case, maybe can be hack to indirect functions as well - I think to custom_button hack but didn't test)
Fine you talk about the increment and decrement because set behavior changed again with b6334;
HOW TO affect a negative value to a variable and deal with it is over complicated now?
no need of "set v 0 & set v -1" ... sounds like a good idea... at first
But side effects (and missing in implementation) brake many things :
i.e.: automatically casts parameter to relative :
set v `constant -1 & param cast_absolute`
Badly this is cast parameter as relative anyway
set v `constant -1 & param cast_absolute` & param_cast absolute
or better : "param_add 0 -1 & set v"
now parameter is absolute value -1
so that there is no gain compare to old behavior
BUT if its not a constant ....
set v2 `get_var v`
TOTALLY WRONG
result is undefined ; either v2 -v or v result being relative or absolute depending on v
HAVE TO set
set v2 `get_var v & param_cast absolute` & param_cast absolute
or
set v2 `get_var v & param_cast relative` & param_cast absolute
HOWEVER the parameter is now TOTALLY STRANGE
result parameter with positive values are now missing (more exactly a boolean takes place of the value)
if you test result : v2 < 0 then you can verify its value or go on affect other variables
but if V2 is positive the parameter becomes this time BOOLEAN :
set v `constant -42 & param_cast absolute` & param_cast absolute & set v2
v == v2 == -42
set v 42 & set v2
v==42 , v2 == 0
set v 0 , set v2
v==0 , v2 ==1
"set v0 `get_var v` & set v1 & set v2..."
depends on the value of v
.. not talking about text or uninit vars...
发表时间 Sun 21 Mar 21 @ 5:52 am
Build 6404 just went early access and with that introduces a script tweek;
so to test it out, I made something like this for a button
some tracks this sounds good, other tracks... don't really suit it. Try it out, you might like it.
but the EA release notes aren't the full story. Look at this script
notice in place of the time|beats param, we have a variable cast as beats.
notice in place of the repeat count param, we also have a variable
so that works now. :)
If you're late to the party I've already covered the basics of
repeat_start, repeat_start_instant, repeat_stop
http://www.virtualdj.com/forums/223743/General_Discussion/Script_School.html?page=3.80
6404 EA Release Notes wrote :
repeat_start accepts time in beats as well (1.0bt instead of 500ms for example)
so to test it out, I made something like this for a button
repeat_start 'halfbar' ? repeat_stop 'halfbar' : set 'count' 0 & repeat_start 'halfbar' 2bt -1 & cycle 'count' 8 & var 'count' 0 !? goto +2 : goto -30
some tracks this sounds good, other tracks... don't really suit it. Try it out, you might like it.
but the EA release notes aren't the full story. Look at this script
set 'var1' 4 & repeat_start 'name' `get_var 'var1' & param_cast 'beats'` `get_var 'var1'` & goto -4
notice in place of the time|beats param, we have a variable cast as beats.
notice in place of the repeat count param, we also have a variable
so that works now. :)
If you're late to the party I've already covered the basics of
repeat_start, repeat_start_instant, repeat_stop
http://www.virtualdj.com/forums/223743/General_Discussion/Script_School.html?page=3.80
发表时间 Mon 12 Apr 21 @ 1:34 pm
Is it possible to lock the Shift-Funktion?
So that I push a button once to set shift
and push it again to unshift?
So that I push a button once to set shift
and push it again to unshift?
发表时间 Fri 23 Apr 21 @ 5:31 pm
sometimes it's a hardware setting, sometimes it isn't.
but shift is usually a hardware layer, it can't be easily remapped from momentary to toggle, some cases it simply can't.
but shift is usually a hardware layer, it can't be easily remapped from momentary to toggle, some cases it simply can't.
发表时间 Fri 23 Apr 21 @ 5:38 pm
unless you use a hack with a rsi like that:
shift ? repeat_stop shlk & shift : repeat_start shlk 170ms -1 & not shift ? shift
发表时间 Fri 23 Apr 21 @ 6:11 pm
Sorry Nicotux, but there pops up a window with a debug message.
It´s not so useful...
Is there really no option for such an easy thing?
It´s not so useful...
Is there really no option for such an easy thing?
发表时间 Fri 23 Apr 21 @ 6:18 pm
you got it quickly, I almost removed the debug thing immediately :-)
发表时间 Fri 23 Apr 21 @ 6:30 pm
Thanks @LOCODOG for starting up this post and keeping it going! There's A LOT of good information here.
With my limited knowledge on the repeat_start function I don't even know how to approach this.
Since build 6404 repeat_start accepts time in beats which to me could create some really nice automatic transitions & effects. One example : The idea is to press a button, isolate only_stem "Vocal", then have loop roll create a 16 bar build up.
With my limited knowledge on the repeat_start function I don't even know how to approach this.
Since build 6404 repeat_start accepts time in beats which to me could create some really nice automatic transitions & effects. One example : The idea is to press a button, isolate only_stem "Vocal", then have loop roll create a 16 bar build up.
发表时间 Sat 24 Apr 21 @ 10:45 am
only_stem Vocal on & effect_active 'loop roll' on & effect_beats 'loop roll' 4 & repeat_start 'voxRoll' 4bt 4 & effect_beats 'loop roll' 0.5 ? effect_active 'loop roll' off : effect_beats 'loop roll' -1
something like that?
I've got a project on with something similar but it has dump & slipbrake & odd sized loops but it's mainly aimed at jungle gabba & breakcore [fast]genres
发表时间 Sat 24 Apr 21 @ 11:47 am
Thank you so much @LOCO! This isn't working exactly how I had in mind but it's close. I'll keep messing with it until I get it.
That project that you're working on sounds like what I was thinking. This is for nu break/break beat genre and was thinking it would be sick to take the vocal of the current track , start the auto build up and transition straight into the next track's drop. There is a ton of other things that can be done with the recent additions to VDJ, I figured I'd start with this.
That project that you're working on sounds like what I was thinking. This is for nu break/break beat genre and was thinking it would be sick to take the vocal of the current track , start the auto build up and transition straight into the next track's drop. There is a ton of other things that can be done with the recent additions to VDJ, I figured I'd start with this.
发表时间 Sat 24 Apr 21 @ 4:03 pm
Disregard - That works perfectly. I had my effect settings wrong. A little out of practice. : ) Thanks again.
发表时间 Sat 24 Apr 21 @ 8:05 pm
Sorry Nicotux, but it´s still not working.
The Button with Your Code shifts only during it´s pressed.
The aim was to get a permanent shift by a short push of the button and a temporary (normal) shift when pressing the Button longer.
I want to press the Button long and have a permanent shift from leaving the button till pushing it again.
(Sorry, don´t know, why my staff always has to be so complicated ;-)
The Button with Your Code shifts only during it´s pressed.
Nicotux wrote :
unless you use a hack with a rsi like that:
shift ? repeat_stop shlk & shift : repeat_start shlk 170ms -1 & not shift ? shift
The aim was to get a permanent shift by a short push of the button and a temporary (normal) shift when pressing the Button longer.
I want to press the Button long and have a permanent shift from leaving the button till pushing it again.
(Sorry, don´t know, why my staff always has to be so complicated ;-)
发表时间 Sun 25 Apr 21 @ 11:19 am
Background is f.i. to have a secondary assignment of certain buttons but
without the cumbersome setting of "$XYZ"-Variables.
So for the second unit of all buttons could be used shift ?
And if it´s activated (by the button with Your code) it´s not necessary to hold all the time the shift
without the cumbersome setting of "$XYZ"-Variables.
So for the second unit of all buttons could be used shift ?
And if it´s activated (by the button with Your code) it´s not necessary to hold all the time the shift
发表时间 Sun 25 Apr 21 @ 11:24 am
This one activates/desactivates shift lock with a short press, and shift normal with long press
You can adjust delay by modifying count (currently 3 = 510ms)
maybe duration 170ms have to adjust as well depending on OS settings
You can adjust delay by modifying count (currently 3 = 510ms)
repeat_start shlk ? on & repeat_stop shlk & shift off : shift ? on & repeat_stop shlk & shift off : repeat_start shlk 170ms 3 & not shift ? shift
maybe duration 170ms have to adjust as well depending on OS settings
发表时间 Sun 25 Apr 21 @ 1:13 pm
That works fine! Well done and thank You very much!
发表时间 Sun 25 Apr 21 @ 2:30 pm