Euclid sequencing in place of randomness

I’ve been going through a phase of trying to not use so much randomness in my patterns. I’m trying to get away from doing things like this:

-- noooo!!!
d1 $ degradeBy 0.3 $ s "percussion*16" # n (irand 20)

Complex Euclid Sequences

In Tidal, there are many ways that you can make complex patterns that seem to be random. My favorite technique as of late is to use the Euclid sequencing.

Starting with this:

d1 $ s "kick(<13 10 9 11 5 7>,16,<0 6 10 2>)"

Bam! That will result in many cycles of different kick drum rhythms. I don’t even know how many cycles the above pattern will take to finally repeat.

Inverted Euclid Sequences

The next thing I’ve been doing is combining some sort of percussion part with the kick drum, and re-using the Euclid logic as an inverted pattern with struct:

let pat = "1(<13 10 9 11 5 7>,16,<0 6 10 2>)"

d1 $ struct pat $ s "kick"

d2 $ struct (inv pat) $ s "percussion"

That results in a solid stream of 16th note drumming. If you want to add some space, you can shift things around:

d2 $ (2 ~>) $ struct (inv pat) $ s "percussion"

Or slow things up once in a while:

d2 $ every 3 (slow 2) $ (2 ~>) $ struct (inv pat) $ s "percussion"

Non-Random Sample Selection

Then for selecting samples, again you can get a lot of random-sounding variation without being random. Starting with a simple run 16 and building it up:

d2 $ struct (inv pat) $ s "percussion" 
        # n (run 16)

d2 $ struct (inv pat) $ s "percussion" 
        # n (palindrome $ run 16)

d2 $ struct (inv pat) $ s "percussion" 
        # n (foldEvery [2,5,6] (0.5 ~>) $ palindrome $ run 16)

d2 $ struct (inv pat) $ s "percussion" 
        # n (every 3 rev $ foldEvery [2,5,6] (0.5 ~>) $ palindrome $ run 16)

Or try in different combinations:

d2 $ struct (inv pat) $ s "percussion" 
        # n (palindrome $ every 3 rev $ run 16)

Nothing really ground-breaking here, but I thought I’d share what’s been on my mind recently. I’ve been in a mode of using randomness for so long and I’m just finding it more interesting to try to create randomless stuff!

9 Likes

I love doing this too, and think of it as really being about making your own random functions, instead of using the build-in ones… Because rand isn’t really random, it’s just a mathematical function of time. Rolling your own allows you to play with the perceptual boundary between coherent pattern and incoherent noise…

1 Like

@kindohm would It Be possible to use the same technique with the euclid function?
Like:

d1 $ euclid “<3 8 5> 16 <0 2 8 9>” $ s “percussion”

I’m not sure this Is going to work… Never tried out actually…

Yes, the euclid function can be used for this too, although the pattern arguments need to be separated:

d1 $ euclid "<3 7 5>" "16" $ s "percussion"

Note that euclid does not accept a third argument for the rotation parameter. I see that there is a euclidFull function in Tidal that accepts three patterns as arguments, but I have never tried it. Perhaps this might work:

-- UNTESTED
d1 $ euclidFull "<3 7 5>" 16 "<0 10 5 3>" $ s "percussion"
1 Like

Nice! I did not even know about euclidFull!
I m going home experimenting right away!

euclidFull tested and working beautifuly!

For sample selection I think you need to place the note function before the sample folder:

d2 $ struct (inv pat) $ n (run 16) 
        # s "percussion"

otherwise you just get one sample repetition.

Really helpful tips though, thanks dude

In testing:

euclid 3 16 /= euclidFull 3 16 0

Zero should be no rotate, so they should sound the same? But that’s not the case with my testing

from the wiki:
“You can also add a third parameter, which ‘rotates’ the pattern so it starts on a different step”

Wondering if there is any other way to achieve this:

do
d1 $ slow 2 $ (# nudge "[0 0.04]*4") $ euclid "<5>" "<8 9>" $ n "1 [38 38*2 ~]/3 340" # cut 1 # "808"
d2 $ slow 2 $ (# nudge "[0 0.04]*4") $ struct (inv "1(<5>,<8 9>)") $ n "1 38 340" # cut 2 # "808" +7

specifically:

euclid "<5>" "<8 9>" $ n "1 [38 38*2 ~]/3 340"
struct (inv "1(<5>,<8 9>)") $ n "1 38 340"

Compare d1 and d2. The euclid function allows things like [38 38*2 ~]/3 in the pattern. But the other way of writing euclids, as you show, lets you use struct to inverse it. You can’t do one without the other it seems?

Forgive me for the foggy explanations / question here, I’ve been trying to get predictable results when combining euclidian rhythms with struct and midi notes.

For instance :

d1 $ struct "t(6,8)" $ n "0 1 2 3 4 5" #syn1

d2 $ struct "t(6,16)" $ n "0 1 2 3 4 5" #syn1

Both have 6 notes a cycle, but the resulting sequence of notes (I’m not talking about the rhythm itself) is completely different.

d1 will result in 0 1 2 3 4 5.
d2 will result in 0 1 1 3 4 4.

Why ? I can’t figure out the logic of the distribution of the notes here. Spoiler alert, I’d love to :smiley:

Thanks !

edit : I gave it more thoughts and actually understand the “Why” (I do hehe, yay !).

Now what I mean to ask is : how can I have an array of notes played sequentially according to the rhythmic pattern defined by the Euclidian pattern ?