# Bulk channel operations - mute all/some?

**URL:** <https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [21 April 2020 19:58 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476 "2020-04-21T19:58:27Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [21 April 2020 19:58 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/1 "2020-04-21T19:58:27Z")

</div>

Hi all,  
I'm really enjoying the course, even spending a little of my non-available free time doing some composing 😃

I'm sure I'm jumping ahead here, but a limitation I'm finding is the ability to perform non-destructive operations to multiple channels.  
Example: I want to build up a series of cycles (d1-d4), then create a "drop" by:

1. muting all channels
2. starting d5 bass kick while all channels still muted
3. unmute all channels with extra bass oomph

I'm not a dance music artist, I'm sure all my terminology is wrong, but I hope the description makes sense -

Is there options for me to do this? I've seen the 'mute' command, but it's a per channel thing, 'hush' doesn't let me bring everything back easily, the workaround I've tried is creating a d6 $ silence which I can solo and unsolo but I've got to be very nimble fingered on the keyboard to line everything up

Is there anything better suited?

---

<div class="post-metadata">

**Author:** ![anachronite](https://uzu.lurk.org/user_avatar/uzu.lurk.org/anachronite/32/2081_2.png) [@anachronite](https://uzu.lurk.org/u/anachronite)\
**Post date:** [22 April 2020 02:10 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/2 "2020-04-22T02:10:59Z")

</div>

Maybe try something like #gain (range 0 1$ slow 4 square) which would alternate the volume between 0 and 1 every 2 cycles. And if you wanted to bring back the elements gradually you could probably do something like:  
#gain (range 0 1$ stack[square,saw])

I haven't actually tried any of this myself so take my answer with a grain of salt. [https://tidalcycles.org/index.php/Oscillators](https://tidalcycles.org/index.php/Oscillators). Maybe looking through this page would give you more ideas.

---

<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:** [22 April 2020 07:50 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/3 "2020-04-22T07:50:04Z")

</div>

If you want to carry out multiple actions at once, you can use `do` notation. To apply a function to everything you can use `all`:

```auto
do d5 $ sound "bd*4"
   solo 5

```

Then

```auto
do unsolo 5
   all $ (# shape 0.8)

```

To take off that effect on `all` you'd then need to do

```auto
all id

```

It'd be good to have a good session or two on different ways of shaping a performance. The problem with `solo` and `all` etc is that you have to remember the state they're in. It really needs some UI so you can visually see what is solo'd, etc.

---

<div class="post-metadata">

**Author:** ![tedthetrumpet](https://uzu.lurk.org/user_avatar/uzu.lurk.org/tedthetrumpet/32/39_2.png) [@tedthetrumpet](https://uzu.lurk.org/u/tedthetrumpet)\
**Post date:** [22 April 2020 18:32 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/4 "2020-04-22T18:32:33Z")

</div>

```auto
do d5 $ sound "bd*4"
   solo d5

```

something wrong there?

`> parse error on input ‘solo’`

---

<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:** [22 April 2020 18:34 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/5 "2020-04-22T18:34:18Z")

</div>

There was, that should be `solo 5`, fixed in the post..

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [22 April 2020 20:11 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/6 "2020-04-22T20:11:39Z")

</div>

Amazing, thankyou guys!

I went a little bit further, and found I can save my nimbleness plus build that wait by throwing in a setcps to half speed when I mute/solo the silent channel:

```
 do solo 6 -- my silence channel
     setcps 0.35

```

and bringing it back to 0.7 in my next do:

```
 do d1 $ slow 2 $ n "[0 0] [~@0.4 0] [0 0] ~ " # s "bd"
     setcps 0.7     
     unsolo 6

```

Just got to be coscious of my own ability to keep time then 😉

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [23 April 2020 19:33 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/7 "2020-04-23T19:33:24Z")

</div>

Here's what I've managed, little shout out to a @yaxu favourite at the end 😛

[![](https://img.youtube.com/vi/XqZbC1HPQIE/hqdefault.jpg "Tidal Cycles - "do" example for parallel execution") ](https://www.youtube.com/watch?v=XqZbC1HPQIE)

---

<div class="post-metadata">

**Author:** ![anachronite](https://uzu.lurk.org/user_avatar/uzu.lurk.org/anachronite/32/2081_2.png) [@anachronite](https://uzu.lurk.org/u/anachronite)\
**Post date:** [24 April 2020 02:48 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/8 "2020-04-24T02:48:05Z")

</div>

This is sick!

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [24 April 2020 03:37 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/9 "2020-04-24T03:37:57Z")

</div>

Thanks! Needs some work on timing sections for sure, but the bones are there

The jux rev at the end was improvised, thought it'd get a laugh after Alex talked about it in the live stream the other night, but then it actually sounded awesome 😛

---

<div class="post-metadata">

**Author:** ![nuelmyr](https://uzu.lurk.org/user_avatar/uzu.lurk.org/nuelmyr/32/291_2.png) [@nuelmyr](https://uzu.lurk.org/u/nuelmyr)\
**Post date:** [30 July 2020 08:20 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/10 "2020-07-30T08:20:36Z")

</div>

I'd like to mute/unmute a group of channels. But something like `mute [2,3,5]` does not work. Is there a way of doing it in an easy form?

---

<div class="post-metadata">

**Author:** ![nuelmyr](https://uzu.lurk.org/user_avatar/uzu.lurk.org/nuelmyr/32/291_2.png) [@nuelmyr](https://uzu.lurk.org/u/nuelmyr)\
**Post date:** [30 July 2020 10:13 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/11 "2020-07-30T10:13:58Z")

</div>

Thanks @yaxu for this  
`mutelist = mapM_ mute`  
`mutelist [1,2,3]`

---

<div class="post-metadata">

**Author:** ![abalone1969](https://uzu.lurk.org/user_avatar/uzu.lurk.org/abalone1969/32/209_2.png) [@abalone1969](https://uzu.lurk.org/u/abalone1969)\
**Post date:** [31 July 2020 19:49 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/12 "2020-07-31T19:49:22Z")

</div>

cool thread 🙂  
thanks  
so in theory this would work as an all fadeout workaround?

```haskell
xfade [1,2,3,4,5,6,7] $ silence  

```

doesn't complain, but also doesn't execute  
it'd be cool to be able to say xfade all $ silence  
and it'd be cool to say xfade all over the next 12 cycles to silence

it's a mixing tool, like panning, level, reverb, etc...

---

<div class="post-metadata">

**Author:** ![nuelmyr](https://uzu.lurk.org/user_avatar/uzu.lurk.org/nuelmyr/32/291_2.png) [@nuelmyr](https://uzu.lurk.org/u/nuelmyr)\
**Post date:** [10 August 2020 13:48 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/13 "2020-08-10T13:48:12Z")

</div>

You're right @abalone1969 that would be far better than a hard-mute! Or let's say: a good alternative...

---

<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:** [6 September 2020 17:12 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/14 "2020-09-06T17:12:01Z")

</div>

Ok here's a more relaxed version of `hush` that works on d1 .. d16

```haskell
quieten = mapM_ (\i -> xfade i silence) [1 .. 16] 

```

Or if you want over a given number of cycles:

```haskell
quietenIn t = mapM_ (\i -> xfadeIn i t silence) [1 .. 16]

```

The `mapM_` function takes each number in the list `[1 .. 16]` and gives it to `(\i -> xfadeIn i t silence)`. The `\` is called 'lambda' and puts the number in the `i` variable. Then that gets used in the `xfadeIn`.

---

<div class="post-metadata">

**Author:** ![abalone1969](https://uzu.lurk.org/user_avatar/uzu.lurk.org/abalone1969/32/209_2.png) [@abalone1969](https://uzu.lurk.org/u/abalone1969)\
**Post date:** [6 September 2020 23:02 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/15 "2020-09-06T23:02:33Z")

</div>

> [@yaxu](#):
>
> The `mapM_` function takes each number in the list `[1 .. 16]` and gives it to `(\i -> xfadeIn i t silence)` . The `\` is called 'lambda' and puts the number in the `i` variable. Then that gets used in the `xfadeIn` .

fantastic 🙂  
thank you, next level coding for me  
is it possible to run it called this...

```haskell
fadeOutIn t = mapM_ (\i -> xfadeIn i t silence) [1 .. 16]

```

then I can execute

```haskell
 fadeOutIn 12

```

and it works fantastic

is it possible for me to put this code in my BootTidal.hs file  
so it loads everytime?

and/or is it possible to include it in the next version of Tidal?

thanks again, great liveStream today

```haskell

```

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [6 September 2020 23:08 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/16 "2020-09-06T23:08:45Z")

</div>

> [@abalone1969](#):
>
> is it possible to run it called this...
> 
> ```haskell
> fadeOutIn
> 
> ```

The name is an arbitrary variable (call it `shutthehellupbutslowlyIn` if you want 😛 )

As a side note, `fadeOutIn` is more ambiguous than `quietenIn` to me: `OutIn` implies a cosine style volume shift ala `><`

Whereas `quietenIn` is more clearly related to silencing over a number of cycles

---

<div class="post-metadata">

**Author:** ![abalone1969](https://uzu.lurk.org/user_avatar/uzu.lurk.org/abalone1969/32/209_2.png) [@abalone1969](https://uzu.lurk.org/u/abalone1969)\
**Post date:** [16 September 2020 19:23 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/17 "2020-09-16T19:23:16Z")

</div>

thinking about how to best put this in my BootTidal.hs file so it runs everytime  
(until the next Tidal version 🙂)  
think I found BootTidal.hs with this info

```haskell
ghc-pkg describe $(ghc-pkg latest tidal) | grep data-dir | cut -f2 -d' '

```

from here: [https://github.com/tidalcycles/atom-tidalcycles/issues/60](https://github.com/tidalcycles/atom-tidalcycles/issues/60)

is there anything else that needs to be included?  
some of the other code that looks like this in the BootTidal.hs file (under let)  
has tidal or i at the end  
included as is, Tidal doesn't seem to re-load knowing this function  
(BootTidal.hs from here ...  
~/.cabal/share/x86\_64-linux-ghc-8.0.2/tidal-1.5.2)

thanks for your help with this, sounds very musical  
so cool

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [16 September 2020 19:50 UTC](https://uzu.lurk.org/t/bulk-channel-operations-mute-all-some/476/18 "2020-09-16T19:50:45Z")

</div>

Hey I've been thinking the same, I watched this excellent video of @kindohm 's on the topic - he makes some interesting points about where to keep this stuff, and how - you can add it to your boottidal.hs, or you can just have it in a separate file.  
My preference, at least initially, is to use the separate function file (for reference, [here](https://gist.github.com/cleary/f837eac415024bed6c1f7573ab49c5fd)) for the main reason that these functions are all new to me and I'm still getting used to exactly how they work - so I like to keep that open for reference and occasional modification/addition as I'm going 🙂  
Putting it in the bootstrap file makes it a bit more permanent, and a bit more obfuscated (imo of course) - and any modifications require a reboot of tidal I believe, so I'll probably leave that for down the track a bit

[![](https://img.youtube.com/vi/jU5QKgiO2IY/maxresdefault.jpg "Live Stream: TidalCycles custom functions") ](https://www.youtube.com/watch?v=jU5QKgiO2IY)

PPS I found there's a vscode github gist extension that will let you create, open and save your gists directly to github... "Gist" by Ken Howard
