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

changefly

Warper
Member
Joined
Oct 21, 2020
Messages
3
Reaction score
1
First Language
English
Primarily Uses
RMMV
Thank you for the plugin! Working well!

But I found that after I played ME, BGM stopped for some reason.. No idea why it happened.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ
Thank you for the plugin! Working well!

But I found that after I played ME, BGM stopped for some reason.. No idea why it happened.
Where was the BGM played? (map or battle)
Which BGM stopped? (meaning where was it played? From the map autoplay? or using the new BGM system?)
 

changefly

Warper
Member
Joined
Oct 21, 2020
Messages
3
Reaction score
1
First Language
English
Primarily Uses
RMMV
Where was the BGM played? (map or battle)
Which BGM stopped? (meaning where was it played? From the map autoplay? or using the new BGM system?)
Map. BGM was simply from map autoplay, and ME was just from an event.
After ME finished, BGM resumed for a second and then stopped.
I have disabled all of the plugins except MUSH Audio Engine.
 

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
107
Reaction score
193
First Language
English
Primarily Uses
RMMV
This plugin sounds great. (Sorry, couldn't resist.) It's probably wishful thinking, but is there any compatibility with MV? I suppose I can drop it in a project myself and check it out when I get a chance.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ
Map. BGM was simply from map autoplay, and ME was just from an event.
After ME finished, BGM resumed for a second and then stopped.
I have disabled all of the plugins except MUSH Audio Engine.
Alright I'll take a look.

This plugin sounds great. (Sorry, couldn't resist.) It's probably wishful thinking, but is there any compatibility with MV? I suppose I can drop it in a project myself and check it out when I get a chance.
I haven't tried, but since the plugin relies on plugin parameters, there would be some adjustment necessaries in order to run it in MV. Disregarding the plugin parameters thing, I think the code could run in MV, but like I said I haven't tried.
 

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
107
Reaction score
193
First Language
English
Primarily Uses
RMMV
Just FYI, I did drop this plugin into my MV project and messed around with it for a bit tonight.
I'm not sure what AudioManager.cleanupSe() does in MZ, but that function doesn't exist in MV, so the call to it at the end of your rewritten AudioManager.playSe() was throwing me an error. When I commented out that call, it seems like I'm getting expected behaviors with my existing BGM, BGS, and SE calls (albeit with added pitch variation courtesy your plugin).

However, system-related sound effects, like the "cursor" sound effect in the menu, no longer seem to play at all. I'll probably look into that and run some more tests, but overall, compatibility seems promising in general. The whole MZ plugin command thing is foreign to me, but I'm assuming I can get most of the plugin's functionality with script calls anyway, once I iron out this issue.

ETA: I continued poking at it. Found what I believe is the part of the code that the plugin commands would control in PluginManager.registerCommand and grabbed the script code from it that I think should make a spatial BGS object:

var obj = AudioManager.createSpacialAudioObject("Sea", 100, 1, 'bgs', false, 70, 2, 100, 'Origin Expand', 3, 6);
$gamePlayer.addSpacialBGS(obj);
var bgs = {name: obj.filename, pitch: obj.pitch, volume: 0};
AudioManager.playMushBgs(bgs, obj.channel, true);

And I put the notetag in the event: <bgs_source: 1>

But in-game, no sound plays, and console gives me the error:

TypeError: $gamePlayer.addSpacialBGS is not a function

And indeed, when I type $gamePlayer into console, I can't find that, or any of the functions or properties this plugin should be adding to the object. I'm a little baffled by this, since I'm staring right at the prototype for these functions in the plugin and, as far as I understand js and MV, it looks like I expect. Plugin order makes no difference. I'll probably give up at this point and look elsewhere for multi-channel audio, as it looks like achieving compatibility is beyond me.

BTW I don't expect support, obviously. It was always a long shot. I was just curious, and figured I'd report my findings.
 
Last edited:

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ
@Featherbrain Ahh yes I forgot that SE changed a bit in MZ. Basically, the cleanup function is just a function that clears all inactive SE in the seBuffers array. By default it's called everytime and SE is played in MZ.

The plugin command system in MZ is just more evolved than in MV, but it can still be achieved in MV. You pretty much nailed it.

As for the $gamePlayer, it's very weird since it does exist in MV and it does appear in the console for me.

I don't have any plans to port this plugin to MV, but if there's a lot of people asking I might in the future.
 

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
107
Reaction score
193
First Language
English
Primarily Uses
RMMV
Yeah, that $gamePlayer thing is a real head-scratcher tbh. Knowing me I might come back and poke at the problem later on, after I've learned more about javascript, and if I do I'll report anything I find out... but for right now it's beyond my power level.

As for porting it, add me to the interested list, but no pressure. I do believe the QAudio plugin for MV users also does the multi-channel audio I really need. (Spatial audio is just a very nice to have.) Only thing is, the Q plugins are another big comprehensive suite that requires a "Core" plugin that does I don't know what, so truth be told I've been on the lookout for a "slimmer" audio plugin alternative so as to avoid all that. If you do port this, I'd like to use it. If not, I'll try QAudio (eventually).
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ
Thank you for the plugin! Working well!

But I found that after I played ME, BGM stopped for some reason.. No idea why it happened.
Which version of the plugin are you using? If you're not using the up to date plugin (version 1.04), then I'd suggest updating and testing again. I fixed an ME issue in that version.
 

changefly

Warper
Member
Joined
Oct 21, 2020
Messages
3
Reaction score
1
First Language
English
Primarily Uses
RMMV
Which version of the plugin are you using? If you're not using the up to date plugin (version 1.04), then I'd suggest updating and testing again. I fixed an ME issue in that version.
So sorry for the late respond!

I am using the latest version, and I started a new project, created an event running ME, and tested. After ME finished, BGM faded out.

Didn't change any plugin config, just enabled it, and did not even use any plugin command.

Thanks~
 

TrentL111

Archmage
Veteran
Joined
Oct 13, 2018
Messages
48
Reaction score
16
First Language
English
Primarily Uses
RMMV
So sorry for the late respond!

I am using the latest version, and I started a new project, created an event running ME, and tested. After ME finished, BGM faded out.

Didn't change any plugin config, just enabled it, and did not even use any plugin command.

Thanks~
Same thing happened to me. As soon as an ME plays, the BMG fades out.

I love this plugin a lot, otherwise.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ
Same thing happened to me. As soon as an ME plays, the BMG fades out.

I love this plugin a lot, otherwise.
Yeah I'm aware of the issue. I plan on fixing it soon. Just finished my finals so I have a lot more time now.
 

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
107
Reaction score
193
First Language
English
Primarily Uses
RMMV
I dusted this off again to take another look at it in MV and had more success today. This time I was able to get what I need out of it--two different BGS sounds playing at the same time, with appropriate positional effects to boot. The trick was commenting out the entire PluginManager portion of the plugin; even though I wasn't using the plugin commands directly, it was still causing conflicts.

Other than that, it does seem like this would be an easy conversion to MV. It's mostly just the plugin commands. For those willing to bypass the use of plugin commands with script calls, the functionality seems to be there.

There is still the issue with menu sound effects (which this plugin--or MZ itself?--designates as "UI" SEs) not playing at all. Will update if I figure anything out there. ETA: Just to be clear, no menu sounds occur whether the "UI Sound Effects" parameter is true or false.

ETA2: So the hacky fix to the UI SEs is to simply comment out the "AudioManager.playStaticSe" function in MUSH_Audio_Engine. Of course this disables the plugin's ability to do anything to the UI effects, and it would probably be better to figure out why the rewritten function doesn't work in MV, but... I personally don't need this plugin's UI SE capabilities, so barring further issues, I'm happy. Anyone who wants this plugin in MV, minus the UI SE capabilities and plugin commands, should be able to follow the steps I've outlined in this thread.
 
Last edited:

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
107
Reaction score
193
First Language
English
Primarily Uses
RMMV
So, I spoke a bit too soon. I turned up a few more RMMZ-specific functions that don't exist in RMMV, like Scene_Map.onTransfer and WebAudio.destroy. Also, I think RMMV doesn't support certain ES6 constructs/keywords(?), in particular, the "const" declaration and "const... of" for-loop syntax; I replaced those with "var" declarations and traditional for-loops.

Now I'm able to control UI SEs properly, and also fixed a few other issues I encountered (like BGMs not actually clearing on map transfer, due to the aforementioned missing functions in MV). It helped a lot when I finally dug up the MZ source code to compare.

I now expect it might be an ongoing process getting this fully compatible with MV and I probably won't keep detailing every thing I turn up. I just wanted to follow up since I don't want to mislead anybody based on my previous posts (and also in case @MushroomCake28 does decide to push out an MV version, my findings might help give a starting point). The code is definitely very compatible, but there were more changes to the affected functions from MV to MZ than I first realized and there's more to it than simply commenting things out.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,783
Reaction score
4,726
First Language
English
Primarily Uses
RMMZ
Also, I think RMMV doesn't support certain ES6 constructs/keywords(?), in particular, the "const" declaration and "const... of" for-loop syntax; I replaced those with "var" declarations and traditional for-loops.
Yeah some versions of MV are not compatible with ES6, but I believe it was updated once to be compatible. I'm not sure though, but I now my projects in MV were compatible, but I updated my nwjs to like 0.32.4, so not sure if everyone with the latest version of MV has ES6 compatibility. Anyways, one thing for sure is ES6 is not compatible with all MV projects.
 

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
107
Reaction score
193
First Language
English
Primarily Uses
RMMV
I'm using MV 1.6.2, up to date with Steam, but the default nwjs, so that could be it. I think MV handles some ES6, but that stuff seemed to be causing problems.
 

Dusttt

Villager
Member
Joined
Nov 12, 2017
Messages
21
Reaction score
76
First Language
French
Primarily Uses
RMMV
Thank you i will keep an eye on updates.

Do you plane to add audio looping functions?
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm moving on from RMXP finally. I've been stuck in a difficult decision between XP and MZ, and I've given up and moved on to MZ. Overall I'm really liking it, I wish tilesets were easier to setup like XP, but it's actually not that bad!
Have you ever gone full 'Ship of Theseus' while frankenspriting? Because I just did.
I saw my new eye doctor today, he reminds me of Satoru Iwata for some reason
I've been using a modified version of a script called Multiple Messages. It makes my text boxes look like a Mario & Luigi game! There is something about it that bothers me a little bit, but I shouldn't worry about that now.

Side note, Mist's walking animation is almost perfectly in sync with Loose Yourself by Eminem.
Starting work on some stuff for the community. Hopefully it will be fun, and useful to somebody.

Forum statistics

Threads
107,772
Messages
1,032,033
Members
139,914
Latest member
smudge
Top