OcRam - Audio_EX plugin (for MV)

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Introduction
This plugin comes with dynamic distance fading/auto panning for BGS and SE. Plugin allows multiple BGS at the same time and 2 'static' BGS channels that will play through out scenes (intended for ambient BGS such as rain/wind/storm etc...). Plugin also has BGS/BGM fading functionality.

All BGS buffers are saved on game save. And of course on game load all saved buffers will autoplay on the spot where they were when game was saved.

In addition you may force events to play BGS even if event page is not triggered. Example you might got event that activates on "Action Button", but still want to play BGS on load.

Here's what you need:
  1. This plugin
  2. Configure plugin parameters
  3. Add comments to events where you want SE/BGS with extended functionality
*Comment* <aex:type:distance+radius: pan:loop:forced>
  • type || Text || {x, y, d, bg}
    x = horizontal (ignores y axis)
    y = vertical (ignores x axis)
    d = dynamic (ignores nothing)
    bg = background (ignores both, x and y axis)
  • distance || In tiles || {number}
  • radius || in tiles || {number}
  • fade || Seconds || {number}
  • pan || text || {pan/true, nopan/false}
  • forced || Text || {forced/true, default/false}
  • new || text || {new/true, link/false}

Following examples are written with default plugin parameters:

*Comment* <aex> (is same as: <aex:d:25+0:0: pan:forced>)
*Play BGS* fire (90, 100, 0)

*Comment* <aex:::::default> (is same as: <aex:d:25+0:0: pan:default>)
*Play BGS* fire2 (90, 100, 0)

*Comment* <aex:x::0> (is same as: <aex:x:25+0:0: pan:forced>)
*Play BGS* ocean (90, 100, 0)

*Comment* <aex:bg:0:3> (is same as: <aex:bg:0+0:3:nopan:forced>)
*Play BGS* rain (90, 100, 0)

Below some notes:
  • NOTE 1: ALL sounds created via <aex*> tags will be erased if player is transfered to another map.
  • NOTE 2: "forced" parameter will execute BGS/SE always, when scene is loaded. (even if event trigger would be "Action button" or "on touch") "default" parameter will execute BGS/SE ONLY, when event is triggered as intended.
  • NOTE 3: AEX params will execute ONLY if they are on ACTIVE event page!

NOTE: Plugin command parameters may NOT contain any spaces (because space is delimeter for command arguments)

Plugin command (to CLEAR buffers with this event id)
clear_aex [eventId]​
example: clear_aex 1
You may also ommit event id then plugin will default to 'this' event​
example: clear_aex

Plugin commands (to control dedicated bgs2, which will play also in battle):
play_bgs2 [bgs_name_here] [volume] [pitch] [pan]​
Example: play_bgs2 rain 90 100 0
stop_bgs2

Plugin command (to control dedicated bgs3, which will play also in battle):
play_bgs3 [bgs_name_here] [volume] [pitch] [pan]​
Example: play_bgs3 wind 40 80 0
stop_bgs3

Plugin commands to dynamic BGS:
pause_bgs [name] [fade_time]​
resume_bgs [name] [fade_time]​
fadeout_bgs [name] [fade_time]​
erase_bgs [name]​
(To erase all bgs use: erase_bgs *)

fade [name] to [volume] in [fade_time] sec​
Example: fade Wind to 20 in 6 sec
Same as: fade Wind to 20 in 6
BGM: fade *bgm* to 0 in 4 sec

ps. Do not mind those <light*> comments those are for OcRam_Lights -plugin.

First we need to tell that this is Audio_EX event (AEX). We can do it by adding *Comment* BEFORE actual *Play BGS* command. Because this event is forced it will start playing when ever this page is active (no Action button press required).

Then we need *Plugin command* clear_aex to clear this BGS before setting self switch on which will trigger event page 2 (shown after). This part will run only when player presses Action Button on this event.
audio_setup_on_off_page1.png

This page has no BGS sound and because 1st page has FORCED AEX event it will play BGS automatically when Self Switch D is OFF.
audio_setup_on_off_page2.png

All OcRam -plugins now available at ocram-codes.net

Please read:
Terms of Use

Latest version: Download from here

All my plugins: Check 'em out!
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Hello, :kaohi:

I just couldn't wait to upload this update. This patch will give possibility to play multiple BGS with same name! Also added small tutorial how to use togglable audio.

Latest version - v1.01 (released 2019/04/28)
  • Allow multiple BGS with same name to play same time
  • Added new plugin command "clear_aex" to clear AEX sound data and buffer from desired event
  • Also made auto panning more notable + more efficient
 

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
549
Reaction score
552
First Language
Swedish
Primarily Uses
RMMV
Cool plugin but can't get it to work with YEP_FootstepSounds sadly. Seems to be a compatibility error or something. Not sure if you have the time to look into it.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Cool plugin but can't get it to work with YEP_FootstepSounds sadly. Seems to be a compatibility error or something. Not sure if you have the time to look into it.
Thank you for the message,

I'll take a look at this ASAP. Doesn't seem to be big problem.

EDIT: Issue fixed in version 1.02
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Latest version - v1.03 (released 2019/05/21)
  • Fixed issues with BGM (if played same BGM more than once)
  • New property 'current BGS', this enables normal BGS command!
  • AEX distance check (linear/curved) is now parameter!
    (Linear MATH is faster than curved, but curved fades more 'smoothly' (starts fading slowly)
  • Now Audio_EX is OcRam_Weather_EX v2.00 + OcRam_Time_System compatible!
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
HOTFIX v1.031 >> replayBgm works again ...sorry for any trouble it may have caused!
 

Gregaur

Veteran
Veteran
Joined
Jan 3, 2017
Messages
134
Reaction score
20
First Language
french
Primarily Uses
RMMV
Hey ! A very Nice plugin.

I have a few issue but it's maybe because how my use of it.

Here is my situation : On a single map I have 1 source of sound (a fall) in continue (parallel event) <aex::30:::forced> and here is what I have. Every parameters are the default ones.

- When I reload the game, I can't here the fall anymore (I use the YEP savecore plugin)
- When I'am in the menu I can here the BGS anywhere on the map even if I'm too far from it. If I leave the menu, the BGS disapear.
- When I leave the menu Inside the BGS zone, I can't here it anymore.
- In option, when I want to parameter the audio it turn the BGM down (even in the menu screen)
- Every BGM start now with a fade in, even on map without any "AEX" Events
- When I leave a map, some time I here the BGS at 100% for a second
- Sometime, on the map when I'm too far from the Source, I can here a strang "clic clic" like the sound would like to start and turn off 2 frame after that.

Anyway, this plugin seems to be great, I hope I can figure out to make it work properly !

Greg
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Hey ! A very Nice plugin.

I have a few issue but it's maybe because how my use of it.

Here is my situation : On a single map I have 1 source of sound (a fall) in continue (parallel event) <aex::30:::forced> and here is what I have. Every parameters are the default ones.

- When I reload the game, I can't here the fall anymore (I use the YEP savecore plugin)
- When I'am in the menu I can here the BGS anywhere on the map even if I'm too far from it. If I leave the menu, the BGS disapear.
- When I leave the menu Inside the BGS zone, I can't here it anymore.
- In option, when I want to parameter the audio it turn the BGM down (even in the menu screen)
- Every BGM start now with a fade in, even on map without any "AEX" Events
- When I leave a map, some time I here the BGS at 100% for a second
- Sometime, on the map when I'm too far from the Source, I can here a strang "clic clic" like the sound would like to start and turn off 2 frame after that.

Anyway, this plugin seems to be great, I hope I can figure out to make it work properly !

Greg
Thank you for the message,

- When I'am in the menu I can here the BGS anywhere on the map even if I'm too far from it. If I leave the menu, the BGS disapear.
- When I leave the menu Inside the BGS zone, I can't here it anymore.
- In option, when I want to parameter the audio it turn the BGM down (even in the menu screen)

Does these happen only if you LOAD the game?

If plugin parameter "Default fade (BGM)" is > 0 it will indeed fade every BGM (even if there's no "AEX" tag). It's kind of supposed to work that way. If BGM fade is not wanted put "0" to this parameter.

- When I leave a map, some time I here the BGS at 100% for a second
- Sometime, on the map when I'm too far from the Source, I can here a strang "clic clic" like the sound would like to start and turn off 2 frame after that.

I will check these.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Latest version - v1.04 (released 2019/06/03)
  • saveBGM won't fail anymore if BGM is 'nothing'!
  • Fixed SEVERAL bugs related to forced 'AEX' BGS on game load
 

Vardet

Warper
Member
Joined
Feb 12, 2018
Messages
2
Reaction score
1
First Language
Spanish
Primarily Uses
RMMV
First of all, thank you so much for the plugin!
I'm quite new in the RPG Maker world, so I don't know if I screwed up somewhere, but I get an error loading a save with your plugin installed.

upload_2019-6-13_23-2-7.png
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
First of all, thank you so much for the plugin!
I'm quite new in the RPG Maker world, so I don't know if I screwed up somewhere, but I get an error loading a save with your plugin installed.

View attachment 117415
Thank you for the message,

I can confirm this error. This happens only if you are trying to load game file which has been saved without Audio_EX -plugin. I will fix this (estimated schedule start of next week).
 

Vardet

Warper
Member
Joined
Feb 12, 2018
Messages
2
Reaction score
1
First Language
Spanish
Primarily Uses
RMMV
Oh, understood!

Thank you so much for the quick reply!
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Latest version - v1.05 (released 2019/06/17)
  • Load game works even if it has not been saved while this plugin has been imported.
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,064
Reaction score
1,326
First Language
Swedish
Primarily Uses
RMVXA
Are you kidding me? I've been looking for a plugin like this for ages. There used to be one a few years ago but it lost support and doesn't work anymore. So glad you made this and hope it'll be supported for a while and not made incompatible because of a new MV update. This is so gold!:kaoluv:

[EDIT; Is this plugin only supporting background sounds and not sound effects? I tried it out on one of my spike traps because the map is rather large and constantly hearing the "ching!", "ching!", "ching!" from the spikes going up and down gets annoying. The sound is a sound effect though (SE) and not a background sound (although, it could be placed in that folder I guess).

Anyway, after trying that out I got a error message so I guess I screwed something up or it's just for BS's?


]
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
Are you kidding me? I've been looking for a plugin like this for ages. There used to be one a few years ago but it lost support and doesn't work anymore. So glad you made this and hope it'll be supported for a while and not made incompatible because of a new MV update. This is so gold!:kaoluv:

[EDIT; Is this plugin only supporting background sounds and not sound effects? I tried it out on one of my spike traps because the map is rather large and constantly hearing the "ching!", "ching!", "ching!" from the spikes going up and down gets annoying. The sound is a sound effect though (SE) and not a background sound (although, it could be placed in that folder I guess).

Anyway, after trying that out I got a error message so I guess I screwed something up or it's just for BS's?


]
Hi @Parallax Panda ,

Just noticed your edit on this post.

I wouldn't use forced SE on this. Especially if it is a parallel type of event.
<aex:d:25:0:false:default_trigger> should do it.
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,064
Reaction score
1,326
First Language
Swedish
Primarily Uses
RMVXA
@OcRam

Thank you for your reply. Let me explain my reasoning for doing so further.

My spike traps are actually not really "traps" in the way they activate and surprise the player. It's more like an obstacle course "trap" where the player has to time their movement not to get hurt. More or less like shown in this video, actually. And in my game, all such spike events on the entire map is controlled by one parallel event that turns a certain switch on or off. Up until now this even has also been the one to play the sound effect but as you can hear that constant "ching!" in the entire dungeon, that's not good. I hoped that I'd be able to put a soundtag on individual spike events so you'd hear them as you got closer to the actual traps, not the parallel event.

I did try to put: <aex:d:25:0:false:default_trigger> in a comment in one of the spike traps but I got the same error msg as shown in my previous post above. Here's another screenshot of my event, just in case I did something funky again but I think this is how it should look, right?

 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
@OcRam

Thank you for your reply. Let me explain my reasoning for doing so further.

My spike traps are actually not really "traps" in the way they activate and surprise the player. It's more like an obstacle course "trap" where the player has to time their movement not to get hurt. More or less like shown in this video, actually. And in my game, all such spike events on the entire map is controlled by one parallel event that turns a certain switch on or off. Up until now this even has also been the one to play the sound effect but as you can hear that constant "ching!" in the entire dungeon, that's not good. I hoped that I'd be able to put a soundtag on individual spike events so you'd hear them as you got closer to the actual traps, not the parallel event.

I did try to put: <aex:d:25:0:false:default_trigger> in a comment in one of the spike traps but I got the same error msg as shown in my previous post above. Here's another screenshot of my event, just in case I did something funky again but I think this is how it should look, right?

Hi,

Sound Effects (SE) is supported in this plugin - just tried and it worked like supposed. Can you put on "debug" mode and send console log (F12) maybe then the real reason (and specific code line) is shown.

Comment notation seems valid, but I noticed is that distance of 25 tiles is way too much for small maps.
 

Parallax Panda

Got into VxAce ~2014 and never stopped...
Veteran
Joined
Oct 29, 2015
Messages
1,064
Reaction score
1,326
First Language
Swedish
Primarily Uses
RMVXA
@OcRam
Sure thing. Is this what you needed?


I've got all other plugins turned off and I'm running the latest version of MV (on STEAM). My event is the same as the one shown in my previous screenshots.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
614
Reaction score
740
First Language
Finnish
Primarily Uses
RMMZ
@OcRam
Sure thing. Is this what you needed?


I've got all other plugins turned off and I'm running the latest version of MV (on STEAM). My event is the same as the one shown in my previous screenshots.
Hi,

That was correct window, but wrong tab :)

Test play >> F12 >> When error occurs >> Take screen shot from "Console" tab
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

It's Saturday already. Last Saturday felt just like yesterday. o_o
I really need to stop adding more levels to this thing already...
My computer is now on the dead list. Parts and Services stopped two days ago for this type.
someone help my thread has been silent since the initial post I just wanna make a goddamn game
People3_6 and People3_7 added!

Forum statistics

Threads
105,838
Messages
1,016,862
Members
137,539
Latest member
Monsterwave18
Top