Hi! I’ve been working with lots of samples lately and I came across a question.
If I have a sample that’s being sliced and reordered randomly inside a loop, is there a way I can make that random order play let’s say 4 times, and then repeat that same exact randomly ordered loop?
For example if the output of a random loop was 1, 3, 5, 4, 2, 7, 8, 4, 6 etc., but I wanted my loop to play the first 4 results over and over => [1, 3, 5, 4] [1, 3, 5, 4] [1, 3, 5, 4] etc., how would I do that?
Ideally I’d love to know how to do this within the sample slicer, i.e. repeating something in this loop:
live_loop :sampleslicer, sync: :met1 do
am = 2
c = 130
r = [0.8, 0.4].choose
slice = rand_i(8*2)
slice_size = 0.125/2
s = slice * slice_size
f = s + slice_size
sample :ambi_choir, start: s, finish: f, amp: am, cutoff: c, rate: r, pan: [-0.5, 0.5].choose
sleep 0.5
end