Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Make the sampler play loops like an arranger - Page: 2

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

I've done the script for all the pads on my launchpad with the led scripting too, but now I am thinking of two things:
1- Let's say I pressed the pad 1 so the Sampler 1 will play and the led 1 have the get_sample_color 1, when I press pad 2 it will wait for the next 4th beat to play as previously scripted but I want its led to blink when I press it until the sampler 2 begins to play and then it will get_sample_color 2. (sure I want all the pads leds to behave like this)
2- Same as idea number 1 but instead of blinking randomly it will blink on beat.

Is there a way to do it, or any action that returns that the pad is pressed or not, I tried to use the while_pressed but I am not sure if it is the right choice or even if I used it right.
NB: I am using this project to create a new Arranger page in my launchpad MKII in an unused page, I hope I can finish it soon so I will upload the mapper if anyone is interested :)

Thanks in advance.
 

geposted Fri 05 Apr 19 @ 10:45 am
locoDogPRO InfinityModeratorMember since 2013
Not as bad as I thought

sampler_play ? sampler_play 1 ? sampler_stop 1 : set '$samplerLED' 1 & repeat_start "rsSamplerSch" 33ms & sampler_loop "current" 4 ? sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 :

in the script
before starting the repeat_start set a variable to the sample number
after any instance of calling repeat_stop, set the variable to zero.

for the led
var_equal '$samplerLED' 1 ? blink ? color 'white' : get_sample_color 1 : get_sample_color 1

query if var value equals sample number if yes blink color and white : if no work like normal sample
 

geposted Fri 05 Apr 19 @ 1:19 pm
locodog wrote :
Not as bad as I thought

sampler_play ? sampler_play 1 ? sampler_stop 1 : set '$samplerLED' 1 & repeat_start "rsSamplerSch" 33ms & sampler_loop "current" 4 ? sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 :

in the script
before starting the repeat_start set a variable to the sample number
after any instance of calling repeat_stop, set the variable to zero.

for the led
var_equal '$samplerLED' 1 ? blink ? color 'white' : get_sample_color 1 : get_sample_color 1

query if var value equals sample number if yes blink color and white : if no work like normal sample


It is a very good idea, I tried it but two issues happened:

1- The script, I've done it just like you said, set variable before starting the repeat start and set it back to 0 after all repeat stop I have (15 repeat stops for the 32 beats script) but the sampler will play only next to another sampler, it will not begin to play if pressed first, nothing happens if pressed first.
2- The led keeps blinking continuously after the first play of its sampler even if I stop the sampler the led doesn't stop blinking until I restart VDJ then it returns to normal sample color, before the first play it is normal color also
 

geposted Fri 05 Apr 19 @ 10:17 pm
locoDogPRO InfinityModeratorMember since 2013
show me one button script please
 

geposted Fri 05 Apr 19 @ 10:25 pm
sampler_play ? sampler_play 1 ? sampler_stop 1 : set '$samplerLED' 1 & repeat_start "rsSamplerSch" 33ms & sampler_loop "current" 4 ? sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 8 ? sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 16 ? sampler_position & param_smaller 0.255 ? sampler_position & param_bigger 0.245 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.765 ? sampler_position & param_bigger 0.735 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 32 ? sampler_position & param_smaller 0.1275 ? sampler_position & param_bigger 0.1225 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.255 ? sampler_position & param_bigger 0.245 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.3825 ? sampler_position & param_bigger 0.3675 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.6375 ? sampler_position & param_bigger 0.6125 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.765 ? sampler_position & param_bigger 0.735 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.8925 ? sampler_position & param_bigger 0.8575 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : nothing : sampler_play 1 & sampler select 1
 

geposted Fri 05 Apr 19 @ 10:39 pm
locoDogPRO InfinityModeratorMember since 2013
working here, show me your script for button 2, also show me the script for LED 1 and LED 2
I think I know what's gone wrong.
 

geposted Fri 05 Apr 19 @ 11:12 pm
locodog wrote :
working here, show me your script for button 2, also show me the script for LED 1 and LED 2
I think I know what's gone wrong.


It is embarrassing, I've done it again and it works perfectly now, honestly, I don't know why because I did not change a thing. So again thank for your help again & again :).

Script button 2:
sampler_play ? sampler_play 2 ? sampler_stop 2 : set '$samplerLED' 2 & repeat_start "rsSamplerSch" 33ms & sampler_loop "current" 4 ? sampler_position & param_bigger 0.98 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 8 ? sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 16 ? sampler_position & param_smaller 0.255 ? sampler_position & param_bigger 0.245 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.765 ? sampler_position & param_bigger 0.735 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 32 ? sampler_position & param_smaller 0.1275 ? sampler_position & param_bigger 0.1225 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.255 ? sampler_position & param_bigger 0.245 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.3825 ? sampler_position & param_bigger 0.3675 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.6375 ? sampler_position & param_bigger 0.6125 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.765 ? sampler_position & param_bigger 0.735 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.8925 ? sampler_position & param_bigger 0.8575 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 2 & sampler select 2 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : nothing : sampler_play 2 & sampler select 2

Script led 1:
var_equal '$samplerLED' 1 ? blink ? color 'white' : get_sample_color 1 : get_sample_color 1

Script led 2:
var_equal '$samplerLED' 2 ? blink ? color 'white' : get_sample_color 2 : get_sample_color 2
 

geposted Sun 07 Apr 19 @ 10:18 am
sampler_play ? sampler_play 1 ? sampler_stop 1 & set '$samplerLED' 0 : set '$samplerLED' 1 & repeat_start "rsSamplerSch" 33ms & sampler_loop "current" 4 ? sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing

I've just added this condition to set led variable to zero in case I stopped the sample 1 before the sample 2 begins to play after pressing it.
 

geposted Sun 07 Apr 19 @ 10:38 am
locoDogPRO InfinityModeratorMember since 2013
You might want to add a repeat_stop after setting the var back to zero for the case you mentioned (because the repeat_start will still be running)
 

geposted Sun 07 Apr 19 @ 4:15 pm
locodog wrote :
You might want to add a repeat_stop after setting the var back to zero for the case you mentioned (because the repeat_start will still be running)


Indeed
 

geposted Sun 07 Apr 19 @ 6:33 pm
I think this will be the latest adjustment to the pad script, in case I accidentally pushed an empty sample pad it will not affect my work

sampler_loaded 1 ? sampler_play ? sampler_play 1 ? sampler_stop 1 & set '$samplerLED' 0 & repeat_stop "rsSamplerSch" : set '$samplerLED' 1 & repeat_start "rsSamplerSch" 33ms & sampler_loop "current" 4 ? sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 8 ? sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 16 ? sampler_position & param_smaller 0.255 ? sampler_position & param_bigger 0.245 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.765 ? sampler_position & param_bigger 0.735 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_loop "current" 32 ? sampler_position & param_smaller 0.1275 ? sampler_position & param_bigger 0.1225 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.255 ? sampler_position & param_bigger 0.245 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.3825 ? sampler_position & param_bigger 0.3675 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.51 ? sampler_position & param_bigger 0.49 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.6375 ? sampler_position & param_bigger 0.6125 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.765 ? sampler_position & param_bigger 0.735 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_smaller 0.8925 ? sampler_position & param_bigger 0.8575 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : sampler_position & param_bigger 0.98 ? sampler_play 1 & sampler select 1 & repeat_stop "rsSamplerSch" & set '$samplerLED' 0 : nothing : nothing : sampler_play 1 & sampler select 1 : nothing
 

geposted Sun 07 Apr 19 @ 8:22 pm


(Alte Themen und Foren werden automatisch geschlossen)