MUSH Audio Engine - Spatial Audio/Voice Acting/New Channels/etc.

I love this audio engine. It works in almost every situation and it does not slow down games in android environments, so it is near-perfect for me. It is my audio engine even if you cannot solve this remaining issue:

When I transfer in an event from an outside map, that event can never play/be tagged by a spacial bgs file no matter what I do. I have tested the exact same setup with the map loading with the event already in place, and that works prefectly! But once the map is loaded, adding new events with a spacial bgs has no effect. Not even if I load the event and THEN run the code to open up a bgs channel from a different event.
Heyo !
I have to say this is an amazing plugin, very immersive !
I'm running tests, with 2 BGM tracks running, one in track 1 and one in track 2.
The "Stop BGM" function works great, I talk to an event, it stops 1 or the other.
Tho', I tried playing it back but there is just no sound coming back.
I execute an automatic event when arriving on the map, it plays both track, perfectly in sync it's great.
I can stop the BGM on either track individually but it won't play again, not unpause, not even replaying from the top.

Did I do something wrong ?
Ahh good point, I haven't thought about that since I don't use voice acting in my projects. This can certainly be added.
Hi! Thank you very much for this plugin! I have the same question about the "stop Voice" function. Do you have any idea when it might be available? Thank you in advance!
@BuckyBattleBorn @aniforce Sorry for the wait, I wasn't active for a few months. I'll start being active again in about 2-3 weeks, so it'll be then for the stop voice function.

@dderrick Ahh yes, I think I coded it in a way so the game reads the data from events that are in the map's base data, not the active map data. It can be changed but not sure if I'll do it, and if I do it won't be any time soon. It's been a long time since I actually coded this plugin so I'd need to re-read it and go through it again, which takes time.

@Unfaith Hmmm, to be honest I'm not sure. It's been a while since I coded this plugin, so I'll have to test on my end. I'll be back home only in 2-3 weeks tho.
When I try to stop the audio, the following error comes out.
Interestingly, this happens only if plugins for skipping the title screen are installed, or if the "skip title screen" checkbox is checked in the editor.

Updated, blin... I was pretty sure I attached what the console says here.


Spoiler: Screenshot
Error.png
ifprT25VRio.jpg
I have a small suggestion. It would be great to add a fade in and fade out into Change BGM volume. I'm trying to make music transition from calm to agressive mix of the same song (like in FFXIII-2) on certain conditions (enemy appears). I play 2 channels at the same time with 100% volume on channel 1 and 0% volume on channel 2 and then exchange it on certain conditions right on the field. It already works well, but it would be great if transition could be a little smoother. What do you think?
@BuckyBattleBorn @aniforce Sorry for the wait, I wasn't active for a few months. I'll start being active again in about 2-3 weeks, so it'll be then for the stop voice function.

@dderrick Ahh yes, I think I coded it in a way so the game reads the data from events that are in the map's base data, not the active map data. It can be changed but not sure if I'll do it, and if I do it won't be any time soon. It's been a long time since I actually coded this plugin so I'd need to re-read it and go through it again, which takes time.

@Unfaith Hmmm, to be honest I'm not sure. It's been a while since I coded this plugin, so I'll have to test on my end. I'll be back home only in 2-3 weeks tho.
I have a small suggestion. It would be great to add a fade in and fade out into Change BGM volume. I'm trying to make music transition from calm to agressive mix of the same song (like in FFXIII-2) on certain conditions (enemy appears). I play 2 channels at the same time with 100% volume on channel 1 and 0% volume on channel 2 and then exchange it on certain conditions right on the field. It already works well, but it would be great if transition could be a little smoother. What do you think?
Alright I'll keep that one in mind.

When I try to stop the audio, the following error comes out.
Interestingly, this happens only if plugins for skipping the title screen are installed, or if the "skip title screen" checkbox is checked in the editor.


Spoiler: Screenshot
I don't think it's a title specific issue, but it might be overwritting something. Impossible to tell without the detailed console error log.
Alright I'll keep that one in mind.


I don't think it's a title specific issue, but it might be overwritting something. Impossible to tell without the detailed console error log.

I was sure I attached a picture of the console (if of course that's what you need)...

Error.png
NEW VERSION RELEASED.

v.1.08 - 2024/08/25
  • Fixed a bug where multiple dynamic spatial BGMs and BGSs weren't being removed properly between map transitions, causing potential crash issues.
  • Potentially fixed a bug that crashed the game sometimes when stopping BGM in a project that skips the Title Screen. (I said potentially since I think I know what might cause the bug but I can't reproduce the bug).
  • New feature : Stop VSC is now an available plugin command.
  • New feature : Able to apply a transition or fade when changing volume for BGMs and BGSs.
@13_Nightmares I couldn't reproduce your bug, but I think I know what may causes it on your end. I tried a blind fix, try the new version to see if it still occurs.

@aniforce Volume fade between volume changes is now doable via plugin command.

And to the people that asked for the stop voice command, it's now an available plugin command.
NEW VERSION RELEASED.

v.1.08 - 2024/08/25
  • Fixed a bug where multiple dynamic spatial BGMs and BGSs weren't being removed properly between map transitions, causing potential crash issues.
  • Potentially fixed a bug that crashed the game sometimes when stopping BGM in a project that skips the Title Screen. (I said potentially since I think I know what might cause the bug but I can't reproduce the bug).
  • New feature : Stop VSC is now an available plugin command.
  • New feature : Able to apply a transition or fade when changing volume for BGMs and BGSs.
@13_Nightmares I couldn't reproduce your bug, but I think I know what may causes it on your end. I tried a blind fix, try the new version to see if it still occurs.

@aniforce Volume fade between volume changes is now doable via plugin command.

And to the people that asked for the stop voice command, it's now an available plugin command.
Thank you very much for this Update. I've just tested new features. Stop VSC works great, but fade transition still doesn't work, or I'm probably doing something wrong.

1) This event starts 2 channels simultaneously with its own BGM in each channel. Channel 2 has volume 0
2024-08-26_13-07-39.png


2) Here I want to swap BGMs. But it swaps immediately, without fading 🙁
2024-08-26_13-08-09.png
@aniforce The fading while using Change BGM volume should work... but the argument is for seconds not frames 😛 You set the transition to 180 seconds, which is most likely why you're not hearing the transition. Try setting it to 3 instead.
@aniforce The fading while using Change BGM volume should work... but the argument is for seconds not frames 😛 You set the transition to 180 seconds, which is most likely why you're not hearing the transition. Try setting it to 3 instead.
Omg, I was so happy, that I didn't read plugin command property description🙂 Now it works perfect!
I just want to add a condition not to change anything "if channel X volume is already 90" to avoid overloading game with parallel process. Could you please give me a script call for that?
Thank you in advance!
@aniforce
Code:
AudioManager.getBgmFromChannel(channel).settingVolume >= 90
@aniforce
Code:
AudioManager.getBgmFromChannel(channel).settingVolume >= 90
Thanks a lot!
@BuckyBattleBorn @aniforce Sorry for the wait, I wasn't active for a few months. I'll start being active again in about 2-3 weeks, so it'll be then for the stop voice function.

@dderrick Ahh yes, I think I coded it in a way so the game reads the data from events that are in the map's base data, not the active map data. It can be changed but not sure if I'll do it, and if I do it won't be any time soon. It's been a long time since I actually coded this plugin so I'd need to re-read it and go through it again, which takes time.

@Unfaith Hmmm, to be honest I'm not sure. It's been a while since I coded this plugin, so I'll have to test on my end. I'll be back home only in 2-3 weeks tho.
Oh, I've already fixed this plugin. Thanks

Hi! Thank you very much for this plugin! I have the same question about the "stop Voice" function. Do you have any idea when it might be available? Thank you in advance!

I fixed this issue
Great plugin but I've noticed an issue with spacial BGS where they sometimes won't autostart until the player moves after map transition. Setting it to dynamic fixes it, but shouldn't be necessary.
Great plugin but I've noticed an issue with spacial BGS where they sometimes won't autostart until the player moves after map transition. Setting it to dynamic fixes it, but shouldn't be necessary.
I think I recall encountering that in the past. Check if you have the latest version, and if you do that bug might remain, which I would need to fix. I will fix it if it's still there since I do have to use this plugin in my project, but it might take a while, I'm a bit overloaded irl atm.
Hi there! I'm working on my first project and I've been using your plugin. It's been super useful.

I have a question about spatial BGS. I'm using a system of symbol encounters for combat that at first move in a set pattern and then follow the player when they aproach them thanks to MogHunter's event sensor

I wanted to add spatial BGS so that each enemy makes a sound as you approach it. I've set an autoevent that delets itself in order to set the spatial BGS and then I've turned the movinmg symbol encounters into audio sources by adding the channel to the event tag.

It works really well except for one problem. The symbol encounter is set to delete the event if the player wins the combate encounter. My problem is that the BGS remains even after the event deletes itself, as if the event was gone but the audio source itself remaines so there is no enemy but you can still hear the sound it made if you walked past where you killed it.

Is there a way to fix this issue? I there any other way to remove an audio source? Thank you very much!
[...]

Is there a way to fix this issue? I there any other way to remove an audio source? Thank you very much!
The system unfortunately wasn't built for events that are being deleted (or created after the map is initialized), but you can manually remove the spatial BGS if you know the channel number with the "Stop BGS" plugin command. Spatial BGM/BGS use the same channels as regular BGM/BGS so that commands work for both.
The system unfortunately wasn't built for events that are being deleted (or created after the map is initialized), but you can manually remove the spatial BGS if you know the channel number with the "Stop BGS" plugin command. Spatial BGM/BGS use the same channels as regular BGM/BGS so that commands work for both.
Thank you very much! I've actually solved this issue by giving each individual enemy its own audio channel and then just adding the stop BGS command at the victory condition.

Before that I was giving each enemy type its shared audio channel and that prevented me from stopping the BGS for only an enemy

Original thread: https://forums.rpgmakerweb.com/threads/mush-audio-engine-spatial-audio-voice-acting-new-channels-etc.128741/