How to use KeSwitch for global muting?
-
How to use KeSwitch for global muting?
When the key is pressed, global is muted, and when the key is released, the sound is restored to the state before muting.

-
@BobCat There are a few ways to do it. If you want it to kill the notes then you'll need use
Engine.allNotesOff()if you want them to keep playing but just have the volume drop I would use a simple gain module. In the on note on callback you can set the Gain to -100 and in the on note off callback you can set it back to 0. -
@d-healey I want chose to turn off and on the main switch of Container through note on/off, but I don't know how to write the code. Could you please tell me how to write it? Thank you very much. Sorry, I am a novice.
if (Message.getNoteNumber() == 89) -
@BobCat said in How to use KeSwitch for global muting?:
I want chose to turn off and on the main switch of Container through note on/off,
I wouldn't advise doing that, you'll get some nasty pops and clicks. If you want to dip the volume use a simple gain effect as I described above. If you want to prevent MIDI coming through then use a MIDI muter script.
-
@d-healey This will cause a problem. When the key is release in a short time, the sound before muting will continue to play. I hope that after muting, there will be no sound.