Geometric series in TidalCycles

[bd [bd bd] [bd bd bd bd] [bd bd bd bd bd bd bd bd] [bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd] [bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd bd]]

Hey Tidal Club,
does anyone have a good idea how to generate geometric progressions in TidalCycles?
Let's say I want to have a series like this: 1,2,4,8,16,32 or like this 1, 0.5, 0.25, 0.125, 0.0625, 0.03125 and then back to 1 and repeat, but I don't want to type it out.
I'm actually looking for some way to create a exponential beats in TidalCycles - like in this track e.g.:

In SuperCollider there is the Pgeom object. I guess there's some fairly easy function one can write, but I lack familiarity with Haskell and wouldn't not how to go about doing this.
Looking forward to any hints!

3 Likes

The first idea that comes to mind is:

d1 $ fast "1 2 4 8 16 32" $ s "bd*6"

That should work...maybe...I'm on the phone now :slight_smile:

That's a nice solution! Thanks! I might just use this online tool here to generate my numbers, hehe: Generate a Geometric Progression - Online Number Tools - But couldn't I write a simple line of code in Haskell that calculates something like this?

Here it is

geom steps pat = fast (parseBP_E $ show steps) $ fast (cat $ take steps $ iterate (|* 2) 1) pat

d1 $ geom 6 "bd"

The multiplier value can be extracted as parameter too

11 Likes

Very nice! Thanks!

I think similar results can be achieved by using Hasekll's dot dot notation for creating ordered lists - as described in @kindohm's tutorial on Elastic Tempo Flux.

1 Like

The only way I've really discovered to get smooth, continuous acceleration in patterns is to use sine or tri functions with nudge or cps. I'm bringing this up because it's kind of what I'm hearing in the example clip, but I don't think it answers your question.

d1 $ s "bd*16" # nudge (range 0 1 $ slow 2 sine)

d1 $ s "bd*16" # cps (range 0.25 3 $ slow 3 sine)

Can of course take these further by making the range functions more complex:

I think cps produces much more reliable results, and nudge is typically better used as a constant latency offset, but you can have fun with both!

For reasons I don't understand, fast (and slow) manipulate time a little differently than nudge or cps, and I usually experience a lot ratcheting or stepping behavior when using them.

8 Likes

interesting insight - thanks, @kindohm!
I'll play around with that a bit