Is there {},{} for patterns?

I was wondering if there was a way to join patterns (sounds and notes) that mirrored the polymetric behavior of {},{} in mini notation?

Basically something that generates the same results as the following without having to hard-code the ratio or put the pattern in a list?

d1 $ s "numbers alphabet arpy" |< n "[0 1]*4%3"
-- numbers:0 alphabet:1 arpy:0 numbers:1 alphabet:0 apry:1

You're really trying to treat a pattern as a list here, so I think the most straightforward (and least deceptive?) solution is going to use a list:

d1 $ s "numbers alphabet arpy" # nTake "foo" [0, 1]

or if you want to fiddle with the pattern structure on the right:

d1 $ sTake "bar" ["numbers", "alphabet", "arpy"] <| n "{0 1}%3"

(BTW, I'm assuming from your example that you actually want n "[0 1]*3%2", and this is more easily written as n "{0 1}%3")

1 Like

Thanks. Yea, I have no clue where the 4/3 came from. I'd run across nTake but was put off by the statefulness of it. Yes, I'm treating a pattern as a list but how is that really different from

d1 $ sound "{bd hh sn cp, arpy bass2 drum}"

where the second pattern repeats (plays faster) to align with the first pattern?

Anyway, this is the first working version of a function that does what I want. I still need to make it more like the applyPatTo* functions and use the real arc.

let l ## r = l # fast ( lengthL / lengthR ) r
        where lengthL = patLen l
              lengthR = patLen r
              patLen p = fromIntegral $ (length ( queryArc p (Arc 0 1) ) )

So I can use it like

d1 $ s "numbers alphabet arpy" ## n "[0 1]"

Anway, it's all for fun and learning.

1 Like

It's not really a problem for what you're doing, but what I mean is that while some patterns can be though of as list-like, in general they can do a lot of things beyond lists.

As an example, using your patLen function:

> patLen $ s "a ~"


> patLen $ s "[a,b]"


These particular examples maybe could be fixed, but in general there just isn't a universal notion of "length" of a pattern.

Sorry for leaping in here, but I'd like to ask what the % actually does in this example. I know what a modulo is, but I'm having a hard time wrapping my head around what it does when applying it to a pattern in TidalCycles and I can't find any explanation over at
Thanks already in advance!

It causes the pattern to be played in the specified number of subdivisions. So in this example the arpys play at the same speed.

d1 $ s "{arpy:0 arpy:1 arpy:2}%4" # gain 0.5
d1 $ s "{bd bd bd bd, arpy:0 arpy:1 arpy:2}"
1 Like

Oh yeah, I know. Any randomization like ? as well as using fast or slow to create interesting time signatures that cause alternation between patterns and hundreds of other ways to cause the patterns to change across cycles make it an impossible task.

Thanks for the explanation! After all, I also found it in the documentation just now - It's under "Polymetric Sequences with Subdivision"