快速登录:  

Forum: VirtualDJ Technical Support

话题: Map multiple samples to a single key?
Hi.
Can anyone suggest a script to toggle samples in a loop, mapped to a single key?
I mean to toggle samples 1,2 and 3 in loop with single key in sample bank with 8 samples.
Regards
 

发表时间 Sat 08 Apr 23 @ 2:38 pm
locoDogPRO InfinityModeratorMember since 2013
just & the commands together
sampler_play 1 & sampler_play 2 & ...
 

发表时间 Sat 08 Apr 23 @ 2:44 pm
Thanks LOCODOG.

I tried this, but as a result, all selected samplers start simultaneously.
I also try with 'sampler select +1' verb without success so far.
I wonder if it's possible to use variable and the cycle command, but that's beyond my reach for now.
I appreciate any help.
Thanks.

 

发表时间 Sun 09 Apr 23 @ 8:11 am
Need more details as to what you wish to do, so someone can help.

Locodog's script did exactly as you asked (" toggle samples 1,2 and 3 in loop with single key")

 

发表时间 Sun 09 Apr 23 @ 8:53 am
Sorry for the ambiguity.

I want to play a sequence of samples in cyclic order by pressing a same button on the keyboard.
In other words:
When I Press 'M' key - play Sampler pad 1, 'M' key again - play sampler pad 2, 'M' key - play sampler 3, and finally 'M' again - to play sampler pad 1 (to close the cycle).

Thanks for the fast reply.
 

发表时间 Sun 09 Apr 23 @ 4:03 pm
AdionPRO InfinityCTOMember since 2006
sampler_play & sampler_select +1

maybe?
 

发表时间 Sun 09 Apr 23 @ 4:10 pm
Thanks

Yes this works.
With this I can toggles in cycle all the samples in the bank.

Is it possible to toggle in cycle only some of the samples in the bank?

I.e.to map samples 4, 5 and 6 in a cycle to one key, while samples 1, 2 and 3 remain unchanged, (or mapped to another keys).

Thanks again
 

发表时间 Mon 10 Apr 23 @ 2:31 pm
AdionPRO InfinityCTOMember since 2006
You can query sampler_select too,
so maybe instead of sampler_select +1
sampler_select 6 ? sampler_select 4 : sampler_select +1


Note that sampler_select actually selects the sample, and only one sample can be selected at a time.
So for the same trick with 2 keys you would need to revert to using a variable.
You can then use cycle to rotate the variable, and then feed it into sampler_play
 

发表时间 Mon 10 Apr 23 @ 2:41 pm
Kamdobrev wrote :
I.e.to map samples 4, 5 and 6 in a cycle to one key,

With similar logic, (query of sampler_select), is this what you are wishing for?

sampler_select 4 ? sampler_select 5 & sampler_play : sampler_select 5 ? sampler_select 6 & sampler_play : sampler_select 6 ? sampler_select 4 & sampler_play : nothing


Samples would need to be set as "drop" in the sample editor, since the above only starts a sample.

 

发表时间 Mon 10 Apr 23 @ 6:56 pm
locoDogPRO InfinityModeratorMember since 2013
sampler_select 6 ? sampler_select 4 & sampler_play : sampler_select +1 & sampler_play


reduced
 

发表时间 Mon 10 Apr 23 @ 7:14 pm
AdionPRO InfinityCTOMember since 2006
Or even shorter
(sampler_select 6 ? sampler_select 4 : sampler_select +1) & sampler_play
 

发表时间 Tue 11 Apr 23 @ 6:14 am
Thank you guys.

The suggested script is quite elegant and works fine.
I also found a way, but very clumsy.
I cheated somehow by moving samples 4, 5 and 6 from bank 1 in additional bank – LOOP BANK 2.

With script. . .

sampler_bank 2 & sampler_play & sampler_select +1

. . . I loop all the samples in bank 2

And with

sampler_bank 1 & sampler_pad 1

- back in bank 1 again.

Thanks Again.
 

发表时间 Wed 12 Apr 23 @ 9:11 am