MV Script calls for changing music/sound effect in-game

The title of the thread says it all. What's the script call for changing specifically a sound effect or music track into a different audio file? Its kind of dumb that you CAN change a few things via event commands but not stuff like the accept sound or title screen music with event commands.

I know little to nothing about javascript.
You may want to check THIS document.
You don't get it, I mean i want to change sound effects and music that are set in the system settings in the database while the game is running.

I have looked at that link you put there, But i can't find what i am specifically looking for.
@JamesRyan the list you gave are mostly the script call equivalents of event commands, and the OP wants to change something that is not changable by event commands.

@Jiggykoopbob if something cannot be changed by event commands, then there is usually a reason for that.
for example the title screen music can't be changed because the events cannot run on the title screen, the game only launches after that. And no gamedata is available on the title screen.
so changing anything on the title screen is not possible by script command, you'll need a plugin to reprogram the title screen.

you need to list specifically what you want to change, then we can tell you what is possible and what requrires workarounds or a plugin.
But it needs to be a specific case because the answer will be different depending on what you want to change.
Well, You know how you can change like the battle music with an event command? I want to be able to change sound effects set in the database like the accept sound or cancel sound via a script call while the game is running. I want the battle system and overworld menu to have their own unique sound effects.

Hopefully that was clear enough.
You can access the $dataSystem.sounds array. You can change everything in there. For example :

JavaScript:
 //Change the cursor sound to healing sound
$dataSystem.sounds[0].name = "Recovery"
//Change the save sound to miss sound
$dataSystem.sounds[5].name = "Miss"

The name is the filename without the extension or path. If you want a permanent switch of sounds & stuff, you might have to code the save function. Everything is written in the System.json. It's pretty much a JSON.stringify($dataSystem).
@Kono Thank you kindly, I was really looking for this.
Note that changes to the database will be reset at the end of the play session, and not before, irrespective of New Game or Save/Load. This is because the engine does not expect runtime changes to its static data.

Original thread: https://forums.rpgmakerweb.com/threads/script-calls-for-changing-music-sound-effect-in-game.141741/