Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
257
Reaction score
353
First Language
German
Primarily Uses
RMMV
Almost same as I thought to do, here is what I've done so far...
Code:
    AudioManager.playDynamicSe = function (event_id, se_name, distance, radius, auto_pan) {
        this.playSe(
            { name: se_name, volume: 100, pitch: 100, pan: 0 },
            {
                "type": "d",
                "distance": distance || 20,
                "radius": radius || 1,
                "fade": 0,
                "pan": auto_pan || true,
                "forced": true,
                "new": true,
                "started": false,
                "dynamic": true,
                "commandIndex": 0,
                "eventId": event_id || 0,
                "linkedEvents": event_id ? [event_id] : []
            }
        );
    };

Event id is required because otherwise this plugin don't know which event is emitting the SE.

EDIT: I have now released new version v2.06
I've tested the new command a bit, and come upon a few problems.
I created an event of a soldier that runs into a wall, then returns to his position only to run into the wall again.
issue.png
The first problem is that the volume of the sound is unaffected by the distance. No matter how near or far you are, the volume remains the same.
-> Distance & radius does not affect volume

The second problem is that if you move while the sound effect plays, it gets aborted.
This does not occur with normal SEs.
-> moving interrupts the sound effect
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
770
Reaction score
893
First Language
Finnish
Primarily Uses
RMMZ
I've tested the new command a bit, and come upon a few problems.
I created an event of a soldier that runs into a wall, then returns to his position only to run into the wall again.
View attachment 148296
The first problem is that the volume of the sound is unaffected by the distance. No matter how near or far you are, the volume remains the same.
-> Distance & radius does not affect volume

The second problem is that if you move while the sound effect plays, it gets aborted.
This does not occur with normal SEs.
-> moving interrupts the sound effect
Hi,

Just tested this and it worked for me... Has plugin name remained as OcRam_Audio_EX.js?

And is event id 1 confirmed as "this" event? To get id of "this" event use: this.event().id
Example: AudioManager.playDynamicSe(this.event().id, "Blow5", 3, 2, true);

And to get more natural sound I wouldn't recommend distance below 10 (but it's only my opinion ;) ).
 

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
257
Reaction score
353
First Language
German
Primarily Uses
RMMV
Hi,

Just tested this and it worked for me... Has plugin name remained as OcRam_Audio_EX.js?

And is event id 1 confirmed as "this" event? To get id of "this" event use: this.event().id
Example: AudioManager.playDynamicSe(this.event().id, "Blow5", 3, 2, true);

And to get more natural sound I wouldn't recommend distance below 10 (but it's only my opinion ;) ).
Yeah, I went through my plugins just now and deactivated & activated stuff and it turns out that Irina's Anti Audio Delay plugin is at fault here.
So for the record, if anyone wants to use the dynamic sound effects - don't use the Anti Audio Delay plugin. They don't function together. xD
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
770
Reaction score
893
First Language
Finnish
Primarily Uses
RMMZ
Yeah, I went through my plugins just now and deactivated & activated stuff and it turns out that Irina's Anti Audio Delay plugin is at fault here.
So for the record, if anyone wants to use the dynamic sound effects - don't use the Anti Audio Delay plugin. They don't function together. xD
Have you tried different plugin order?
 

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
257
Reaction score
353
First Language
German
Primarily Uses
RMMV
Have you tried different plugin order?
Doesn't work, the anti delay has functions that get in the way. For instance it seems that it buffers sound effects by directly assigning them to an event, which is why the volume & sound doesn't change. It can't change much because it gets locked in.
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
240
Reaction score
73
First Language
Chinese
Primarily Uses
RMMV
If you manually adjust the volume in the options, or use any plug-in that will automatically adjust the default volume.
After each battle, battle BGM and map BGM (maybe refreshing the scene will also affect?) will automatically reduce the volume until there is no sound at all. SE and ME are not affected, even your original demo project has this problem
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
770
Reaction score
893
First Language
Finnish
Primarily Uses
RMMZ
If you manually adjust the volume in the options, or use any plug-in that will automatically adjust the default volume.
After each battle, battle BGM and map BGM (maybe refreshing the scene will also affect?) will automatically reduce the volume until there is no sound at all. SE and ME are not affected, even your original demo project has this problem
Thank you for the message,

Confirmed. I will fix this ASAP.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
770
Reaction score
893
First Language
Finnish
Primarily Uses
RMMZ
If you manually adjust the volume in the options, or use any plug-in that will automatically adjust the default volume.
After each battle, battle BGM and map BGM (maybe refreshing the scene will also affect?) will automatically reduce the volume until there is no sound at all. SE and ME are not affected, even your original demo project has this problem
Ok this bug is now eliminated!

It's fixed in OcRam_Audio_EX v2.07
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
240
Reaction score
73
First Language
Chinese
Primarily Uses
RMMV
Thank you for your excellent work! :kaojoy:
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
85
First Language
French
Primarily Uses
RMMV
Hello! I need help with understanding how this plugin works. I can't figure how to smooth the volume up/down.

What I'm trying to achieve:
- Add an additional background sound layer, so I can play both the environment sounds (like a town market with chatter) and also the weather (like the rain).
- Be able to transition (fade in and fade out) the weather sounds so it doesn't start or stop abruptly
- Play weather sounds in battle

My current weather system is very simple: I have a Parallel Common Event that changes the weather every 10 minutes in game. When the weather changes, it calls a Weather Common Event that looks like this:

1604926243980.png


I've also tried a different approach, which is probably the wrong way to do it as it didn't work:

- Start the rain sound right when the game start, with a volume of 0. Then when the weather change, use the plugin command "fade mh_rain_1 to 20 in 3"... End result: never heard the rain start.


Questions:
1- Would anyone be so kind to share some light on the proper way to start an extra layer of BGS?

2- Are BGS2 and BGS3 the only background sound layers that will play in battle, or will the BGS default also play?
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
770
Reaction score
893
First Language
Finnish
Primarily Uses
RMMZ
Thank you for the message,

I use following method to fade in/out bgs:
support.png

Oh and BGS2 and 3 channels plays in map and battle :)
 

Guardinthena

Artist
Veteran
Joined
Nov 30, 2013
Messages
472
Reaction score
1,188
First Language
English
Primarily Uses
RMMV
I just picked this plugin up today and I am loving it. Works flawlessly for what I need it for! But, I am unclear about a few things and I hope someone can help me with this.

First, I am attempting to use this plugin so that it plays a SE of a door closing. This SE is suppose to go off at a certain time of the day that begins the Day Shift, where all the NPCs come out of their homes and move to their jobs. Now, obviously I don't want to hear every door opening in the village. Only those I'm nearby.

So, my questions: How do I set this event up where the radius is limited to a small area? And two, how do I make this SE play only once? The event that I have set up currently, it sounds like it is playing multiple times before the event page switches over to the next where the sound is cleared.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
770
Reaction score
893
First Language
Finnish
Primarily Uses
RMMZ
Thank you for the message,


This should do the trick:
Code:
* Comment * <aex:d:15+0:0:pan:false>
* Play SE * MY_SE (90, 100, 0)

Explanation for event comment:
<aex:
= notation start for OcRam_Audio_EX
d: = Type is dynamic (volume and pan based on position)
15+0: = Distance is 15 tiles and radius of 100% volume is 0
0: = No fade here
pan: = Auto pans SE based on player X relative to this event
false> = Do not force play this SE on scene start
 

Guardinthena

Artist
Veteran
Joined
Nov 30, 2013
Messages
472
Reaction score
1,188
First Language
English
Primarily Uses
RMMV
Thank you so much for the quick reply, OcRam! That did just the trick. And thank you for the further explanation.
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
85
First Language
French
Primarily Uses
RMMV
Hi @OcRam

This plugin allows to play multiple sounds at once. Is there a way to disable this during battle (or on animation fx)?

The problem that I have is that the sounds are stacking, making it very loud when they're playing all at once. For instance: a debuff spell applied on a group of 8 enemies - that one sound will stack 8 times and play all at once, resulting in a cacophony. Wondering if I can tweak the code to disable this? Ideally in battle but I wouldn't mind too much if it had to be disable across the board.
 

OcRam

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

This plugin allows to play multiple sounds at once. Is there a way to disable this during battle (or on animation fx)?

The problem that I have is that the sounds are stacking, making it very loud when they're playing all at once. For instance: a debuff spell applied on a group of 8 enemies - that one sound will stack 8 times and play all at once, resulting in a cacophony. Wondering if I can tweak the code to disable this? Ideally in battle but I wouldn't mind too much if it had to be disable across the board.
Thank you for the message,

Have you tried to set "Default create new (BGS)" to "false"?

And what it comes to sound effects - core engine allows multiple SE without this plugin also.
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
85
First Language
French
Primarily Uses
RMMV
Thank you for the message,

Have you tried to set "Default create new (BGS)" to "false"?

And what it comes to sound effects - core engine allows multiple SE without this plugin also.

Thanks for answering!

Yes, tried BGS true and false, didn't fix my problem.

I'll see if I can tweak the RPGM code, so the sounds don't stack.
 

gRaViJa

Eniko Ghosts of Grace Dev
Veteran
Joined
Mar 16, 2012
Messages
983
Reaction score
633
First Language
Dutch
Primarily Uses
RMMV
Is there a possibility to fade out the bgm while being within range of a sound emitter that emits a bgs and fade it in again when outside the range of the emitter? I found the plugin command "BGM: fade *bgm* to 0 in 4 sec" but I can't seem to get it to work! *bgm* should be replaced with the name of the BGM file?
 
Last edited:

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
85
First Language
French
Primarily Uses
RMMV
Is there a possibility to fade out the bgm while being within range of a sound emitter that emits a bgs? I found the plugin command "BGM: fade *bgm* to 0 in 4 sec" but I can't seem to get it to work! *bgm* should be replaced with the name of the BGM file?


To fade out the BGM, I use the RPG Maker command: Fadeout BGM.

1612979082544.png
 

gRaViJa

Eniko Ghosts of Grace Dev
Veteran
Joined
Mar 16, 2012
Messages
983
Reaction score
633
First Language
Dutch
Primarily Uses
RMMV
@Moon_Haven I slightly edited my post, it should dynamically fade out when in range of an emitter and fade in again when outside the range. I don't think that's possible with the standard command?
 

Latest Threads

Latest Profile Posts

I just don't know why, but it's funny.
5.gif
Ugh. The one time I forget to save every hour or so is also the day my computer crashes. That's life!
Even though I spent 100's of dollars on my game already. I think I might just have to give it away for free. Since I haven't heard back from people if I could use some of their graphics. Even from a global mod here. Maybe I can make a donation thing.
you know, some days you get resentful that game dev is even considered a "fun job" and other days it's like, welp, time to roll up my sleeves and code these molotov cocktails
If you suck at playing trumpets, that is probably why.

Forum statistics

Threads
115,964
Messages
1,094,434
Members
151,234
Latest member
sousou123232
Top