# Instrument mute button

**URL:** https://qa.fmod.com/t/instrument-mute-button/14160
**Category:** FMOD Studio
**Created:** [October 24, 2018, 2:29pm UTC](https://qa.fmod.com/t/instrument-mute-button/14160 "2018-10-24T14:29:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Koca](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Koca](https://qa.fmod.com/u/Koca)
#### Post date: [October 24, 2018, 2:29pm UTC](https://qa.fmod.com/t/instrument-mute-button/14160/1 "2018-10-24T14:29:00Z")

</div>

Hello, just an idea. If it`s possible it would be nice to have a mute button for instruments.  
In that way when we want to silence some instrument it could be done easily with out changing the level. Just a quick tool.

Cheers  
Koca

---

<div class="post-metadata">

### Author: ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)
#### Post date: [October 25, 2018, 2:12am UTC](https://qa.fmod.com/t/instrument-mute-button/14160/2 "2018-10-25T02:12:50Z")

</div>

Hi Koca,

That sounds useful. In the meantime you can use scripting to mute selected instruments and assign it to a keyboard shortcut. Take a look at the follow functions for pointers in the right direction:

```
var instrument = studio.window.editorCurrent() // Gets the currently selected item in the editor (in this case the instrument)
instrument.volume = 0 // Set the volume of the instrument. If 0 it's at normal volume, -80 is muted
```

---

<div class="post-metadata">

### Author: ![Koca](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Koca](https://qa.fmod.com/u/Koca)
#### Post date: [October 25, 2018, 12:08pm UTC](https://qa.fmod.com/t/instrument-mute-button/14160/3 "2018-10-25T12:08:52Z")

</div>

Ok thanks. I know almost nothing about scripting but i look forward to learn.  
Cheers

---

<div class="post-metadata">

### Author: ![Koca](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Koca](https://qa.fmod.com/u/Koca)
#### Post date: [July 24, 2019, 10:52am UTC](https://qa.fmod.com/t/instrument-mute-button/14160/4 "2019-07-24T10:52:21Z")

</div>

Hello, i was trying to make this script but keep getting errors. Can you make this work for me?

## /\* ------------------------------------------- Mute instrument

\*/

studio.menu.addMenuItem({ name: “Koca\Mute instrument”,  
isEnabled: function() { var instrument = studio.window.editorCurrent();  
keySequence: “Alt+M”;  
execute: function() {  
instrument.volume = 0  
};  
}  
});

Thanks

---

<div class="post-metadata">

### Author: ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)
#### Post date: [July 29, 2019, 2:05am UTC](https://qa.fmod.com/t/instrument-mute-button/14160/5 "2019-07-29T02:05:13Z")

</div>

When the volume property is set to `0` then it is set to 0dB, which is the default volume. It can be boosted to 10dB or it can be muted by setting it to -80dB.
