Changing sounds within Euclidean Rhythms

Bit of a latecomer/newbie here, still working my way through the cycle zero lessons. Really enjoying playing with the Euclidean rhythms, but I have a question regarding how sequencing samples works within said rhythms. Apologies if this is answered elsewhere or later on in the course - I’m finding it hard to move on until I’ve sussed it out.

I understand if I do this it will play a different sample for each cycle of the rhythm:

d1 $ n "<2 5>(5,8)” # s “808"

But what if I wanted to change the sample halfway through the cycle, or have a different sample be used for each Euclidean hit - how could this be achieved?

If I do this I seem to only get one hit:

d1 $ n "2 5" # s “808(5,8)"

Whereas this gives interesting but unexpected overlapping patterns:

d1 $ n " [2 5] (5,8)" # s "808"

This is probably all a result of my shaky understanding of how the mini-notation actually works, but I wonder if anyone could shed any light?


Starting with your middle example, when you combine two patterns with #, the rhythmic structure comes from the pattern on the left:

d1 $ n "2 5" # s "808(5,8)"

In that example, you will only hear n "2 5" because it defines the rhythm on the left hand side. The right-hand pattern s "808(5,8)" defines which sound to play, which is always going to be 808.

To get at your initial question:

You can do something like this:

d1 $ n "<[2 4] [5 3]>(5,8)" # s "808"

Which causes the [2 4] pattern to play for one cycle, then [5 3] to play for the next cycle. Thus, in the first cycle the pattern will start with sample #2, then halfway through the cycle change to sample #4. Then in the second cycle, the pattern will start with sample #5, then halfway through the cycle will change to sample #3.


You could use struct for that. For instance:

d1 $ struct "t(5,8)" $ sound "808" # n "2 5"

The pattern will get its structure (i.e. the steps, in this case an euclidean pattern) from the left. it will use the "808" sample for every step and will use sample number 2 for the first half of the cycle, and sample number 5 for the second half.


Thanks for these, I hadn't realised about the rhythmic structure coming from the left, that makes a lot more sense now.

@kindohm Your example doesn't seem to behave as I'm understanding your description, at least when I run it. It seems to be playing samples #2 and #4 at the same time (albeit slightly delayed/echoing each other, kinda like the third piece of code in my original post) before switching to #5 and #3 with the same rhythm. Maybe I'm misunderstanding or have something set up wrong though?

After playing around with the example @niels gave I've come up with these, but there is still behaviour I don't get. If I do this it counts from 1 to 3 in rhythm as expected:

d1 $ s "numbers(3,8)" # n "1 2 3"

However this doesn't count from 1 to 5 as I'd expect but '1 2 2 4 4' instead:

d1 $ s "numbers(5,8)" # n "1 2 3 4 5"

I'm guessing it's something to do with how it's trying to fit the sequence of samples into a single cycle?

1 Like

@DanD I didn't test my example first, and you're right, it has more of a fast stuttering effect than what I described. Weird!

Let's go through your other two examples. You're exactly right about how Tidal fits the two sequences into a single cycle.

The first pattern:

d1 $ s "numbers(3,8)" # n "1 2 3"

Can be visualized with the drawLine function, by combining the two patterns into a single mini-notation pattern (substituting "x" for "numbers", for alignment):

drawLine "[ x(3,8), 1 2 3]"

This results in:

[3 cycles]
|x--      x--      x--   |x--      x--      x--   |x--      x--      x--   

You can see how the n pattern on the bottom sets its value at or before the sample "x" is played. So each time a sample is played, the n pattern has advanced.

The second example:

d1 $ s "numbers(5,8)" # n "1 2 3 4 5"

Can be approximated in drawLine like:

drawLine "[x(5,8),1 2 3 4 5]"

And produces this result:

[1 cycle]
|x----     x----x----     x----x----     

Here, you can see that the n and sample (e.g. "x") pattern don't quite align. The x Euclid pattern is filling time based on eighths of a cycle (filling five of eight slots), whereas the n pattern is being divided into five equal segments. So you kind of have a weird eight-over-five layering, and the Euclid is trying to fit five events into eight slots equally. The result is an uneven distribution of samples to numbers.

This is really difficult to describe!! Hopefully this helps!


Also the <[2 4] [3 5]>(3,8) issue with the "stuttering" is baffling to me. drawLine confirms what we hear, but I do not understand why it produces the rhythm that it does:

drawLine "<[x y] [a b]>(3,8)"

[4 cycles]
|xy    xy    xy  |ab    ab    ab  |xy    xy    xy  |ab    ab    ab  

I think this happens because Tidal treats [2 4] or [5 3] as a single step, and then applies the Euclidian transformation to that.

So if we have x(5,8) we get something like:

"x ~ x x ~ x x ~"

Whereas [x y](5,8) gives us:

"[x y] ~ [x y] [x y] ~ [x y] [x y] ~"

If you then alternate between [x y] and [a b] we get the pattern described by drawLine (although in my example I used (5,8) rather than (3,8), but it's the same idea!)

To get the effect you described Mike where the sample changes halfway through each cycle you would need to do:

d1 $ sound "808(3,8)" # n "<2 5> <4 3>"

To control the sample on each step there are a number of options, but basically you do have to think about how Tidal will be mapping the 5 events across 8 steps, which can get quite confusing (see Mike's example above).

Your best bet for now might be to set the samples across 8 steps rather than 5 - something like this:

d1 $ sound "arpy(5,8)" # n "0 1 2 3 4 5 6 7"

(I chose arpy rather than 808 here as I don't think 808 actually has 8 samples in so didn't illustrate my point very well!)

You could take that as a starting point and play around with it using your ear to decide what you like the sound of.

The key thing to remember is that Tidal doesn't think of 808(5,8) as a pattern of 5 uneven steps, but as a pattern of 8 even steps, with some rests in there.

I don't think Alex has written about the mininotation yet, but Patterns I Have Known and Loved does have some good diagrams which help explain how tidal thinks about time.


Thanks all for taking the time to explain this. I think one of the issues is that I’m still thinking of sequencing as it works in more traditional software/hardware, and I’m quickly gathering that Tidal just doesn’t behave like that (in a fun way).

@kindohm Those diagrams are super helpful thank you. I see how the samples and hits are lining up or not now. It made perfect sense! Will have to remember to make use of drawLine to figure things out in future.

@heavy.lifting Your comment about Tidal seeing (5,8) as an 8 step pattern with rests really helped me to understand this. I was thinking of it how something like Pure Data would work where each Euclidean hit is a ‘bang’ that advances the sequence, or a modular synth with gates and triggers.

So the question is if you did want to have a (5,8) rhythm go through samples in turn how could this be achieved? To give a less abstract example say we define a sequence of notes “c f e g” and play through it with a (3,8) rhythm how could you get it to play through them like the following:

Cycle 1 > c f e

Cycle 2 > g c f

Cycle 3 > e g c

…and so on. If the answer is “It’s complicated” or “Tidal just doesn’t work like that” I’m ok with that. Having spent the last year playing around with modular synths I’ve had plenty of “I’m not entirely sure what’s going on here but it’s making a good noise so whatever” moments.

Ha this is a great challenge @DanD - I'm sure it's possible theoretically but I can't figure it out.

I know how to do it in FoxDot :sweat_smile:

Maybe with d1 $ s "thefolderyouneed(5,8)" # n (run 8) ?

Well I think I can approximate with draw line, but it means explicitly defining the pattern:

 drawLine "[x(3,8), <c g e> <f c g> <e f c>]"

[3 cycles]
|x--      x--      x--   |x--      x--      x--   |x--      x--      x--   

Probably not what you want...

Did you ever work out how to do this @DanD? I've been playing with a similar idea and can't work it out either :slight_smile:

1 Like

d1 $ struct "t(3,8)" $ n "{c f e g}%3"

Does this do it?

drawLine "[x(3,8), {c f e g}%3]"
[3 cycles]
|x--      x--      x--   |x--      x--      x--   |x--      x--      x--   
1 Like

I think is an answer to this:

The run 8 will make sure a unique sample is played for each of the eight steps of the (5,8) (assuming there are at least 8 samples in the folder).

Picky detail, but run will start at index 0, so run 7 would be sufficient.

I don't have time to give a proper answer here, but I've also been exploring sew and stitch which can also substitute samples independently of the rhythm. Will try and remember to circle back and give a more complete answer on those (otherwise if someone else wants to, that is cool too!).

1 Like