# Cycles within cycles?

**URL:** <https://uzu.lurk.org/t/cycles-within-cycles/4593>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [26 February 2023 18:45 UTC](https://uzu.lurk.org/t/cycles-within-cycles/4593 "2023-02-26T18:45:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Halley](https://uzu.lurk.org/user_avatar/uzu.lurk.org/halley/32/1956_2.png) [@Halley](https://uzu.lurk.org/u/Halley)\
**Post date:** [26 February 2023 18:45 UTC](https://uzu.lurk.org/t/cycles-within-cycles/4593/1 "2023-02-26T18:45:57Z")

</div>

Is there a way to have a hierarchy of cycles?

For instance:  
In every m//nth cycle, I want d1 $ f\_m (so f\_1 in each cycle of supercycle 1, f\_2 in each cycle of supercycle 2, etc.)

I don't think ``whenmod" is appropriate since  
a) it has type  
whenmod :: Int -\> Int -\> (Pattern a -\> Pattern a) -\> Pattern a -\> Pattern a  
while what I'm looking for is  
supercycle :: Int -\> Int -\> [Pattern a] -\> Pattern a

and  
b) I want it to change behavior every m//n cycles, instead of m % n (which will change every cycle).

Thanks!

---

<div class="post-metadata">

**Author:** ![jwaldmann](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/j/977dab/32.png) [@jwaldmann](https://uzu.lurk.org/u/jwaldmann)\
**Post date:** [27 February 2023 18:46 UTC](https://uzu.lurk.org/t/cycles-within-cycles/4593/2 "2023-02-27T18:46:07Z")

</div>

I don't quite understand the question. What does "m//n" mean?

Is this a "cycle of cycles" in your sense?

```haskell
 d1 $ slow 4 $ s "superpiano" + note ( scale "major" (squeezeJoin (fmap (\x -> run (pure x)) (run 8))))

```

outer cycle: `run 8`, inner cycles: run up to current value of outer cycle.
