MZ Remove default sound effects on my custom scene

I'm trying to add sound effects on my custom menu. But upon testing SoundManager.playEquip();, the sound was just added on top of the default sound. How can I remove the default sound effects only on my custom menu?

Here is my code:
JavaScript:
class WindowTest extends Window_Base {
  constructor(rect) {
    super(rect);
  }
}

class SceneTest extends Scene_MenuBase
{
    create()
    {
        super.create();
        var rect = new Rectangle(100, 200, 500, 300);
        this._customWindow = new WindowTest(rect);
        this._customWindow.drawText("First Box", 0, 0);
        this.addWindow(this._customWindow);
       
        var rect2 = new Rectangle(3, 125, 595, 490);
        this._slotCommandWindow = new TestCommand(rect2);
        this._slotCommandWindow.setHandler("slotCommand1", this.slotCommandTest1.bind(this));
        this._slotCommandWindow.setHandler("slotCommand2", this.slotCommandTest2.bind(this));
        this._slotCommandWindow.setHandler("slotCommand3", this.slotCommandTest3.bind(this));
        this.addWindow(this._slotCommandWindow);
    }
   
    slotCommandTest1()
    {
        console.log('command 1 selected');
    }
   
    slotCommandTest2()
    {
        console.log('command 2 selected');
    }
   
    slotCommandTest3()
    {
        console.log('command 3 selected');
    }
   
    exitSlotCommandTest()
    {
        console.log('exit');
    }
}

class TestCommand extends Window_Command
{
    constructor(rect)
    {
        super(rect);
    }
   
    makeCommandList()
    {
        this.addCommand ("First Command", "slotCommand1");
        this.addCommand ("Second Command", "slotCommand2");
        this.addCommand ("Third Command", "slotCommand3");
    }
}

SceneTest.prototype.update = function()
{
    Scene_MenuBase.prototype.update.call(this);

    if(Input.isPressed("up") || Input.isPressed("down"))
    {
        SoundManager.playEquip();
    }
}

Update: I don't know if this is a good way to change the default sounds of the menu, but what I did is backed up the mmz_managers.js file and modify its functions. That solved my problem.
up

@Fionn23, please do not bump your topic unless it has been 24 hours later since your last post. You can review our forum rules here. Thank you.

There are people from various time zones here helping out in their free time, so please have patience~

The processCursorMove method of Window_Selectable invokes SoundManager.playCursor() when the selected index changes, I assume that's what you're hearing. You'd have to override that specific method, i.e. define TestCommand#processCursorMove, if you want to make the cursor sounds different for that window.

(I generally wouldn't recommend that kind of inconsistency, but it's your game.)

Editing the core scripts is not the best solution, e.g. edits are harder to track than plugins, and can't just be switched on/off. It does work, though.
[bump]@Fionn23[/bump] There are people from various time zones here helping out in their free time, so please have patience~
Ooops. I apologize.

The processCursorMove method of Window_Selectable invokes SoundManager.playCursor() when the selected index changes, I assume that's what you're hearing. You'd have to override that specific method, i.e. define TestCommand#processCursorMove, if you want to make the cursor sounds different for that window.

(I generally wouldn't recommend that kind of inconsistency, but it's your game.)

Editing the core scripts is not the best solution, e.g. edits are harder to track than plugins, and can't just be switched on/off. It does work, though.
Thanks! I'll try this.
Thanks! My code is now working. I'm able to change the sound effect.

I have a question though. What I've done to override the method is to copy paste the code of processCursorMove to TestCommand

JavaScript:
class TestCommand extends Window_Command
{
    constructor(rect)
    {
        super(rect);
    }
    
    makeCommandList()
    {
        this.addCommand ("First Command", "slotCommand1");
        this.addCommand ("Second Command", "slotCommand2");
        this.addCommand ("Third Command", "slotCommand3");
    }
    processCursorMove()
    {
             if (this.isCursorMovable()) {
            const lastIndex = this.index();
            if (Input.isRepeated("down")) {
                this.cursorDown(Input.isTriggered("down"));
            }
            if (Input.isRepeated("up")) {
                this.cursorUp(Input.isTriggered("up"));
            }
            if (Input.isRepeated("right")) {
                this.cursorRight(Input.isTriggered("right"));
            }
            if (Input.isRepeated("left")) {
                this.cursorLeft(Input.isTriggered("left"));
            }
            if (!this.isHandled("pagedown") && Input.isTriggered("pagedown")) {
                this.cursorPagedown();
            }
            if (!this.isHandled("pageup") && Input.isTriggered("pageup")) {
                this.cursorPageup();
            }
            if (this.index() !== lastIndex) {
                //this.playCursorSound();
                SoundManager.playCancel();
            }
        }
    }
}

Is this the proper way to do it?
That'll work, but I just realised there's a better way: the sound is normally played via the window's playCursorSound method, so instead you could just define an override for that, e.g.
JavaScript:
class TestCommand extends Window_Command
{
// ...etc...
  playCursorSound() {
    SoundManager.playCancel();
  }

}
(I missed that earlier because for some reason I was looking at the core scripts for MV instead of MZ.)
Thanks for this.
You're welcome! 👋

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/remove-default-sound-effects-on-my-custom-scene.148330/