# Muting midi drums channel with setMusicChannelVolume

**URL:** <https://qa.fmod.com/t/muting-midi-drums-channel-with-setmusicchannelvolume/12925>\
**Category:** Unity\
**Created:** [January 10, 2017, 2:26pm UTC](https://qa.fmod.com/t/muting-midi-drums-channel-with-setmusicchannelvolume/12925 "2017-01-10T14:26:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laggyluk](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@laggyluk](https://qa.fmod.com/u/laggyluk)\
**Post date:** [January 10, 2017, 2:26pm UTC](https://qa.fmod.com/t/muting-midi-drums-channel-with-setmusicchannelvolume/12925/1 "2017-01-10T14:26:53Z")

</div>

I’m trying to mute drums in midi track

RESULT Sound.setMusicChannelVolume(  
int channel,  
float volume  
);

Is there a way I can determine which channel to use? Normally it would be channel 9 but it seems that for each file it’s a different number (not 9, not getMusicNumChannels()-1 or any other fixed position as far as I can tell)

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [January 11, 2017, 11:58pm UTC](https://qa.fmod.com/t/muting-midi-drums-channel-with-setmusicchannelvolume/12925/2 "2017-01-11T23:58:15Z")

</div>

Hi ,  
Thanks for the query. I’ve investigated this and it looks like FMOD is compressing the tracks down, skipping unused tracks, so the channel number is in fact related to the 0 to number of used channel number, instead of 0-15 like a standard midi track map.

As you dont know which ones are null and which ones are valid, i’m going to change setMusicChannelVolume just to refer to tracks 0-15 and the ‘number of channels’ in the metadata is just for information purposes only.

I’ll get this into our next patch which should be next week hopefully.  
regards,

---

<div class="post-metadata">

**Author:** ![laggyluk](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@laggyluk](https://qa.fmod.com/u/laggyluk)\
**Post date:** [January 12, 2017, 8:12am UTC](https://qa.fmod.com/t/muting-midi-drums-channel-with-setmusicchannelvolume/12925/3 "2017-01-12T08:12:14Z")

</div>

> [@](#):
>
> Hi ,  
> Thanks for the query. I’ve investigated this and it looks like FMOD is compressing the tracks down, skipping unused tracks, so the channel number is in fact related to the 0 to number of used channel number, instead of 0-15 like a standard midi track map.
> 
> As you dont know which ones are null and which ones are valid, i’m going to change setMusicChannelVolume just to refer to tracks 0-15 and the ‘number of channels’ in the metadata is just for information purposes only.
> 
> I’ll get this into our next patch which should be next week hopefully.  
> regards,

great, thanks 🙂 this allows me to get around that problem [Problem with midi drum track - Unity - FMOD Forums](https://www.fmod.org/questions/question/problem-with-midi-drum-track/) by muting only drums for a split second
