OcRam - Audio_EX plugin [v2.02 updated 2020/01/05]

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
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

Latest version - v2.02 (released 2020/01/05)
  • Fixed SE volume and menu/map transfer bug
    (Thanks to Ace of Spades for bug reports)
Previous updates...
  • Fixed SE pitch bug and aliased update BGS (compatibility)

  • Fixed forced playback on SE command
  • Re-factored code structure + OcRam_Core featured:
    OcRam_Core will be embedded in each of my plugins
    New (more efficient) AEX data object structure
  • Debugging consumes CPU time ONLY when it is activated!
    Activated == Plugin parameter "Debug mode" == true
  • Obsoleted parameter "loop" (replaced by "new"/"link")
    Use SE to play NON-LOOPING SFX (parallel to loop)
    Use BGS to play LOOPING SFX (stop to not loop)
  • <aex> notation parameters has been made easier to read
    Example: <aex:d:20+5:1:2:nopan:forced:link>
    Example2: <aex:y:18+2:0: pan:default:new>
  • IF Local_Coop is in use: Target nearest player!
    Import Local_Coop before Audio_EX! (Credits: Martin)
  • BGS2&3 volume control (Credits: Ace of Spades)
    true Will be shown in options menu
    false Linked to main BGS volume
    Also BGS2 and 3 option caption parameters added!
  • Fixed BGM bug if BGM volume was adjusted + BGM volume
    is now correctly set on new/load game (Ace of Spades)
  • Fade to 100% won't exceed configured max volume
  • Allows multiple AEX notations on same event page!
  • New <aex> notation parameters (Credits: Anyone):
    • radius (radius where BGS volume is 100%)
    • new/link (link will use existing buffer if found)
      (new > will always creates new buffer)
    • nopan/pan (use pan or not to use?)
  • Fixed some Audio bugs on loading saved game
Donation pricing model is no longer allowed on these forums (because it's not legal in some countries). That is the only reason I have to change my pricing model to paid-commercial-use. I really would have liked it to keep it old way, but law is law.

If you have downloaded this plugin before this change to Terms of Use, you are free to follow those terms. And if you download current version please follow latest Terms of Use.


Terms of Use
Non-commercial: Free to use with credits to 'OcRam' for using this plugin.
Commercial use: See details below
License must be obtained BEFORE you start to DISTRIBUTE your game. Even if you obtain commercial license; copyrights still remain as they are. NOTE: If you gain money with your game by any means (crypto-mining, ads, purchase incomes, micro-transactions etc...) it is considered commercial use of this plugin!

License types (licenses are per project):
  • Standard: 4.99 EUR - Paid in full (credits to ”OcRam” is required for using this plugin)
  • No credits: 39.99 EUR - Paid in full (credits not required)
To obtain license:
Mention which plugin license you want to purchase and your project name.
PayPal link: https://paypal.me/MarkoPaakkunainen

To obtain several licenses with discount: Each license purchased will reduce next plugin price by 2€ until minimum price of 2€ per license. Discounts can be used on any OcRam -plugin.

After payment: I will send you verification e-mail that you may use this plugin commercially in project: [Your_project_name_here] with [license_type].
 

Attachments

Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
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
537
Reaction score
530
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
367
Reaction score
476
First Language
Finnish
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.
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
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
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
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
HOTFIX v1.031 >> replayBgm works again ...sorry for any trouble it may have caused!
 

Gregaur

Veteran
Veteran
Joined
Jan 3, 2017
Messages
97
Reaction score
12
First Language
french
Primarily Uses
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
367
Reaction score
476
First Language
Finnish
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
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
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
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
367
Reaction score
476
First Language
Finnish
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.

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
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
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
779
Reaction score
1,060
First Language
Swedish
Primarily Uses
RMMV
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
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
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
779
Reaction score
1,060
First Language
Swedish
Primarily Uses
RMMV
@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
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
@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
779
Reaction score
1,060
First Language
Swedish
Primarily Uses
RMMV
@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
367
Reaction score
476
First Language
Finnish
Primarily Uses
RMMV
@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: 1)

Latest Threads

Latest Posts

Latest Profile Posts

i'm not only drawing girls tbh
i like grubby old man
Kes wrote on Chef's profile.
I have deleted your profile post as our Rules are quite clear that you may not use them to advertise non-RM products, nor may you give a link to anything that solicits payment for you.
140 Thousand words, take one down, toss it around, discover I hate the direction I went and decide to start a complete rewrite.
I like being a butt to people.
Dirtnap wrote on Tyler Warren's profile.
Hi Tyler,

My name is Sean, I am the owner of an indie studio, and I am looking to get some paid art work done. I am working with MV, but our programmer will be heavily modifying it.

If you are interested, or would like to hear more, I can provide my personal e-mail address.

S.G.

Forum statistics

Threads
93,602
Messages
913,859
Members
123,154
Latest member
MagicMan
Top