Advanced Manipulation of Sound Effects

So, I'm wondering if it is possible to do a few things with sound effects:

1) Could I play a long (multi-second) sound effect for footsteps, but cut it off when the player stops walking? (Instead of repeating one short sound each time the player takes a step.)

2) If I were to repeat one short "footstep sound" over and over each time the player takes a step, could I randomly alter its pitch each time it plays? (I have never found a way to handle any type of randomness in RPG Maker MV, or to alter pitch outside the system sound settings, so I assume this is a no-go.)

3) Speaking of randomness, I'd also like to play one of five random noises at irregular random intervals (atmospheric background noises). One of the noises every 30-90 seconds, for example. Is this possible?

Thanks! I really appreciate any help, and sorry for so many questions in one post!

For reference, this is my game:
wzackw.itch.io/monster-garden
Hi! I haven't looked much into it, so I don't know if it will be perfect, but for the first problem you have I tried this and seems to work:

Make a parallel event, create a conditional branch and on the script command write:

$gamePlayer.isMoving();

and play the SE you want. Check the "else" branch and in there use the Stop SE command. It should stop playing when the player stops walking even if the SE is long.

For the random noises I guess another parallel event would work (I don't know if you can combine them to not have so many parallel running and creating lag): control a variable and set it to random x - x (the numbers you want). Then make one conditional branch for every result and play a different SE and the waiting time you desire after them (or the waiting time before the control variable, so you don't have to repeat it in every conditional branch, but it wouldn't be so random).

I actually tried to combine this random method with the first one, to try to modify the pitch of the steps (another variable = random numbers) but the result is too random if the SE is short (it kinda works though, maybe if you play around with it you find a better solution with longer SE).

I hope it helped 🙂 If you need screenshots of the events let me know.
Thank you! I think that actually all makes sense to me! I've come a long way with RPG Maker XD

I didn't know about the random variables within a range, but that sounds perfect. 😀

Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/advanced-manipulation-of-sound-effects.76944/