Polyrhythm by superimposed volume pattern measured in onset counts

I have a pattern in 4/4 with 2 quarters subdivided into 4 sixteenths each, and the remaining two quarters subdivided into 6 sixteenth sextuplets:

d1 $ sound "{[cpu:15*4][cpu:15*4][cpu:15*6][cpu:15*6]}"

Now I would like to superimpose a volume pattern of arbitrary length, say 5. With length I don't mean a constant amount of time, but rather a count of onsets. In the following example I superimposed a 5-pattern partitioned as 3+2:
Screenshot 2020-12-04 at 20.23.32
How would I realize this in Tidal if I only want to specify basically 3+2, i.e. not spell out how the superimposed volume pattern sprawls out over (potentially several repetitions of) the underlying "carrier" beat pattern?

1 Like

I think this is one of the rare use cases for the preplace family of functions. I'm not sure if it's available in the latest release of Tidal (I don't recall, I think there may have some issues left hanging), but it would look something like:

d1 $ preplaceWith union (1,1) (sound "bd*4 bd*4 bd*6 bd*6") (gain "1.2 1 1 1.2 1")
1 Like

Hello bgold,

this seems to be very interesting. How can I add preplace familiy of functions or preplaceWith union to bootTidal.hs ?

Thank you, @bgold! I just upgraded to tidal-1.6.1 but preplaceWith unfortunately resulted in:

    Variable not in scope:
        :: (a0 -> a0 -> a0)
           -> (Integer, Integer)
           -> ControlPattern
           -> ControlPattern
           -> Pattern ControlMap

Looking forward to when preplaceWith will be available!