here is my goal : manage key (different scale) with 16 custom pad (like in jpg) and simultanely can manage key with a slider or pots... I can not just use the action "key" on my slider because of the different scale that i want to use, there is some changement in the "next or previous note"...so I did a script to say when param of slider is between this and that go to Key x(separatly it works well)...the issue is when i want to use slider and pads on the same deck : the slider is master and when i hit my button ,it just make the good key a mili second (like a pitch bend...interesting by the way) and returning to the param of my slider (because of the action "repeat_start_instant 'bars' 30ms " I suppose)..so my question is..is there a method to say "when hit the pad stop repeat "and when i use my slider again the "repeat instant" start again ? i don't if it is clear but by trying to explain i probably advance for a solution ;)))
geposted Sun 13 Dec 20 @ 2:59 pm
the button is easy, just stop the rsi as part of the script.
repeat_stop 'RSIname'
the slider, nearly as easy - query if the rsi is running at the start, if it is do what you were going to do, if it's not start the rsi and do your thing
repeat_start 'RSIname' ? is running, carry on : not running, start the rsi, carry on
repeat_stop 'RSIname'
the slider, nearly as easy - query if the rsi is running at the start, if it is do what you were going to do, if it's not start the rsi and do your thing
repeat_start 'RSIname' ? is running, carry on : not running, start the rsi, carry on
geposted Sun 13 Dec 20 @ 3:43 pm
locodog wrote :
the button is easy, just stop the rsi as part of the script.
repeat_stop 'RSIname'
the slider, nearly as easy - query if the rsi is running at the start, if it is do what you were going to do, if it's not start the rsi and do your thing
repeat_start 'RSIname' ? is running, carry on : not running, start the rsi, carry on
repeat_stop 'RSIname'
the slider, nearly as easy - query if the rsi is running at the start, if it is do what you were going to do, if it's not start the rsi and do your thing
repeat_start 'RSIname' ? is running, carry on : not running, start the rsi, carry on
ok i get it with this code
"var "$Scale" 0 ? repeat_start_instant 'KeyFader' 30ms & deck 1 param_smaller 1% ? repeat_stop 'KeyFader' & deck 1 key -12 : repeat_start_instant 'KeyFader' 30ms & deck 1 param_bigger 1% & param_smaller 5% ? repeat_stop 'KeyFader' & deck 1 key -11 : ....."
it works well ;) no need to change on the button :) ty
geposted Sun 13 Dec 20 @ 8:22 pm
Hey Locodog ! I just have a question. Do you code all inside VDJ or do you use a soft for coding ? if yes, wich one? thanks
geposted Wed 16 Dec 20 @ 12:17 pm
if I was doing a big remapping I'd use np++, most of the time I'm in vdj.
geposted Wed 16 Dec 20 @ 12:24 pm
Hi all
re-posting from another thread http://www.virtualdj.com/forums/238420/General_Discussion/Help__with_scriptiing_a_Custom_Slider_Button.html
so can be easily found by anyone attending Script School.
USE of BACK TICKs
with 2 amazing replies
re-posting from another thread http://www.virtualdj.com/forums/238420/General_Discussion/Help__with_scriptiing_a_Custom_Slider_Button.html
so can be easily found by anyone attending Script School.
USE of BACK TICKs
IIDEEJAYII wrote :
When do I do I need the back ticks on parameter? in this case level is defined by VDJ as value of a volume fader.
Is it advised to use `level` in
since the code below also works without the back ticks
Is it advised to use `level` in
param_greater 50% `level`
since the code below also works without the back ticks
param_greater 50% level
with 2 amazing replies
locodog wrote :
param_greater is expecting 2 things, that could be an actions or values, or a mix
since it is expecting an action it can work with no spaced actions without ` ` so, level, get_level etc will be fine.
however, if there's a space in the action, lets say
effect_slider 'echo' 1
the space will mess things up so you would need to encapsulate ` ` , I believe encapsulate works with " " & ' ' too
param_equal, is slightly different, it is expecting either action, value or a string so, wrapping with " " or ' ' is reserved for strings.
Most of the time if doing a comparison on an action, wrapping the action in ` ` can't hurt there is one exception I'll try remember what it was.
*edit, I was remembering the wrong thing
since it is expecting an action it can work with no spaced actions without ` ` so, level, get_level etc will be fine.
however, if there's a space in the action, lets say
effect_slider 'echo' 1
the space will mess things up so you would need to encapsulate ` ` , I believe encapsulate works with " " & ' ' too
param_equal, is slightly different, it is expecting either action, value or a string so, wrapping with " " or ' ' is reserved for strings.
Most of the time if doing a comparison on an action, wrapping the action in ` ` can't hurt
*edit, I was remembering the wrong thing
Nicotux wrote :
i try again as post does not appear
`level & param_bigger 0.75 ? get_constant 0 : param_cast int`
backquote only not needed with "param_*' when action is one word only
most other verbs are needing backquotes or ignore them
as locodog said there are "exception" . trial & error only can help
All the above tests and comparisons are only working with scripts and physical sliders but not with custom_sliders
(custom sliders are not real sliders anymore for a while)
so that user slider have to be scripted in a way to make it work correctly
they need a specific variable (each) to handle value, specially using relative scroll, slide & move
(encoders, touchscreen, mouse roll)
set v[INDEX] & param_cast absolute & set v[INDEX] `get_var v[INDEX] & param_bigger 0.0 ? param_bigger 1.0 ? constant 1.0 : get_var v[INDEX] : constant 0.0` & param_add 0 `get_var v[INDEX]` & ...
set v : save the wrong absolute value (not in slider range)
param_cast absolute : convert param for future use
set v `..` : fix correct value for the slider
param_add 0.0 ... : hack to be able to overwrite parameter with correct absolute value and update slider display accordingly
& ... : now parameter is in range [0.0..1.0] and correct absolute value is passed to the script
`level & param_bigger 0.75 ? get_constant 0 : param_cast int`
backquote only not needed with "param_*' when action is one word only
most other verbs are needing backquotes or ignore them
as locodog said there are "exception" . trial & error only can help
All the above tests and comparisons are only working with scripts and physical sliders but not with custom_sliders
(custom sliders are not real sliders anymore for a while)
so that user slider have to be scripted in a way to make it work correctly
they need a specific variable (each) to handle value, specially using relative scroll, slide & move
(encoders, touchscreen, mouse roll)
set v[INDEX] & param_cast absolute & set v[INDEX] `get_var v[INDEX] & param_bigger 0.0 ? param_bigger 1.0 ? constant 1.0 : get_var v[INDEX] : constant 0.0` & param_add 0 `get_var v[INDEX]` & ...
set v : save the wrong absolute value (not in slider range)
param_cast absolute : convert param for future use
set v `..` : fix correct value for the slider
param_add 0.0 ... : hack to be able to overwrite parameter with correct absolute value and update slider display accordingly
& ... : now parameter is in range [0.0..1.0] and correct absolute value is passed to the script
geposted Sat 26 Dec 20 @ 5:42 pm
HI! I need help for a script for my led...I want that it light, when an effect (what ever effect) is ON...but if I just use "effect_active" it doesn't work...I can use effect_active 1 or 2 etc..but the problem is that I use many other effect who's are not in the x slot specially...I try to don't write each effect...:) I odn't know if it is clear...:)
geposted Wed 13 Jan 21 @ 6:58 pm
effects_used
geposted Wed 13 Jan 21 @ 7:39 pm
thanks !
geposted Wed 13 Jan 21 @ 8:09 pm
Can we write VDJscript to wait 1 second?
Also, can we write VDJscript to play(hold off, release) 1 beat and beat_juggle -1 beat?
Also, can we write VDJscript to play(hold off, release) 1 beat and beat_juggle -1 beat?
geposted Mon 18 Jan 21 @ 3:12 pm
somewhere in this thread [page 3 or 4] I made a post starting
repeat_start
repeat_start_instant
repeat_stop
repeat_start
repeat_start_instant
repeat_stop
geposted Mon 18 Jan 21 @ 5:37 pm
Where did you define what 'lightBPM' does?
locodog wrote :
holding ? sync : play_sync & action_deck 1 ? deck 2 beatlock on & deck 1 pitch_reset 0.5% & repeat_start 'lightBPM' 200ms 100 & get_pitch_zero ? repeat_stop 'lightBPM' & deck 2 beatlock off : nothing : deck 1 beatlock on & deck 2 pitch_reset 0.5% & repeat_start 'lightBPM' 200ms 100 & get_pitch_zero ? repeat_stop 'lightBPM' & deck 1 beatlock off : nothing
holding ? sync : play_sync & action_deck 1 ? deck 2 beatlock on & deck 1 pitch_reset 0.5% & repeat_start 'lightBPM' 200ms 100 & get_pitch_zero ? repeat_stop 'lightBPM' & deck 2 beatlock off : nothing : deck 1 beatlock on & deck 2 pitch_reset 0.5% & repeat_start 'lightBPM' 200ms 100 & get_pitch_zero ? repeat_stop 'lightBPM' & deck 1 beatlock off : nothing
geposted Thu 21 Jan 21 @ 9:29 am
'lightBPM' does nothing, it only names the loop (in a way to stop the right one if needed)
you can see loops currently in action by using 'var_list' tab 'repeat scripts' (and switch "auto update" box bottom left)
holding // long press is sync
_? sync
// not holding is reset pitch (depending on deck)
_: play_sync
__& action_deck 1 // action deck is deck 1
__? deck 2 beatlock on
____& deck 1 pitch_reset 0.5%
____& repeat_start 'lightBPM' 200ms 100 // create a loop named 'lightBPM'
____& get_pitch_zero // loop until pitch is zero
______? repeat_stop 'lightBPM' // stop the loop named 'lightBPM'
________& deck 2 beatlock off
______ : nothing // wait while pitch is non zero
// do the same but with decks inverted
// action deck is deck 2
__ : deck 1 beatlock on
____& deck 2 pitch_reset 0.5%
____ & repeat_start 'lightBPM' 200ms 100
____ & get_pitch_zero
______? repeat_stop 'lightBPM'
_______ & deck 1 beatlock off
______: nothing
a simple loop to wait 1 sec (1000ms) I name it 'wait1' in this example:
repeat_start 'wait1' 1000ms 1 & ...
this define a simple loop 'wait1' looping 1 time after 1000ms
you can see loops currently in action by using 'var_list' tab 'repeat scripts' (and switch "auto update" box bottom left)
holding // long press is sync
_? sync
// not holding is reset pitch (depending on deck)
_: play_sync
__& action_deck 1 // action deck is deck 1
__? deck 2 beatlock on
____& deck 1 pitch_reset 0.5%
____& repeat_start 'lightBPM' 200ms 100 // create a loop named 'lightBPM'
____& get_pitch_zero // loop until pitch is zero
______? repeat_stop 'lightBPM' // stop the loop named 'lightBPM'
________& deck 2 beatlock off
______ : nothing // wait while pitch is non zero
// do the same but with decks inverted
// action deck is deck 2
__ : deck 1 beatlock on
____& deck 2 pitch_reset 0.5%
____ & repeat_start 'lightBPM' 200ms 100
____ & get_pitch_zero
______? repeat_stop 'lightBPM'
_______ & deck 1 beatlock off
______: nothing
a simple loop to wait 1 sec (1000ms) I name it 'wait1' in this example:
repeat_start 'wait1' 1000ms 1 & ...
this define a simple loop 'wait1' looping 1 time after 1000ms
geposted Thu 21 Jan 21 @ 10:00 am
The question is,:
- I give a button on the controller with the mapping:
effect_active sampler 'cut'
And I activate the cut effect in the slot
- I give another button with mapping:
effect_active sampler 'spiral'
And I activate the spiral effect in the slot and the cut effect disappears from the slot but is still active.
So far I have 2 active effects in the sample.
But with mapping: effect_slider sampler 1
I only move parameter 1 of the effect that is in the slot that is the CUT.
And if I want to move parameter 1 of the SPIRAL effect that is not in the slot and I have it active,
How do I do the mapping ?????
So you could apply 2 active effects to a sampler at the same time, being able to operate with 2 knobs. One knob for the CUT effect and the other for the SPIRAL effect.
- I give a button on the controller with the mapping:
effect_active sampler 'cut'
And I activate the cut effect in the slot
- I give another button with mapping:
effect_active sampler 'spiral'
And I activate the spiral effect in the slot and the cut effect disappears from the slot but is still active.
So far I have 2 active effects in the sample.
But with mapping: effect_slider sampler 1
I only move parameter 1 of the effect that is in the slot that is the CUT.
And if I want to move parameter 1 of the SPIRAL effect that is not in the slot and I have it active,
How do I do the mapping ?????
So you could apply 2 active effects to a sampler at the same time, being able to operate with 2 knobs. One knob for the CUT effect and the other for the SPIRAL effect.
geposted Fri 22 Jan 21 @ 7:24 pm
call it back in to the sampler slot
effect_select sampler 'YOURFX' & DO STUFF
My opinion, when sampler fx came out, I argued that it was a bit weird, I'd have designated sampler as a deck entity, but I'm only arguing from the point of not knowing the technical reasons why it was done like it was done.
effect_select sampler 'YOURFX' & DO STUFF
My opinion, when sampler fx came out, I argued that it was a bit weird, I'd have designated sampler as a deck entity, but I'm only arguing from the point of not knowing the technical reasons why it was done like it was done.
geposted Fri 22 Jan 21 @ 10:01 pm
Thanks friend.
So what I want to do can't you ???
Sampler should have multiple slots for 3 effects as does each deck.
So what I want to do can't you ???
Sampler should have multiple slots for 3 effects as does each deck.
geposted Fri 22 Jan 21 @ 10:27 pm
Thanks friend.
So what I want to do can't you ???
Sampler should have multiple slots for 3 effects as does each deck
So what I want to do can't you ???
Sampler should have multiple slots for 3 effects as does each deck
locodog wrote :
call it back in to the sampler slot
effect_select sampler 'YOURFX' & DO STUFF
My opinion, when sampler fx came out, I argued that it was a bit weird, I'd have designated sampler as a deck entity, but I'm only arguing from the point of not knowing the technical reasons why it was done like it was done.
effect_select sampler 'YOURFX' & DO STUFF
My opinion, when sampler fx came out, I argued that it was a bit weird, I'd have designated sampler as a deck entity, but I'm only arguing from the point of not knowing the technical reasons why it was done like it was done.
geposted Fri 22 Jan 21 @ 10:27 pm
Because sampler is not a real deck (dynamic); as locodog said, it is used as a slot
Internal technical limitations:
Decks are using positive numbers to identify, null being Master or Default depending on usage
To identify other decks the solution was to use negative values. This apply to sampler and mic and aux
Instead of doing things like "deck -n" the decision was taken to access them the same as a slot, such as "Release"
(now 6 slots seems to exist there may be differences)
Internal technical limitations:
Decks are using positive numbers to identify, null being Master or Default depending on usage
To identify other decks the solution was to use negative values. This apply to sampler and mic and aux
Instead of doing things like "deck -n" the decision was taken to access them the same as a slot, such as "Release"
(now 6 slots seems to exist there may be differences)
geposted Sat 23 Jan 21 @ 12:28 am
Thanks Nicotux and Locodog.
But it is a shame because many more things could be done, if the sampler had more slot and to be able to handle parameters at the same time of different effects.
But it is a shame because many more things could be done, if the sampler had more slot and to be able to handle parameters at the same time of different effects.
Nicotux wrote :
Because sampler is not a real deck (dynamic); as locodog said, it is used as a slot
Internal technical limitations:
Decks are using positive numbers to identify, null being Master or Default depending on usage
To identify other decks the solution was to use negative values. This apply to sampler and mic and aux
Instead of doing things like "deck -n" the decision was taken to access them the same as a slot, such as "Release"
(now 6 slots seems to exist there may be differences)
Internal technical limitations:
Decks are using positive numbers to identify, null being Master or Default depending on usage
To identify other decks the solution was to use negative values. This apply to sampler and mic and aux
Instead of doing things like "deck -n" the decision was taken to access them the same as a slot, such as "Release"
(now 6 slots seems to exist there may be differences)
geposted Sat 23 Jan 21 @ 6:09 am
Is it possible to specify the time for one beat as the interval instead of 1000ms?
Nicotux wrote :
a simple loop to wait 1 sec (1000ms) I name it 'wait1' in this example:
repeat_start 'wait1' 1000ms 1 & ...
this define a simple loop 'wait1' looping 1 time after 1000ms
a simple loop to wait 1 sec (1000ms) I name it 'wait1' in this example:
repeat_start 'wait1' 1000ms 1 & ...
this define a simple loop 'wait1' looping 1 time after 1000ms
geposted Mon 25 Jan 21 @ 12:36 pm