FMOD_MV.js - FMOD engine integration plugin for MV

og-image.png

FMOD_MV.js
by Creta Park

Download : GitHub repository

This plugin integrated with FMOD by Firelight Technologies Pty Ltd.
You can use industry-leading audio engine for RPG Maker MV.

Currently it's on alpha version, it may not work as expected in any cases.
​
Due to the original usage, there may be unsupported features.
Please check the specifications carefully before use.
​

What is FMOD?​

FMOD is an audio middleware that processes and manages sound.
Mainly used for video games, it helps you use adaptive audio.

For more details, please watch this video summarized by Scruffy.



Background​

This plugin was created for the 2022 1Chicken game jam contest, a game jam event hosted by 1Map1Chicken RPG Maker contest in Korea.

The game we made by participating in this game jam was DOWNFALLEN, and it was the opportunity to create the corresponding plug-in for this game.

You can play it here.

Demonstration​

If you curious what it does, watch this video.



License​

This plugin's license is a variant of the MIT License, so you are free to use it as long as you comply with these terms.
  1. When using this plugin with other software, the software must be a game developed and made with RPG Maker, and FMOD_MV.js by Creta Park must be written in the credit of these game.

  2. Should not be confused 1's content with the attribution of FMOD.
    Mark completely separate from the attribution of the FMOD.

  3. Neither this plugin nor any of its individual components, in Original or Modified Versions, may be sold by itself.

  4. When redistributed after modification, the original author must be indicated.
This can also be found in the LICENSE file.

How to use​

Please refer to the README.md of the repository if you looking for How to setup, usage, limitation etc.
https://github.com/creta5164/fmod-rmmv/blob/main/README.md

There are so many features that I've given up on putting them in the plugin description...
Creta,

Ok So I got the Celeste FMOD Studio project working in a new project and have been messing around with it. But I cant seem to get my own FMOD project working with my RPG Maker project. I've built the master, master.string, bgm, bgs, me and se banks, created the *guids.js and put em all in the audio/bank folder. I edited fmodstudio.js and index.html. I can't see the difference in my build or project than Celeste's. I have no VCA's (don't even know how to) but if I turn off the vca's in Celeste's project it still works fine. help?

Also there are some missing elements in your setup guide and some easy to misunderstand parts as well. I'd like to offer my help in pointing them out but figure I should at least have mine running before helping with the guide lol.

Layer 1.png
Creta,

Ok So I got the Celeste FMOD Studio project working in a new project and have been messing around with it. But I cant seem to get my own FMOD project working with my RPG Maker project. I've built the master, master.string, bgm, bgs, me and se banks, created the *guids.js and put em all in the audio/bank folder. I edited fmodstudio.js and index.html. I can't see the difference in my build or project than Celeste's. I have no VCA's (don't even know how to) but if I turn off the vca's in Celeste's project it still works fine. help?

Also there are some missing elements in your setup guide and some easy to misunderstand parts as well. I'd like to offer my help in pointing them out but figure I should at least have mine running before helping with the guide lol.
Hello, ephesus.
Thanks for taking the time to check it out!

I did not assume that the case without VCA would happen, this is completely my mistake.
I'll fix it to leave a warning about this in the console later.

1661676890020.png

Roughly explaining, FMODs output audio through a flow like this.
Since VCA is mainly an output for adjusting the volume, it is should to use it.

FMOD docs : https://www.fmod.com/docs/2.01/studio/mixing.html#vcas
Note that VCA can be created and managed in the mixer window of FMOD studio.

Also there are some missing elements in your setup guide and some easy to misunderstand parts as well.
And as always, contributions are always welcome!
It would be good if you could organize it in detail through PR or issues on this repository.
When I left the VCA's blank for Celeste's project parameters it still worked. Is it because it still had them in the project's .js file?
When I left the VCA's blank for Celeste's project parameters it still worked. Is it because it still had them in the project's .js file?
That's right, because I was overlooking that exportGUIDheader.js used in the FMOD script doesn't create the item itself if each corresponding item doesn't have an elements...

1661752191382.png

I just deployed it with the ability to notify the repository of the issue a while ago, be sure to route the VCA to each channel (BGM, BGS, ME, SE) and use it!
I Built BGM, BGS, ME and SE VCA's in FMStudio and I believe that fixed the prior issue. But...

The game is being hung up on the "Now Loading..." screen. The de-bugging console shows the error:

"Uncaught SyntaxError: Unexpected token ':' audio/bank/fmod_studio_guids.js:18"

Here is my fmod_studio_guids.js:
Spoiler: fmod_studio_guids.js
/*
fmod_studio_guids.js - FMOD Studio API

Generated GUIDs for project 'The_Rooms.fspro'
*/

const FMOD_FSPRO = {
Event: {
_06___DavidKBD___Belmont_Chronicles_Pack___Cathedral: new Guid(0x85fd85e9, 0xc371, 0x4ee6, 0x86, 0x10, 0x4d, 0x3f, 0x2c, 0xa4, 0x18, 0x06),
Campfire: new Guid(0x72bf7c8b, 0xa0a9, 0x4492, 0xa1, 0x22, 0x92, 0x52, 0xa3, 0xd4, 0x93, 0x44),
DavidKBD___My_Little_Bots_Pack___09___Hung: new Guid(0x3d3143fc, 0xd012, 0x4d00, 0xb7, 0xb5, 0xfe, 0xc9, 0xdb, 0xd4, 0x6e, 0x6d),
Forest_2: new Guid(0x38875d7b, 0xc5b0, 0x49a2, 0x8e, 0x67, 0x84, 0xff, 0x0d, 0xf5, 0x23, 0x67),
tm2_coin000: new Guid(0x9579cc80, 0xeb22, 0x4829, 0x9e, 0x35, 0x49, 0xf5, 0x51, 0x7d, 0xeb, 0xff),
tm2_switch001: new Guid(0x05a79687, 0x8cc3, 0x4ab2, 0x84, 0x1b, 0x7a, 0x87, 0xeb, 0x12, 0xd9, 0x18),
},

Bus: {
: new Guid(0x66589c18, 0x9d9f, 0x47c9, 0x9a, 0xcb, 0x1b, 0x2d, 0xf1, 0x79, 0x7f, 0x36),
Master_Bus: new Guid(0xf0014fbc, 0xfdb0, 0x4092, 0xbe, 0xd9, 0xe5, 0xe2, 0x75, 0x3f, 0x3d, 0x02),
Reverb: new Guid(0xd79770f6, 0x6ffc, 0x4303, 0xb1, 0x15, 0xe1, 0xe2, 0x48, 0x5a, 0x45, 0x51),
},

VCA: {
BGM: new Guid(0x3d6c8ace, 0x9db2, 0x460e, 0x86, 0x03, 0xc1, 0x6c, 0xc0, 0x32, 0xde, 0x2f),
BGS: new Guid(0x3ce9c7b2, 0xf4d8, 0x4d7b, 0x88, 0xfe, 0xb6, 0x22, 0x67, 0x01, 0x42, 0xbf),
ME: new Guid(0x45f58703, 0xae40, 0x4ba2, 0x87, 0xcf, 0x80, 0xdb, 0x93, 0x0f, 0xfb, 0xe8),
SE: new Guid(0x853555e3, 0xb74e, 0x480e, 0x84, 0xcd, 0xbc, 0x69, 0xd1, 0xb5, 0x2b, 0x1b),
},

Bank: {
BGM: new Guid(0x61617883, 0xd392, 0x4ae5, 0x8a, 0x99, 0xd5, 0xf9, 0x7d, 0x9b, 0xf9, 0x94),
BGS: new Guid(0x482e699a, 0xd54f, 0x46ad, 0x92, 0x24, 0x62, 0x2c, 0x79, 0x37, 0x1e, 0x1d),
Master: new Guid(0xbf33cdea, 0xe689, 0x406f, 0xa5, 0xeb, 0x43, 0x21, 0x5f, 0x71, 0x99, 0x29),
ME: new Guid(0xe85f96f4, 0x8c99, 0x40df, 0xa8, 0xec, 0x9f, 0x18, 0x98, 0x83, 0x23, 0xef),
SE: new Guid(0x906226b9, 0xb1c3, 0x4041, 0xb5, 0xdb, 0x52, 0x6f, 0xd3, 0x00, 0xf1, 0x94),
},

};

EDIT: I just saw your previous post. DL'ing new build and testing now...

EDIT EDIT: Yes, So I AM getting this new error with the new build (alpha 1.01)
I Built BGM, BGS, ME and SE VCA's in FMStudio and I believe that fixed the prior issue. But...

The game is being hung up on the "Now Loading..." screen. The de-bugging console shows the error:

"Uncaught SyntaxError: Unexpected token ':' audio/bank/fmod_studio_guids.js:18"

Here is my fmod_studio_guids.js:
Spoiler: fmod_studio_guids.js
/*
fmod_studio_guids.js - FMOD Studio API

Generated GUIDs for project 'The_Rooms.fspro'
*/

const FMOD_FSPRO = {
Event: {
_06___DavidKBD___Belmont_Chronicles_Pack___Cathedral: new Guid(0x85fd85e9, 0xc371, 0x4ee6, 0x86, 0x10, 0x4d, 0x3f, 0x2c, 0xa4, 0x18, 0x06),
Campfire: new Guid(0x72bf7c8b, 0xa0a9, 0x4492, 0xa1, 0x22, 0x92, 0x52, 0xa3, 0xd4, 0x93, 0x44),
DavidKBD___My_Little_Bots_Pack___09___Hung: new Guid(0x3d3143fc, 0xd012, 0x4d00, 0xb7, 0xb5, 0xfe, 0xc9, 0xdb, 0xd4, 0x6e, 0x6d),
Forest_2: new Guid(0x38875d7b, 0xc5b0, 0x49a2, 0x8e, 0x67, 0x84, 0xff, 0x0d, 0xf5, 0x23, 0x67),
tm2_coin000: new Guid(0x9579cc80, 0xeb22, 0x4829, 0x9e, 0x35, 0x49, 0xf5, 0x51, 0x7d, 0xeb, 0xff),
tm2_switch001: new Guid(0x05a79687, 0x8cc3, 0x4ab2, 0x84, 0x1b, 0x7a, 0x87, 0xeb, 0x12, 0xd9, 0x18),
},

Bus: {
: new Guid(0x66589c18, 0x9d9f, 0x47c9, 0x9a, 0xcb, 0x1b, 0x2d, 0xf1, 0x79, 0x7f, 0x36),
Master_Bus: new Guid(0xf0014fbc, 0xfdb0, 0x4092, 0xbe, 0xd9, 0xe5, 0xe2, 0x75, 0x3f, 0x3d, 0x02),
Reverb: new Guid(0xd79770f6, 0x6ffc, 0x4303, 0xb1, 0x15, 0xe1, 0xe2, 0x48, 0x5a, 0x45, 0x51),
},

VCA: {
BGM: new Guid(0x3d6c8ace, 0x9db2, 0x460e, 0x86, 0x03, 0xc1, 0x6c, 0xc0, 0x32, 0xde, 0x2f),
BGS: new Guid(0x3ce9c7b2, 0xf4d8, 0x4d7b, 0x88, 0xfe, 0xb6, 0x22, 0x67, 0x01, 0x42, 0xbf),
ME: new Guid(0x45f58703, 0xae40, 0x4ba2, 0x87, 0xcf, 0x80, 0xdb, 0x93, 0x0f, 0xfb, 0xe8),
SE: new Guid(0x853555e3, 0xb74e, 0x480e, 0x84, 0xcd, 0xbc, 0x69, 0xd1, 0xb5, 0x2b, 0x1b),
},

Bank: {
BGM: new Guid(0x61617883, 0xd392, 0x4ae5, 0x8a, 0x99, 0xd5, 0xf9, 0x7d, 0x9b, 0xf9, 0x94),
BGS: new Guid(0x482e699a, 0xd54f, 0x46ad, 0x92, 0x24, 0x62, 0x2c, 0x79, 0x37, 0x1e, 0x1d),
Master: new Guid(0xbf33cdea, 0xe689, 0x406f, 0xa5, 0xeb, 0x43, 0x21, 0x5f, 0x71, 0x99, 0x29),
ME: new Guid(0xe85f96f4, 0x8c99, 0x40df, 0xa8, 0xec, 0x9f, 0x18, 0x98, 0x83, 0x23, 0xef),
SE: new Guid(0x906226b9, 0xb1c3, 0x4041, 0xb5, 0xdb, 0x52, 0x6f, 0xd3, 0x00, 0xf1, 0x94),
},

};

EDIT: I just saw your previous post. DL'ing new build and testing now...

EDIT EDIT: Yes, So I AM getting this new error with the new build (alpha 1.01)
Thanks for the detailed information, in the GUID code you sent me, I noticed that the first column of Bus name is empty.

Just for sure, is your FMOD project actually has empty named Bus in Buses?
Not that I can tell.

can I just delete that line? I mean, it would still ne good to know why that is there. Not sure what I did.
Layer 1.png
Not that I can tell.

can I just delete that line? I mean, it would still ne good to know why that is there. Not sure what I did.
View attachment 239200
Yes, once you delete the corresponding line
: new Guid(0x66589c18, 0x9d9f, 0x47c9, 0x9a, 0xcb, 0x1b, 0x2d, 0xf1, 0x79, 0x7f, 0x36),
it will work.

But can you check if the same result even after restart FMOD Studio and re-creating the GUID script?
Occasionally, there was a problem that a GUID with a duplicate name appeared.

This was also noted in the documentation. (2nd part)

If the same result is obtained even after doing this, find and check the Bus with an ID starting with 66589c18 (Start ID of the bus with an empty name in the GUID script you uploaded).

If it's not found, or if it exists but has a name, please let me know so I can help fix exportGUIDsHeaer.js.

1661841130304.png


GUID can be copied by right-clicking on the desired item.
Reloading FMOD and re-exporting the guids header worked!
Spoiler: fmod_studio_guids.js
/*
fmod_studio_guids.js - FMOD Studio API

Generated GUIDs for project 'The_Rooms.fspro'
*/

const FMOD_FSPRO = {
Event: {
_06___DavidKBD___Belmont_Chronicles_Pack___Cathedral: new Guid(0x85fd85e9, 0xc371, 0x4ee6, 0x86, 0x10, 0x4d, 0x3f, 0x2c, 0xa4, 0x18, 0x06),
Campfire: new Guid(0x72bf7c8b, 0xa0a9, 0x4492, 0xa1, 0x22, 0x92, 0x52, 0xa3, 0xd4, 0x93, 0x44),
DavidKBD___My_Little_Bots_Pack___09___Hung: new Guid(0x3d3143fc, 0xd012, 0x4d00, 0xb7, 0xb5, 0xfe, 0xc9, 0xdb, 0xd4, 0x6e, 0x6d),
Forest_2: new Guid(0x38875d7b, 0xc5b0, 0x49a2, 0x8e, 0x67, 0x84, 0xff, 0x0d, 0xf5, 0x23, 0x67),
tm2_coin000: new Guid(0x9579cc80, 0xeb22, 0x4829, 0x9e, 0x35, 0x49, 0xf5, 0x51, 0x7d, 0xeb, 0xff),
tm2_switch001: new Guid(0x05a79687, 0x8cc3, 0x4ab2, 0x84, 0x1b, 0x7a, 0x87, 0xeb, 0x12, 0xd9, 0x18),
},

Bus: {
Master_Bus: new Guid(0xf0014fbc, 0xfdb0, 0x4092, 0xbe, 0xd9, 0xe5, 0xe2, 0x75, 0x3f, 0x3d, 0x02),
Reverb: new Guid(0xd79770f6, 0x6ffc, 0x4303, 0xb1, 0x15, 0xe1, 0xe2, 0x48, 0x5a, 0x45, 0x51),
},

VCA: {
BGM: new Guid(0x3d6c8ace, 0x9db2, 0x460e, 0x86, 0x03, 0xc1, 0x6c, 0xc0, 0x32, 0xde, 0x2f),
BGS: new Guid(0x3ce9c7b2, 0xf4d8, 0x4d7b, 0x88, 0xfe, 0xb6, 0x22, 0x67, 0x01, 0x42, 0xbf),
ME: new Guid(0x45f58703, 0xae40, 0x4ba2, 0x87, 0xcf, 0x80, 0xdb, 0x93, 0x0f, 0xfb, 0xe8),
SE: new Guid(0x853555e3, 0xb74e, 0x480e, 0x84, 0xcd, 0xbc, 0x69, 0xd1, 0xb5, 0x2b, 0x1b),
},

Bank: {
BGM: new Guid(0x61617883, 0xd392, 0x4ae5, 0x8a, 0x99, 0xd5, 0xf9, 0x7d, 0x9b, 0xf9, 0x94),
BGS: new Guid(0x482e699a, 0xd54f, 0x46ad, 0x92, 0x24, 0x62, 0x2c, 0x79, 0x37, 0x1e, 0x1d),
Master: new Guid(0xbf33cdea, 0xe689, 0x406f, 0xa5, 0xeb, 0x43, 0x21, 0x5f, 0x71, 0x99, 0x29),
ME: new Guid(0xe85f96f4, 0x8c99, 0x40df, 0xa8, 0xec, 0x9f, 0x18, 0x98, 0x83, 0x23, 0xef),
SE: new Guid(0x906226b9, 0xb1c3, 0x4041, 0xb5, 0xdb, 0x52, 0x6f, 0xd3, 0x00, 0xf1, 0x94),
},

};

I should have searched for the empty Bus before I restarted FMOD but I didn't. Hopefully I didn't hinder the debugging process.

Thanks for the help! I'll post some suggestions to the guide in the repo. I want to make sure anyone that is interested in this can get it working. Especially us artist/non-programmer types.

I'm really surprised no one else is on this board yet. It must have gone under the radar. I know there's a bunch of us that have been waiting a long time for this. You are a hero!
I came across this a few times, and search what it does, but for me, it's
to complicated to dive deeper into it as I still dont know what it does
exactly.

and it takes alot of time to search things or specific word to see what
they exactly mean to figure out what they mean for the software.

I dont say it's bad, as it can help people alot, and new plugins/programs
to make things easier is always welcome.

so dont give up the good work you made so far 🙂
Here's a new one! (This one happens with the Celeste's project as well as mine: When you load the game and the title screen comes up the background music does not play and SE won't play either. But as soon as you click the mouse the music and SEs will start playing. Even if you start new game, nothing will play, unless you click the mouse.
I came across this a few times, and search what it does, but for me, it's
to complicated to dive deeper into it as I still dont know what it does
exactly.

and it takes alot of time to search things or specific word to see what
they exactly mean to figure out what they mean for the software.

I dont say it's bad, as it can help people alot, and new plugins/programs
to make things easier is always welcome.

so dont give up the good work you made so far 🙂
3d spatial sound. So if a sound is northeast and 15 tiles away it'll sound like it. Not just volume either, it'll sound further away. And you can add effects like reverb and echoes and cutoffs and distortion. Plus you can be doing all this live.

Like, as you enter the cave sounds start to reverberate and it intensifies as you go deeper, then you enter a cavern in the cave and the sounds start to echo. the sound of a little river is loud and reverberating but as you get closer it gets clearer. The drips, are the same SE but each one sounds a little different.

Or the music is serene until you enter a field and see a miniboss and the music gets mor intense, once he spots you it gets even more intense, as he gets your health down the music gets drastic, but as you make a comeback it is epic then triumphant as he dies.

it can be as simple as just using the 3d sound on your maps, or as deep as you want it to go. I'm still super novice but know some of the capabilities. lol.

Disclaimer though, The above limitations say its not functioning for battle yet, I dunno if this is just for sound effects or music too. But I think you can use this system and the original system at the same time.
like "reverb / reverberate" are things I need to look for, but what you can
explain above is only half I understand, as I know you can set a se/me etc
to low volume like 10 and be 100 when up close.

this might not be the same as this program/plugin does, but much more
dynamic probably.

but I'm good in some software, but to much to learn and to difficult for me.
the same in creating events/plugins, I need to constantly re-read and learn
what is done, the same thing on this software/plugin.

but if there is an indepth step by step userfriendly, than I can look into it,
but for now, not for my current project, maybe it could as I got stuck on
the mapping progress.

so alot of things can be done still. It looks very promising, but when it's
in the early stages (alpha/beta's) it isn't really recommended to use it, but
they can try it out on a clean project to see how it works and does work.

if it works on the parts they needed, they can add it, if not, they can give
feedback to improve or fix the bugs (like sounds and music only plays
on mouseclick) instead of instantly which can be oversight or didn't
update correctly.

but I also learn more for visual demo's where software isn't need
directly but for changing things you can how it's done etc.
I am getting cannot find VCA warnings in my console even though the VCAs are listed in my GUID.js and they are linked and named properly in my plugin parameters. (The VCAs have no settings adjusted and are basically "blank" but that shouldn't be an issue should it? Since they are still there and all.)
Layer 1.png
I am getting cannot find VCA warnings in my console even though the VCAs are listed in my GUID.js and they are linked and named properly in my plugin parameters. (The VCAs have no settings adjusted and are basically "blank" but that shouldn't be an issue should it? Since they are still there and all.)
View attachment 239236
1661905235557.png


VCAs with names BGM, BGS, ME, SE defined in VCAs are automatically tried by FMOD_MV, but found to have a logic error, I just fixed the logic to manually/automatically recognize VCAs and I made it possible to log the process of finding the VCAs.

Can you try it with new version? (alpha-1.0.2)

=====

Edit : Just in case, if you modified the contents of the banks in FMOD Studio, build the GUID together with the banks.
Here's a new one! (This one happens with the Celeste's project as well as mine: When you load the game and the title screen comes up the background music does not play and SE won't play either. But as soon as you click the mouse the music and SEs will start playing. Even if you start new game, nothing will play, unless you click the mouse.
May I know what version of NW.js is?
A quick way to find out is to type the code below into the console.
nw.process.versions["nw"]

1661908812665.png


This is one of the issues I discussed before distributing this plugin on the FMOD forums.
https://qa.fmod.com/t/problem-with-html5-build-on-nw-js/19116

The latest version of FMOD is implemented to prevent media from starting without user interaction in the web environment, which seems to be the problem.
https://www.fmod.com/docs/2.02/api/platforms-html5.html#user-interaction-requirement

It has been confirmed that the plugin works without any problems in NW.js 0.29.4, but if the issue occurs in the latest version of NW.js, I'll inform FMOD devs of this issue in the FMOD forum.

Until then, if you need to use the new version of NW.js for the same reason you need Steamworks, use both FMOD engine and studio 2.01.13.
This worked with no issues on the most recent NW.js at the time I was developing DOWNFALLEN.

=====

Edit : I just confirmed that this problem is occured by adding the new FMOD engine (2.02.08 version) to DOWNFALLEN. (it uses NW.js 0.66.1)
I'll notify the FMOD developers of these issues, and if they are patched about it, I'll post an update in this thread.
It worked! Found all the VCAs.

My nwjs is 0.48.4 FYI.

Lemme know if you need any more testing. I'll keep you updated and will still give some feedback in the repo.

EDIT: What did you mean about Steamworks? I'm not sure what that even is. I don't have a Steam install, just standalone.
EDIT: What did you mean about Steamworks? I'm not sure what that even is. I don't have a Steam install, just standalone.
Most people does updating NW for using Node's native library (i.e. Greenworks, etc) so I was thought your reason about updating NW is because like that.

Anyways thank you for notice that your NW version!
Here's a new one! (This one happens with the Celeste's project as well as mine: When you load the game and the title screen comes up the background music does not play and SE won't play either. But as soon as you click the mouse the music and SEs will start playing. Even if you start new game, nothing will play, unless you click the mouse.
Update : Jeff, the programmer of FMOD, provided an answer to this issue, but I wasn't sure if the feature in this answer was a temporary new feature, so I asked him if it's okay to use it.

FMOD_MV.js will also publish an update to match this as soon as we feel it's okay to use it, then we hope that version 2.02.08 or higher will be freely available!

===

Edit : It seems confirmed bug that NW.js sides, I'll have update FMOD_MV.js soon.

===

Edit : I just published alpha-1.0.3 a while ago that fixed this issue, now FMOD 2.02.08 or higher should work well with higher versions of NW.js.

Original thread: https://forums.rpgmakerweb.com/threads/fmod_mv-js-fmod-engine-integration-plugin-for-mv.150579/