Here’s an example of how I might slice up amen using a ring, using both a variable for a ring and a method chained ring. The important thing is that you need to wind up with a specific value, rather than a ring to give to the slice: option. The .take method returns a ring, so .tick or .choose would be better choices to produce a single value.
live_loop :amen_break do
use_sample_defaults beat_stretch: 2, num_slices: 8, release: 0.5
r = (ring, 1, 3, 5, 7)
sample :loop_amen, slice: [0, 2, 4, 6].ring.tick
sleep 0.25
3.times do
sample :loop_amen, slice: r.choose
sleep 0.25
end
end
Give section 3.7 a look again. You have some important info missing. Your es variable is a directory, but sample will need a sample. Also, the colon is a typo. Assuming your sample is called play-me.wav :