Another option to play just a specific slice of a sample is to use the start:
and finish:
opts which take a number between 0
and 1
.
For example to play the first half of a sample:
sample :loop_amen, start: 0, finish: 0.5
Or to play the last quarter:
sample :loop_amen, start: 0.75 finish: 1
How about the last quarter in reverse:
sample :loop_amen, start: 1 finish: 0.75
This can also be combined with the num_slices:
approach explained above. How about the first of 4 evenly sliced chunks taken from the last half of the sample:
sample :loop_amen, start: 0.5, finish: 1, num_slices: 4, slice: 0
Finally, another option to explore with respect to slicing up samples is the onset:
option which uses audio analysis techniques to guess where the sample should be best sliced. You therefore don’t get n evenly measured slices, rather just some number of onsets which typically get cut at the high energy points in the sample (such as a drum hit):
sample :loop_amen, onset: 0