Muting midi drums channel with setMusicChannelVolume


(laggyluk) #1

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)


(Brett Paterson) #2

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,


(laggyluk) #3

great, thanks :slight_smile: this allows me to get around that problem https://www.fmod.org/questions/question/problem-with-midi-drum-track/ by muting only drums for a split second