Euclid and melody

I feel like this should be easy, but I can't see a solution. If I use the special mininotation for Euclidian rhythms, and I have, say, an arpeggio I want to play on that beat how do I code that nicely (without knowing in advance where the Euclidian active beats are.

This works, but picks up the new note every cycle:

d3 $ note "<c e a>" # s "superpiano"

I am basically looking for the equivalent to pick up a new note every active Euclidian beat.


d3 $ struct "t(3,8)" $ n "c e a" # s "superpiano"

1 Like

nTake will match every new euclidean note with the next note in a list. you just provide the name of the counter and the notes.

d3 $ euclid 9 16 $ nTake “counterName” [c,e,a] # s "superpiano"

tidal 1.7+ i believe

from Alex’s teaching tidal to count on youtube: TidalCycles Meetup 1 - Alex McLean: Teaching Tidal how to count - February 27, 2021 - YouTube



Thanks. Didn't quite work on my version (note names tripped it up), but

d3 $ euclid 5 8 $ nTake "n" [0..4] # s "superpiano"

Does work

1 Like

Thanks. Nice and succinct.

Is there a way to do this with the notes defined by Tidal's chord notation? For example, instead of using using [0..4], can we use (arp "up" "a'min7'5")?

This should work just fine

I think I must be messing up the grammar of it. It doesn't seem to work in the way I would naively expect:

d1 $ euclid 5 8 $ nTake "counterName" (arp "up" "a'min7'3") # s "superpiano"

Is there another way to structure it so that it does work?

Ah, sorry, misunderstood the question.

I think using the Tidal chord notation will be tricky here because you want a list for nTake but the chord notation only happens when parsing to a pattern. It's a little awkward, but you can get kinda close by importing some chord names:

import qualified Sound.Tidal.Chords as Ch

chord n ch = take n $ concat $ iterate (fmap (+12)) ch

d1 $ euclid 5 8 $ (|+ n "a") $ nTake "foo" (chord 5 Ch.minor7) # s "superpiano"

Thanks @bgold, that's a super creative way to make it work!