# Patterning shifts and rotations

**URL:** <https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [20 October 2024 10:36 UTC](https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482 "2024-10-20T10:36:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![trampbunny](https://uzu.lurk.org/user_avatar/uzu.lurk.org/trampbunny/32/3152_2.png) [@trampbunny](https://uzu.lurk.org/u/trampbunny)\
**Post date:** [20 October 2024 10:36 UTC](https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482/1 "2024-10-20T10:36:35Z")

</div>

Playing with shifts and rotations with euclid patterns, and looking for more performative ways of manipulating time shifts. Here's an example pattern

```haskell
d3
$ stack [
  every 2 (rotL (1/12)) $ s "clap:3(5, 12)" # pan 1,
  s "shaker*12" # n "10" # pan 0
]

```

Right now the shift is expressed in terms of units of pattern (2/12).

Patterning fractions is a bit difficult though for performances' sake. I've tried this method for a more mini-notation style

```haskell
d3
$ stack [
  ("<0.0833 0>" <~) $ s "clap:3(5, 12)" # pan 1,
  s "shaker*12" # n "10" # pan 0
]

```

But converting to a fraction feels really tedious. Is there an easier way to explore the patterning of time-shifts?

---

<div class="post-metadata">

**Author:** ![trampbunny](https://uzu.lurk.org/user_avatar/uzu.lurk.org/trampbunny/32/3152_2.png) [@trampbunny](https://uzu.lurk.org/u/trampbunny)\
**Post date:** [20 October 2024 11:00 UTC](https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482/2 "2024-10-20T11:00:15Z")

</div>

Actually I'm finding this accomplishes the effect I'm looking for 🙂 but if there are any other creative ideas I'd love to know

```haskell
d1 
 $ while "t f" ((# speed 2) . (# pan 0))
 $ someCycles ((1/16) <~)
 $ ply 2 . struct "t(7,16)" 
 $ s "bd"
 # orbit 0

```

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [22 October 2024 01:05 UTC](https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482/3 "2024-10-22T01:05:27Z")

</div>

I'm not in a position to understand the effect here, but one of the things @kit-christopher put me onto was using `plyWith` with shifts eg

```haskell
d1 
 $ while "t f" ((# speed 2) . (# pan 0))
 $ someCycles (plyWith 2 ((1/16) <~)
 $ struct "t(7,16)" 
 $ s "bd"

```

Not sure what that will sound like, but it demonstrates the idea 🙂

---

<div class="post-metadata">

**Author:** ![trampbunny](https://uzu.lurk.org/user_avatar/uzu.lurk.org/trampbunny/32/3152_2.png) [@trampbunny](https://uzu.lurk.org/u/trampbunny)\
**Post date:** [22 October 2024 09:52 UTC](https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482/4 "2024-10-22T09:52:03Z")

</div>

Thanks @cleary this is wonderful. I should try to clarify exactly what I was going for...

Time shifts take a pattern and move the entire thing e.g. ((1/16) \<~) rotates a euclid pattern around by a 16th of that pattern, and works well if you have a euclid pattern divided by 16, 8, 4, etc.

What I was looking for manipulates the (1/16) in interesting ways. And in my opinion someCycles does that pretty well because it's adding that element of chance. I think "iter" and "whenmod" could do that as well.

I didn't know about plyWith, it seems that only affects the repeats and not the original? Very useful either way.

---

<div class="post-metadata">

**Author:** ![kit-christopher](https://uzu.lurk.org/user_avatar/uzu.lurk.org/kit-christopher/32/686_2.png) [@kit-christopher](https://uzu.lurk.org/u/kit-christopher)\
**Post date:** [22 October 2024 14:40 UTC](https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482/5 "2024-10-22T14:40:21Z")

</div>

I was searching for a solution in which one could apply a function globally to simulate a [DJ Screw-style beat chase](https://www.youtube.com/shorts/KGRDZfwuLEE). It works well if you have a pretty simple, straightforward 4/4 beat. I think I patterned an 1/8 note shift. Almost guaranteed this effect is not going to sound too great with some super odd euclid patterns 😉 but someone please prove me wrong!

---

<div class="post-metadata">

**Author:** ![geikha](https://uzu.lurk.org/user_avatar/uzu.lurk.org/geikha/32/2701_2.png) [@geikha](https://uzu.lurk.org/u/geikha)\
**Post date:** [28 October 2024 18:26 UTC](https://uzu.lurk.org/t/patterning-shifts-and-rotations/5482/6 "2024-10-28T18:26:43Z")

</div>

Explanation of the effect:

Given your pattern you'll have it `ply 2`, which means, it'll take each element in the pattern and double it in the same way `[something]*2` does. When using an euclid such as `t(7,16)`, this means you'll have each active sixteenth turned into `2` consecutive thirty-seconds (note if you had used `ply 3` they would be 3 forty-eighths and so on). What `plyWith` allows you to do is applying some function to the new sub-repetitions you get from using `ply`. In this case it simply shifts them back a `1/16`. Essentially putting these repetitions a thirty-second before the original notes instead of after.

It's kind of as if you could do `t(7,16,[0,-0.5])` ! (which you can't, euclids don't take fractionals there)
