Creating Rests

Total noob question. I love that Tidal works with cycles - however, when making a pattern, say something like this:

d1 $ note "0 4 7 ~" # s "superpiano"

The cycle has 3/4 for notes and one for a rest. What I'd like to hear is that pattern played maybe the equivalent of every other measure. But with that pattern at that original speed. Everything I've tried slows it down (loopAt, slow, etc). I'm sure I'll slap myself when someone explains...



you can use # silence to silence a whole pattern, so to silence your pattern every second cycle you can do

d1 $ every 2 (# silence) $ note "0 4 7 ~" # s "superpiano"


Self-face slap... that makes sense. At this point I've only used silence (or mute) as a standalone. Thanks for the help @polymorphic.engine!

A nice use of silence.

I would have gone probably for the obvious - much less elegant:

d1 $ slow 2 $ note "0 4 7 ~   ~ ~ ~ ~" # s "superpiano"

And actually that works, but if you do every 4, it loops the pattern 3 times before pausing (or resting).

It seems like there is something with either mini notation that I'm missing or some other function that can be applied. Or maybe # silence works with some params.

It seems the issue is squeezing all things into a cycle or slowing them down. I'm sure there are other ways, possibly even with stack - just wondering the best and shortest way. If you have have a bass-line and maybe only plays a small bit once every 4 measures... if you catch my drift.

Adding ~ ~ ~ ~ to it only speeds up the pattern by subdivision. This is where SuperCollider can do this, but then you actually MISS the cyclic functionality.

@mbutz Interesting. I tried that and didn't originally work the way I wanted. Maybe that's all it is. I notice a space between 0 4 7 ~ and the other 4. Is that a type (I'd think space is ignored) or something that is making it work?

EDIT: Yeah sorry, space doesn't matter - but still subdivides the pattern and makes it faster. However, with slow at the proper speed seems to work.

ANOTHER EDIT: That still doesn't work actually this way. What I seem to need is keeping the original pattern at the speed and then adding some variable amount of silence. Pattern 1 normal speed, Pattern 2 variable gap of silence. Think of a funk song where the bass-line only comes in once per measure. Maybe 4 quick notes, then silence. Adding to a pattern just makes it faster, slowing it down makes the notes play slower.

[x x x x - - - - - - - - - - - - ]

This is closer:

d1 $ slow 2 $ struct ("t t t t f f f f f f f f") $ n "c4 g5 e5" # s "superpiano"

But this is pretty much where I was thinking:

d1 $ qtrigger 1 $ n "<[c4@ g4 e5] ~ ~ ~ ~ >" # s "superpiano"

You could also maybe use append?

Yeah, thanks @ben - that would work as well. I think my last line above is doing similar but the < > syntax seems to do the same thing, alternating grouped patterns.

1 Like

you could use something like whenmod instead of every? I'm not quite sure I understand what you're trying to achieve though

That looks promising, but I can't think of a way to create silence. I did try this:

d1 $ whenmod 8 4 (# silence ) $ note "0 4 7 ~" # s "superpiano"

But loops as normal.

The basic idea if I can explain better:

If you have a pattern and don't want to have it continuously loop but have a break/rest for several cycles after. Adding to a cycle just squeezes it in and makes it faster. If you want the pattern to stay intact at current speed and add the break for a period of time is what I'm after. My last idea does work:

ah now I see what you would like to do,
how about 'inverting' the approach with every? you could say every 4 cycles play and the rest should be silent:

d1 $ every 4 (# gain 1) $ note "0 4 7 ~" 
# s "superpiano" 
# gain 0
1 Like

Here's a couple of ways to do it with binary patterns:

d1 $ while "<f f t>" (# silence) $ note "0 4 7 ~" # s "superpiano"

d1 $ mask "<f f t>" $ note "0 4 7 ~" # s "superpiano"

That is probably the recipe I'm looking for. Thanks @yaxu - I had the pieces, just didn't know the best way to put them together. More than one way to skin a cat (but don't skin cats). I like this idea because it's more obvious to me what is going on.


Another suggestion, though you've gotten a few good ones already...

I've basically started using this style syntax for nearly all my patterns "{ A B C }%D" primarily because it easily lets you break out of the confines of the "bar line" so easily -- both longer and shorter than a cycle.

So, to fit this approach to your example:

"{ 0 4 7 ~ ~ ~ ~ ~ }%4"

or in practice, I might do this (as I find it simpler to read):

"{ 0 4 7 ~ ~@4 }%4"

Once you get used to this syntax it makes for some really fun odd time signature stuff (just change the number after "%" to a 5, 7 or 9 for example), and so much opportunity to create polyrhythmic chaos :slight_smile:


Sorry, I didn't fully qualify my example.. your code would read like this

d1 $ note "{ 0 4 7 ~ ~@4 }%4" # s "superpiano"

@jackryon - Man, this is a great shorthand! Thank you for this. This is probably exactly what I was looking for. Again more than one way, but I love this method and wouldn't have thought of it.