# Play long sample across loop

**URL:** <https://in-thread.sonic-pi.net/t/play-long-sample-across-loop/5675>\
**Category:** Support, Help & Resources\
**Created:** [June 6, 2021, 7:37pm UTC](https://in-thread.sonic-pi.net/t/play-long-sample-across-loop/5675 "2021-06-06T19:37:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [June 7, 2021, 3:32am UTC](https://in-thread.sonic-pi.net/t/play-long-sample-across-loop/5675/3 "2021-06-07T03:32:06Z")

</div>

Hi @zabladowski 🙂 Not sure where in the forum that particular example might be - finding things can be a bit challenging sometimes!

You only really need to determine slices based on the sample duration if you prefer to track lengths of time for a specific reason. Otherwise, Sonic Pi has simple ways of slicing samples into chunks - as @holz mentions, the `slice:` opt is a simple way to play a chunk of the sample. You can divide the whole sample up into evenly sized slices with `num_slices:`, and pick which slice each time around a loop to play with `slice:`.

If you’re only interested in playing successive slices each time, rather than jumbling them up, then you’d just use something like ` sample ..., slice: tick` to play each next slice every time around the loop.

There are other ways you can tell Sonic Pi to slice up a sample - see the following for a few more details:

> [@How do you guys chop samples?](https://in-thread.sonic-pi.net/t/how-do-you-guys-chop-samples/4676):
>
> Hi there, still new to Sonic Pi and chopping samples. I downloaded this Sample from Splice Sounds, using Ableton I was able to cut the reminder of the sample in order to make it a perfect loop at 100bpm (4 bars). Works fine in Ableton, however when chopping it in Sonic Pi I don’t get an evenly chopped slice of the sample… I was expecting to divide the sample (4 bars long) in 4 sections of 1 bar (4 beat) each one. This is my approach to chopping samples: live\_loop :example do sample x, num\_sl…

---

_[View the full topic](https://in-thread.sonic-pi.net/t/play-long-sample-across-loop/5675)._
