Quantizing pattern start times

Apologies for a newbie question –

Say I have the following simple patterns in Tidal:

do
    d1 $ n "c d e ~ f g ~ a ~ b c ~" # s "supermandolin"
    d2 $ n "~ c d e ~ f g ~ a ~ b c" # s "supermandolin"
    d3 $ s "sd ~*11" -- play a snare on beat 1, for orientation

I would like to ensure that whenever I trigger this block, the patterns will wait until beat 1 to enter (i.e., with d3 playing a snare drum and d1 playing c), rather than starting on whatever beat the sequencer is currently at when I execute the block. The behavior I’m interested in is similar to Ableton’s clip quantization, if that’s helpful.

I’m sure this is simple to do – please bear with me :slight_smile:

I’m quite beginner also, but it’s already done :wink:
If I understood correctly how Tidal works when you trigger this block you “sd” sound will be always on the beginning of the (next) cycle, or if you prefer on the first beat.
You can simplify your code in this way:

do
  d1 $ n "c d e ~ f g ~ a ~ b c ~" # s "supermandolin"
  d2 $ n "~ c d e ~ f g ~ a ~ b c" # s "supermandolin"
  d3 $ s "sd"

Thank you for your help! I think I wasn’t clear enough in the original post.

I agree that the snare always plays when the sequencer reaches beat 1 - that’s great, and ensures that the patterns are always properly aligned. What I want, however, is that whenever I execute this code block, the first sound that I hear is the snare. For example, if I trigger this block while the sequencer is on the downbeat of 3 (d1 playing f, and d2 playing a rest), I want the code to wait for 4 beats before executing, so that the first thing I hear is d1 playing c and d3 playing sd. Does that make sense?

I reckon you need to look at transition functions,specifically jumpIn’ …
see http://pages.tidalcycles.org/functions.html#transitions

1 Like