MV [MV] Slash command that can play a sound effect while a message is still typing?

Hiya! It's me once again. Now, please read through as I don't want you to get confused with message sound effects, those that play a little beep every time a character is printed, I'm talking about sound effects like a "tada", "congrats", etc.

Is there a plugin that allows you to call a sound effect while a message is typing?
Like, for example, \s[filename], which looks for an ogg file with that name? I want to do something cool with a message box where in an event something random is chosen, then it goes like "You got...", waits a moment, then says "[result]!" and plays a sort of tada sound effect (with a command). Obviously, in this situation it wouldn't fit before or after, and it's not possible to fit it in between without a plugin. Any help?
I have a plugin that lets you script your own text codes:
New codes are set up in the plugin parameters. In this case you'll want what my plugin calls a "Process" type code, so it runs mid-message. There are some example scripts in the help section, including one for playing a SE. If you have trouble then refer to this old thread for details:
Obviously, in this situation it wouldn't fit before or after, and it's not possible to fit it in between without a plugin. Any help?
It is possible to do this without a Plugin, but it would have to synchronize, and for that you would have to know the waiting interval for the sound to play in each message.

You would need to create a common event in a parallel process, which must be activated by a Switch, and using two variables you would determine the time and the SE file.

Map event (NPC) ->
Code:
◆Control Variables:#0031 SE-Synch (fps) = 30
◆Control Variables:#0032 SE-Selected = 2
◆Control Switches:#0011 Msg-Play-SE = ON
◆Text:None, Window, Bottom
:    :Hello!\.\.\.
:    :Wait...

Common Event -> Trigger: Process Parallel -> Switch: MsgBox-PlaySE ->
Code:
◆If:Count-fps ≥ SE-Synch (fps)
  ◆If:SE-Selected = 1
    ◆Play SE:Beep-Bop! (90, 100, 0)
    ◆
  :End
  ◆If:SE-Selected = 2
    ◆Play SE:Boing (90, 100, 0)
    ◆
  :End
  ◆If:SE-Selected = 3
    ◆Play SE:Telephone-ringing-1 (90, 100, 0)
    ◆
  :End
  ◆Comment://Reset variables for prevention
  ◆Control Variables:#0031 SE-Synch (fps) = 0
  ◆Control Variables:#0032 SE-Selected = 0
  ◆Control Variables:#0033 Count-fps = 0
  ◆Control Switches:#0011 Msg-Play-SE = OFF
  ◆
:End
◆Wait:1 frame
◆Control Variables:#0033 Count-fps += 1

It's just a theory, you probably need to make more changes.

Edited:
Apparently it works, but I need to improve it to be able to put more sound effects in a single text box.



Good luck
I have a plugin that lets you script your own text codes:
That might actually be super useful! I'll give it a try and see if I can make something out of it.
I'll give it a try and see if I can make something out of it.
Unfortunately, I couldn't. I don't code stuff in advanced programming languages, especially Javascript... I barely even code at all anymore. At first I thought when previewing the message with the custom slash command that I had done it right, but it turns out that RPGMaker just cuts out anything with a slash in it, so even if I put \poop in there (which wasn't what I put into the plugin), RPGMaker would still cut it out.

How I found out it wasn't working was that it wasn't playing the sound effect I wanted to play. This is why I hate languages like these, because I don't know them and never will.
Double-post notice: @kanyatanishande
Unfortunately, I couldn't...
Maybe try this premade example (click spoiler to reveal code):
Spoiler: Play sound example
JavaScript:
["{\"Code\":\"se\",\"Arguments\":\"[\\\"Text\\\",\\\"Integer\\\"]\",\"Delimiters\":\"[]\",\"Replacer\":\"\\\"var se = {};\\\\nse.name = arguments[1];\\\\nse.volume = parseInt(arguments[2], 10);\\\\nse.pitch = 100;\\\\nse.pan = 0;\\\\nAudioManager.playSe(se);\\\"\"}"]
To use it:
  1. Copy the long line of code from the spoiler above.
  2. Open the Plugin Manager and edit (double-click) Cae_CustomEscCodes.
  3. Edit (double-click) the Process Escape Codes parameter.
  4. If you see a text box now (older version of editor), skip to step 5.
    Otherwise, select the Text tab and the list should turn into a one-line text box.
  5. Paste the copied line of code into that text box.
  6. Click OK to get out of the Plugin Manager.
  7. Save your project to apply Plugin Manager changes.
Example of use in a message:
Then in a Show Text command you can do something like this:
Code:
\se[Bob1, 20]Welcome to the inn!\!
\se[Bob2, 30]Here for a room?
I.e. play SE "Bob1" at 20% volume, show "Welcome to the inn!", wait for player input, play SE "Bob2" at 30% volume, then show "Here for a room?".
I tried changing "SE" to "SFX" to avoid confusion with the PlayMsgWndCharSE plugin (that plugin already uses SE, and isn't case sensitive iirc) but it showed "[sfx name, 90]" in the message. That triggers me.

Original thread: https://forums.rpgmakerweb.com/threads/mv-slash-command-that-can-play-a-sound-effect-while-a-message-is-still-typing.136093/