Use struct and oscillators

I like to use struct to separate my sounds from their rhythms (like you'd do in a DAW)

I also want to use oscillators like sine, but they don't work as expected when using struct, I think because they take their pattern from whatever is just to the left. In this case, it's usually just a single sound. For instance:

-- this works
d1 $ sound "sd*16" # pan sine

-- this doesn't 
d1 $ struct "t*16" $ sound "sd" # pan sine

Is there some way to make the second example work?

1 Like

This doesn't work because you're creating a pattern of a single element, assigning a panning to it and then structuring it. You want to have a pattern of a single element, structure it, and then pan it with sine:

d1 $ (struct "t*16" $ sound "sd") # pan sine

-- or, easier:

d1 $ struct "t*16" "808sd" # pan sine

The last one works because since struct takes 2 elements (a pattern of Bool and a pattern of any kind). Here the pattern you send in to structure is simply "808sd", and Tidal assumes a pattern of strings is the sound.

Remember that the $ sign is basically like putting everything after it between parenthesis. So when you struct "t*16" $ sound "sd" # pan sine, it's equivalent to struct "t*16" (sound "sd" # pan sine)

8 Likes

wow thank you so much @geikha ! you have absolutely blown my mind. I'll be experimenting with this later!

1 Like