# Isorhythms in tidal

**URL:** <https://uzu.lurk.org/t/isorhythms-in-tidal/485>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [23 April 2020 19:11 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485 "2020-04-23T19:11:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattia.paterna](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mattia.paterna/32/112_2.png) [@mattia.paterna](https://uzu.lurk.org/u/mattia.paterna)\
**Post date:** [23 April 2020 19:11 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/1 "2020-04-23T19:11:01Z")

</div>

I got interested by a previous reference from @ana.mora to [isorhythms](https://en.wikipedia.org/wiki/Isorhythm) and I have been trying to define the same concepts in code. But I get to this problem which I can't wrap my head around.

Let's say I have a super-easy _talea_ of equal durations with a pause in the third step:  
`let talea = "t t f t"`  
and a super-easy _color_:  
`let color = "0 1 2 3"`

Now, when combining I would like to have something like `0 1 ~ 2 3`, i.e. a 5-step long melody where each step is a quarter of a cycle.  
But when doing `$ mask talea $ note color` the result sounds like `0 1 ~ 3` for each cycle.  
I know I could obtain something similar with `let melody = "{0 1 ~ 2 3}%4"` but I would really like to keep both the rhythm and the melody separated.

Does anyone have a handy hint on how to achieve it?

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [23 April 2020 22:29 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/2 "2020-04-23T22:29:41Z")

</div>

`fit` might be good for this.

But how do you get a 5-step rhythm from "t t f t"?

---

<div class="post-metadata">

**Author:** ![eris](https://uzu.lurk.org/user_avatar/uzu.lurk.org/eris/32/233_2.png) [@eris](https://uzu.lurk.org/u/eris)\
**Post date:** [23 April 2020 22:52 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/3 "2020-04-23T22:52:55Z")

</div>

I think I might understand what you are saying- you want a way to have the top level events of patterns step at the same rate implicitly instead of being squeezed into a cycle? Do I understand this correctly? So like, the events in "0 1 2" and "a b" would become 0a 1b 2a 0b 1a 2b etc...

---

<div class="post-metadata">

**Author:** ![mattia.paterna](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mattia.paterna/32/112_2.png) [@mattia.paterna](https://uzu.lurk.org/u/mattia.paterna)\
**Post date:** [24 April 2020 19:24 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/4 "2020-04-24T19:24:03Z")

</div>

@yaxu ideally you want to map the notes in the color to the durations in the talea _only_ - not the pauses. That is why I was picturing something like `0 1 ~ 2 3` as final result.  
@eris yes, ideally I want to have the events in `"0 1 2 3"` mapped only to the `t` .  
Perhaps I am tackling this from the wrong angle.

* * *

Ok, I think I got to understand one thing: I can achieve what I want if I have both talea and color within a cycle. E.g. `"t t [f t] t"` and `"0 1 2 3"` do what I wanted and the result sounds like `"0 1 [~ 2] 3"`.

But say that now I add one more subsequence, i.e. `"t t [f t] [1!2]"`. The triggered events from this binary pattern are 5, but I have only 4 events in `"0 1 2 3"`, meaning the 3 will be repeated instead of having the last event in the cycle being `0`. Do you see what I mean?

---

<div class="post-metadata">

**Author:** ![SpacepersonJ](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@SpacepersonJ](https://uzu.lurk.org/u/SpacepersonJ)\
**Post date:** [14 May 2020 18:59 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/6 "2020-05-14T18:59:27Z")

</div>

@mattia.paterna is this what you're looking for?:

d1 $ gain "{1 1 ~ 1 1}%4" # up "{0 2 4 5}%4" # s "arpy"

---

<div class="post-metadata">

**Author:** ![mattia.paterna](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mattia.paterna/32/112_2.png) [@mattia.paterna](https://uzu.lurk.org/u/mattia.paterna)\
**Post date:** [25 May 2020 07:46 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/7 "2020-05-25T07:46:25Z")

</div>

@SpacepersonJ sorry didn't see it!

> [@SpacepersonJ](#):
>
> d1 $ gain "{1 1 ~ 1 1}%4" # up "{0 2 4 5}%4" # s "arpy"

hmm I would say almost, but not entirely. That is because your code gives me this:

```haskell
tidal> gain "{1 1 ~ 1 1}%4" # up "{0 2 4 5}%4" # s "arpy"
(0>¼)|gain: 1.0f, note: 0.0f, s: "arpy"
(¼>½)|gain: 1.0f, note: 2.0f, s: "arpy"
(¾>1)|gain: 1.0f, note: 5.0f, s: "arpy"

```

where the last event in the first cycle is `note: 5.0f` instead of `note: 4.0f`. And when going on in the progression, the _"missing"_ note will be different, e.g. `0 2 ~ 5 0 2 4 ~ 0 2 4 5 ~ 2 4 5 ` etc. whereas in my case there would be _no_ missing note.

Ideally I would love to have this:

```haskell
"{(1, 0) (1, 2) ~ (1, 4) (1, 5)}%4"

```

where the first value in the tuple is `gain` and the second is `note`. I think this is not possible with the mininotation though.

---

<div class="post-metadata">

**Author:** ![greathorned](https://uzu.lurk.org/user_avatar/uzu.lurk.org/greathorned/32/1642_2.png) [@greathorned](https://uzu.lurk.org/u/greathorned)\
**Post date:** [28 December 2020 23:10 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/8 "2020-12-28T23:10:33Z")

</div>

Hi @mattia.paterna, did you ever find a solution to this? I have been racking my brain trying to figure it out too.

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [29 December 2020 01:04 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/9 "2020-12-29T01:04:42Z")

</div>

> [@mattia.paterna](#):
>
> But say that now I add one more subsequence, i.e. `"t t [f t] [1!2]"`. The triggered events from this binary pattern are 5, but I have only 4 events in `"0 1 2 3"`, meaning the 3 will be repeated instead of having the last event in the cycle being `0`. Do you see what I mean?

So you have a four things `[0,1,2,3]` and want to fit them to a rhythm with 5 things `0 1 [~ 2] [3 4]`  
that would be `fit 5 [0,1,2,3] "0 1 [~ 2] [3 4]"`. That would give "0 1 [~ 2] [3 0]" for the first cycle, and `"1 2 [~ 3] [0 1]"` for the second.. Is that what you want?

---

<div class="post-metadata">

**Author:** ![greathorned](https://uzu.lurk.org/user_avatar/uzu.lurk.org/greathorned/32/1642_2.png) [@greathorned](https://uzu.lurk.org/u/greathorned)\
**Post date:** [29 December 2020 17:26 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/10 "2020-12-29T17:26:13Z")

</div>

Thank you @yaxu. I found this thread because I had the same question as @mattia.paterna.

`fit` works well and accomplishes the basic isorhythm idea of separate pitch and rhythm cycles. I agree with @mattia.paterna that keeping the melody (color) and rhythm (talea) as separate as possible would open up lots of possibilities, especially if algorithmic transformations could be applied to the melody or rhythm separately.

Is it possible to apply transformations to only the rhythmic pattern (second variable) inside of `fit`? For example, could `(scan(15)/16) <~` below apply only to the rhythm but maintain the same melodic sequence? (As is the `<~` obviously shifts both melody and rhythm.)

```
d1
$ ( scan(15)/16 )
<~ n (fit 6 [0,4,-2,9,5] "0 1 ~ 2 ~ ~ ~ 3 4 ~ ~ 5 ~ ~ ~ ~")
# s "supervibe"

```

I'm still a Tidal novice and have only started to explore the possibilities with `let` and `do` blocks, which I suspect might be a solution. I'm coming to TidalCycles from SuperCollider and am still getting used to how it handles variables and modularization.

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [29 December 2020 23:18 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/11 "2020-12-29T23:18:14Z")

</div>

Hi, I'm not exactly sure what `scan(15)/16) <~` does but if you want it to only apply to the rhythmic pattern rather than the outcome of `fit` then you'd do

```haskell
d1 $ (n (fit 6 [0,4,-2,9,5] ((scan(15)/16 ) <~ "0 1 ~ 2 ~ ~ ~ 3 4 ~ ~ 5 ~ ~ ~ ~")))
  # s "supervibe"

```

I'm not fully sure that I have the parenthesis right there but you get the idea..

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [5 March 2021 10:19 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/12 "2021-03-05T10:19:51Z")

</div>

Isorhythms are now easy with the new [state values](https://club.tidalcycles.org/t/working-with-tidal-state-values-tidal-can-count/2955)

---

<div class="post-metadata">

**Author:** ![greathorned](https://uzu.lurk.org/user_avatar/uzu.lurk.org/greathorned/32/1642_2.png) [@greathorned](https://uzu.lurk.org/u/greathorned)\
**Post date:** [28 May 2021 17:33 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/13 "2021-05-28T17:33:25Z")

</div>

Ooh exciting!

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [24 July 2022 05:09 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/14 "2022-07-24T05:09:24Z")

</div>

> There's also this standard techno trick where a pulse "1 1 ~ 1 ~ 1" when applied to a progression of "a b c d e f g" would output "a b ~ c ~ d" "e f ~ g ~ a".

I've been wondering how to do this recenty... is this easily achievable at the moment in tidal?

edit: I think `rot` with a polymetre and timeLoop might get there? [http://tidalcycles.org/docs/patternlib/tour/alteration/#rot](http://tidalcycles.org/docs/patternlib/tour/alteration/#rot)

---

<div class="post-metadata">

**Author:** ![mmmoth](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mmmoth/32/2185_2.png) [@mmmoth](https://uzu.lurk.org/u/mmmoth)\
**Post date:** [26 July 2022 08:59 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/15 "2022-07-26T08:59:21Z")

</div>

This was a while back, but I went with tidalcycles generating midi notes, while pure data would have the sequence. Each pulse from tidalcycles would trigger the note I wanted.

---

<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:** [27 July 2022 01:54 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/16 "2022-07-27T01:54:13Z")

</div>

I think this should work, can't test -

```haskell
struct "1 1 ~ 1 ~ 1"
$ s "arpy"
# noteCount "n" [0..7]

```

ref:

> [@Working with Tidal state values - Tidal can count!](https://club.tidalcycles.org/t/working-with-tidal-state-values-tidal-can-count/2955):
>
> Here's a quick explanation of the new state stuff in Tidal 1.7.2 . It's still in flux and might change a bit in the next version. First here my slides from the tidal meetups, it might not make perfect sense on its own, but questions welcome: and here's the demo file. Not too musical but with a nice percussive set this gets wild pretty quickly! -- So what's the problem? -- It's tricky to get events to line up, lets say you wanted to -- pattern the structure independently from the notes (iso…

---

<div class="post-metadata">

**Author:** ![mmmoth](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mmmoth/32/2185_2.png) [@mmmoth](https://uzu.lurk.org/u/mmmoth)\
**Post date:** [27 July 2022 04:54 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/17 "2022-07-27T04:54:54Z")

</div>

What's noteCount?

It isn't searchable on the website.

---

<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:** [27 July 2022 05:06 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/18 "2022-07-27T05:06:44Z")

</div>

Just check the link provided above - that's the closest you'll get to documentation. It's the same as `nCount` except it works with `note` (pitch adjustments) instead of `n` (sample index or midi note adjustment, depending on the context you're using it with)

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [29 July 2022 12:00 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/19 "2022-07-29T12:00:47Z")

</div>

I couldn't get `noteCount` to work, but things like this do...

`j1 $ struct "<t t@2>" $ s "vrm" # nTake "notes" [0..4]`

---

<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:** [29 July 2022 20:37 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/20 "2022-07-29T20:37:30Z")

</div>

> [@cleary](#):
>
> ```haskell
> struct "1 1 ~ 1 ~ 1"
> $ s "arpy"
> # noteCount "n" [0..7]
> 
> ```

Cool - I apologise, I didn't test before writing.

Strangely, this does work also:

```haskell
d1 $ struct "1 1 ~ 1 ~ 1"
$ s "arpy"
# nCountTo "n" "<4 8>"

```

I'll have a dig when I get a moment, try and find out what happened to `nCount`

---

<div class="post-metadata">

**Author:** ![danny](https://uzu.lurk.org/user_avatar/uzu.lurk.org/danny/32/2604_2.png) [@danny](https://uzu.lurk.org/u/danny)\
**Post date:** [3 November 2024 08:14 UTC](https://uzu.lurk.org/t/isorhythms-in-tidal/485/21 "2024-11-03T08:14:56Z")

</div>

Doesn't the [left/right](https://tidalcycles.org/docs/reference/pattern_structure#all-the-operators) operators do it when it comes to separating rhythm and value?
