Changing system Sound Effect settings in an event?

A simple question to ask, if not to answer:  Is there a way to change the game's sound effect settings dynamically, through either an event or a script call?  I have an event in which the 'OK' confirmation sound is just getting in the way, and it would be great to temporarily disable it just for that one event.  Changing the volume of all sound effects globally would also work.
Put this in a new slot in your script editor:

module Sound  def self.play_ok    play_system_sound(1) unless $game_switches[id]  endendThen replace where it says "id" with a switch's id. After that, all you'll need to do is turn the switch on to disable the sound effect, and turn it back off to enable it again.
That seems to work flawlessly.  Nice and elegant, too.  Thank you very much! 😀

Original thread: https://forums.rpgmakerweb.com/threads/changing-system-sound-effect-settings-in-an-event.39568/