Using eucliean notation inside curly braces

These two phases look/behave the same on their own:

s "x ~ ~ x ~ ~ x ~"
s "x(3,8)"

But seem to behave very differently inside the curly braces:

s "{x ~ ~ x ~ ~ x ~, y ~ ~ }"
s "{x(3,8), y ~ ~}"

The y seems to repeat once for every 23 'x beats' in the 2nd example - which feels like a bug, but I'm not sure.

The sound of euclidean patterns playing against a regular cross rhythm is a very cool sound - other than spelling it out 'long hand', is there any way to do this?

can you just layer the patterns within the regular square brackets?

Within regular square brackets the two patterns line up every cycle, but within curly braces (and I'm not sure if I'm phrasing this accurately but this is how I conceptualize it) the length of the pattern subdivision of the first pattern determines the length of the second pattern's subdivisions (and the subdivisions from both patterns share a common pulse). So not polyrhythm but polymeter, if I understand the terms correctly.

That means that s "{x ~ ~ x ~ ~ x ~, y ~ ~ }" (a fairly simple example) should repeat every 3 cycles (or every 24 beats).

Not sure how to achieve the same effect with square brackets apart from figuring out the resultant rhythms and typing it out in 'long hand'.

copy that. yeah, not sure! i totally see what you mean. the "long hand" pattern is nice and not at all like the euclid version.

Yes that looks like a bug!

drawLine "{x(3,8), y ~ ~}"
[8 cycles]
|x  x  x |x  x  x |x  x  x |x  x  x |x  x  x |x  x  x |x  x  x |x  x  x 
|y-------                |y-------                |y-------         

You can report it here:

1 Like

Thanks for confirming. . . I reported the issue

Hello! Have there been any solutions to this? Like @crashingbooth I would like to play with Euclidean rhythms that span several cycles polymetrically. I also noticed that using the * mini-notation within curly brackets does not seem to work as expected. Compare these examples:

drawLine "{y*8, a b c}" -- doesn't work as expected

drawLine "{y y y y y y y y, a b c}" -- works

-- Euclidean rhythms:
drawLine "{y*8, x(3,7)}" -- doesn't work as expected

drawLine "{y*8, x ~ x ~ x ~ ~}" -- doesn't work as expected

drawLine "{y y y y y y y y, x ~ x ~ x ~ ~}" -- works

I would love to be able to use the Euclidean mini-notation in a polymetric (curly-braces) scenario. I've done similar things with SuperCollider but hope that I can make it work in Tidal.

I think the discussion on github issue I opened concluded that there are situations where treating x(3,8) as a single step rather than 8 is expected behaviour, and modifying that would be a breaking change.

Fwiw, you can easily make these work with a few extra keystrokes by moving the euclidean (or *8 etc) pattern out of the curly braces and explicitly setting the pulse of the 2nd part with %:
drawLine "[x(3,8), {y~~}%8]"

1 Like
drawLine "{y*8, a b c}" -- doesn't work as expected

* will treat 'y' as a subpattern in a single step, and 'speed it up'. To repeat a step, use ! instead:

drawLine "{y!8, a b c}"

This one is similar, they both are subpatterns so take up one 'step':

drawLine "{y*8, x(3,7)}" -- doesn't work as expected

Replacing the * with ! as above takes us halfway.. Unfortunately there isn't an alternate euclidean syntax that does what you want, but you can stretch that step out with @:

drawLine "{y!8, x(3,7)@7}" 

Ahh this amazing, thanks @yaxu. This opens up lots of doors with Tidal. I love being able to layer up different Euclidean sequences of different lengths and modulate the density of the sequences with the first k variable:

d1 $ s "[{hh!8, ht(<8 6 4 2>,11)@11, lt(<1 3 5>,7)@7}, bd sd]"

Since the second variable n in the Euclidean syntax has to be the same as the number after the @ (i.e. x(k, n)@n ), it would be super convenient to be able to use setF for this purpose. This works for the two variables inside the parenthesis, but doesn't work for the number after the @. This was mentioned in this thread.

setF "kVal" $ "3"

setF "nVal" $ "7"

d2 $ s "[{hh!8, ht(^kVal, ^nVal)@7}, bd sd]" -- works

d2 $ s "[{hh!8, ht(^kVal, ^nVal)@^nVal}, bd sd]" -- no error but doesn't play correctly