/*
ReaSamplOmatic5000 (RS5K) Round-robin Calculator
-------------------------------------------------------------

-first set the number of 'RS5K instances' you want to use for 'round-robins'.
-then go through the 'round-robins' slider, starting from 1.
 the 'probability' slider shows the value you should use (for each 'round-robin').
-open each RS5K plugin and put that stuff into their 'Probability' fields...
-activate the 'Round-robin' checkbox in every RS5K instance...
-always check 'Remove played notes from FX chain MIDI stream' in each RS5K instance,
 until the 'check'-slider in this plugin shows you something different...
*/

slider1:1<1,20,1>RS5K instances
slider2:1<1,20,1>round-robins
slider3:0,probability
slider4:0<0,1,1{Remove played notes from FX chain MIDI stream,this is the last sample}>check

in_pin:none
out_pin:none

@block
rs5k=slider1;
rr=slider2;
slider2>slider1 ? slider2=slider1;
slider2<slider1 ? slider4=0:slider4=1;
sliderchange(slider4);
p=100 / ( rs5k - rr + 1);
slider3=p;
sliderchange(slider3);
