# Creating Rests

**URL:** <https://uzu.lurk.org/t/creating-rests/3440>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [27 August 2021 17:50 UTC](https://uzu.lurk.org/t/creating-rests/3440 "2021-08-27T17:50:49Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [27 August 2021 17:50 UTC](https://uzu.lurk.org/t/creating-rests/3440/1 "2021-08-27T17:50:49Z")

</div>

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

```haskell
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...

Thanks,  
Isaac

---

<div class="post-metadata">

**Author:** ![polymorphic.engine](https://uzu.lurk.org/user_avatar/uzu.lurk.org/polymorphic.engine/32/30_2.png) [@polymorphic.engine](https://uzu.lurk.org/u/polymorphic.engine)\
**Post date:** [27 August 2021 18:53 UTC](https://uzu.lurk.org/t/creating-rests/3440/2 "2021-08-27T18:53:37Z")

</div>

Hey,

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"`

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [27 August 2021 20:47 UTC](https://uzu.lurk.org/t/creating-rests/3440/3 "2021-08-27T20:47:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![mbutz](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mbutz/32/1085_2.png) [@mbutz](https://uzu.lurk.org/u/mbutz)\
**Post date:** [27 August 2021 21:00 UTC](https://uzu.lurk.org/t/creating-rests/3440/4 "2021-08-27T21:00:38Z")

</div>

A nice use of `silence`.

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

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

```

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [27 August 2021 21:02 UTC](https://uzu.lurk.org/t/creating-rests/3440/5 "2021-08-27T21:02:55Z")

</div>

> [@polymorphic.engine](#):
>
> d1 $ every 2 (# silence) $ 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.

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [27 August 2021 21:10 UTC](https://uzu.lurk.org/t/creating-rests/3440/6 "2021-08-27T21:10:25Z")

</div>

@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 - - - - - - - - - - - -]

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [27 August 2021 21:27 UTC](https://uzu.lurk.org/t/creating-rests/3440/7 "2021-08-27T21:27:06Z")

</div>

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"`

---

<div class="post-metadata">

**Author:** ![ben](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ben/32/362_2.png) [@ben](https://uzu.lurk.org/u/ben)\
**Post date:** [27 August 2021 23:29 UTC](https://uzu.lurk.org/t/creating-rests/3440/8 "2021-08-27T23:29:04Z")

</div>

You could also maybe use `append`?

> **[Concatenation | Tidal Cycles](https://tidalcycles.org/docs/reference/concatenation/#append)**
>
> This page will present you all the functions that can be used to concatenate (e.g. add) things together in various ways. Each function will be presented following the same model:

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [28 August 2021 14:19 UTC](https://uzu.lurk.org/t/creating-rests/3440/9 "2021-08-28T14:19:39Z")

</div>

> [@ben](#):
>
> You could also maybe use `append`?  
> [Concatenation | Tidal Cycles](https://tidalcycles.org/docs/reference/concatenation/#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.

---

<div class="post-metadata">

**Author:** ![polymorphic.engine](https://uzu.lurk.org/user_avatar/uzu.lurk.org/polymorphic.engine/32/30_2.png) [@polymorphic.engine](https://uzu.lurk.org/u/polymorphic.engine)\
**Post date:** [28 August 2021 15:41 UTC](https://uzu.lurk.org/t/creating-rests/3440/10 "2021-08-28T15:41:08Z")

</div>

> [@Hypostatic](#):
>
> And actually that works, but if you do `every 4`, it loops the pattern 3 times before pausing (or resting).

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

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [28 August 2021 16:06 UTC](https://uzu.lurk.org/t/creating-rests/3440/11 "2021-08-28T16:06:23Z")

</div>

> [@polymorphic.engine](#):
>
> > [@Hypostatic](#):
> >
> > And actually that works, but if you do `every 4`, it loops the pattern 3 times before pausing (or resting).
> 
> 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:

```haskell
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:

> [@Hypostatic](#):
>
> d1 $ qtrigger 1 $ n "\<[c4@ g4 e5] ~ ~ ~ ~ \>" # s "superpiano"

---

<div class="post-metadata">

**Author:** ![polymorphic.engine](https://uzu.lurk.org/user_avatar/uzu.lurk.org/polymorphic.engine/32/30_2.png) [@polymorphic.engine](https://uzu.lurk.org/u/polymorphic.engine)\
**Post date:** [28 August 2021 16:44 UTC](https://uzu.lurk.org/t/creating-rests/3440/12 "2021-08-28T16:44:17Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [28 August 2021 20:21 UTC](https://uzu.lurk.org/t/creating-rests/3440/13 "2021-08-28T20:21:51Z")

</div>

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

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

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

```

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [28 August 2021 23:54 UTC](https://uzu.lurk.org/t/creating-rests/3440/14 "2021-08-28T23:54:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jackryon](https://uzu.lurk.org/user_avatar/uzu.lurk.org/jackryon/32/1660_2.png) [@jackryon](https://uzu.lurk.org/u/jackryon)\
**Post date:** [1 September 2021 20:54 UTC](https://uzu.lurk.org/t/creating-rests/3440/15 "2021-09-01T20:54:51Z")

</div>

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:

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

```

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

```haskell
"{ 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 🙂

---

<div class="post-metadata">

**Author:** ![jackryon](https://uzu.lurk.org/user_avatar/uzu.lurk.org/jackryon/32/1660_2.png) [@jackryon](https://uzu.lurk.org/u/jackryon)\
**Post date:** [1 September 2021 20:56 UTC](https://uzu.lurk.org/t/creating-rests/3440/16 "2021-09-01T20:56:54Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/hypostatic/32/2011_2.png) [@Hypostatic](https://uzu.lurk.org/u/Hypostatic)\
**Post date:** [11 September 2021 01:10 UTC](https://uzu.lurk.org/t/creating-rests/3440/17 "2021-09-11T01:10:38Z")

</div>

@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.
