How do you read/write Tidal code? (topic from the Discord)

I wanted to share the following message that @xmacex (i think this username is the same mace? sorry if it's not) shared in the code-talk channel of the ds:

How do you read Tidal code? Do you read left to right, right to left, do you try to see where the control and sound patters pivot, do you imagine(=audiate) or even vocalize the rhythms and it's modifications as you read etc?
_ Mace

Their message came from a feeling of struggle at reading. But I think this is an interesting topic to discuss in general. Knowing what are we trying to read first, and why, etc, can help us understand what are we looking for in Tidal's syntax. And I think this also defines how we try to write our own code in some way or other. So I'm also asking:

How do you write Tidal code? What do you prioritize while writing? Do you avoid some practices or even functionalities because of code rather than their applicability? Etc.

3 Likes

Thanks for bringing it here, it was indeed me. Looking forward to hearing (=reading!) about how other people do it.

I tend to locate where the s is, and then read backwards from it toward the d, and try to visualize in my mind how the events would be placed on a unit cycle, and also try to imagine (=audiate) in my mind the rhythm of events during a cycle. I tend to ignore everything that has a # because i think of them as kind of secondary, to "smear some audio effects on top" once the pattern has been constructed once we arrive at the d. I am also trying to read each line as a transformation, with the understanding that this is "the functional way", and I also try be mindful if the author has placed multiple things on the same line, e.g. every 4 rev $.

I hope to improve my practice in three ways: firstly try to not think of a linear time, but cyclical time inspired by the graphics about cycles in the docs. Secondly I should use pen+paper more to read and draw during reading. But thirdly I would like to not do that second thing of drawing, but instead exercise my lacking competence to think in sound and not visuals. A struggle indeed :slight_smile:

Oh yeah one thing I try to do is give meaningful names in my mind for the functions, e.g. "reverse" for of rev, "reverberate" for room, for "slice the sample and maybe wiggle pitch" for splice &c as I read.

As a background I am a neophyte in Tidal and Haskell but have programming experience and have been messing around with synths+drummachines for a few years. Looking at Tidal code is hard for me, and of course typing it in and listening to it and poking and prodding it sure helps, and also simplifying by commenting out lines.

2 Likes