# Time-stretching CPS changes with Tidal-Looper

**URL:** <https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [21 August 2023 17:36 UTC](https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834 "2023-08-21T17:36:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![biscuitvile](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/b/d6d6ee/32.png) [@biscuitvile](https://uzu.lurk.org/u/biscuitvile)\
**Post date:** [21 August 2023 17:36 UTC](https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834/1 "2023-08-21T17:36:42Z")

</div>

Hello! I am using the Tidal-Looper library and having great fun with it: [GitHub - thgrund/tidal-looper: Different looper variants for SuperDirt to provide live sampling in TidalCycles.](https://github.com/thgrund/tidal-looper)

I am also new to Tidal Cycles and following along with the online course, I hope that what I'm asking isn't frustratingly basic 🙂

What I'd like is to record loops with tidal-looper that get stretched appropriately when setcps is called and the tempo changes. It feels like this is something Tidal Cycles might do very well natively as opposed to the challenges I've had with this in Pure Data.

I have used the stretch function a bit but I'm not getting the effect I want. What I'd like is to record loops at any given cps that are "normal" and then correctly slow and speed the loops when setcps is called.

The way I have things working now is largely from the tidal-looper documentation and what happens when setcps is called is that space is inserted or removed from the end of the cycle.

Any guidance would be greatly appreciated! Thank you for your time.

---

<div class="post-metadata">

**Author:** ![heavy.lifting](https://uzu.lurk.org/user_avatar/uzu.lurk.org/heavy.lifting/32/150_2.png) [@heavy.lifting](https://uzu.lurk.org/u/heavy.lifting)\
**Post date:** [21 August 2023 19:16 UTC](https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834/2 "2023-08-21T19:16:53Z")

</div>

Hey, I think you might want to try loopAt:

d1 $ loopAt 1 $ sound "myloop"

It should stretch the loop so it always fits in exactly 1 cycle. If you want the loop to stretch over a different number of cycles just change the value

Apologies for crappy formatting - I'm on mobile

---

<div class="post-metadata">

**Author:** ![biscuitvile](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/b/d6d6ee/32.png) [@biscuitvile](https://uzu.lurk.org/u/biscuitvile)\
**Post date:** [21 August 2023 21:15 UTC](https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834/3 "2023-08-21T21:15:29Z")

</div>

@heavy.lifting Amazing thank you so much!!!!

For anyone new to this as well I found documentation for `loopAt` alongside `chop` here:

> **[Sampling | Tidal Cycles](https://tidalcycles.org/docs/reference/sampling/#loopat)**
>
> This page will present you all the functions that can be used to slice, cut, reverse or explode your audio samples, incoming signals or oscillators. Each function will be presented following the same model:

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [31 August 2023 10:48 UTC](https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834/4 "2023-08-31T10:48:02Z")

</div>

Noice! I wish you a ton of fun with the Tidal-Looper. I want to add, that I am playing around with the time stretching function here as well. So if you are looking for an approach where you don't want to change the pitch of the samples, then you can have a look here: [Samplers | Tidal Cycles](https://tidalcycles.org/docs/reference/samplers/#time-stretching)

But `loopAt` is the standard way to do this 🙂

---

<div class="post-metadata">

**Author:** ![biscuitvile](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/b/d6d6ee/32.png) [@biscuitvile](https://uzu.lurk.org/u/biscuitvile)\
**Post date:** [31 August 2023 12:37 UTC](https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834/5 "2023-08-31T12:37:20Z")

</div>

@mrreason thank you so much! This is truly a wonderful library on top of an already amazing piece of software. Using the tidal-looper has been very fun, thanks!

---

<div class="post-metadata">

**Author:** ![heavy.lifting](https://uzu.lurk.org/user_avatar/uzu.lurk.org/heavy.lifting/32/150_2.png) [@heavy.lifting](https://uzu.lurk.org/u/heavy.lifting)\
**Post date:** [10 September 2023 08:30 UTC](https://uzu.lurk.org/t/time-stretching-cps-changes-with-tidal-looper/4834/6 "2023-09-10T08:30:52Z")

</div>

Cool!!! I love tidal-looper, thanks again 🙏
