Hello everyone
I need a help as I can normalize a sound, cascade example, search but not found anything, or if there is a script or something like that if you could help me.
Thank you very much
ambient sound panning
● ARCHIVED · READ-ONLY
-
-
sound effects are mono, they don't pan.
-
@gstv87
but some way to make an effect of proximity and move away, as when you approach a waterfall and then you move away it decreases its sound -
It is possible to pan the sound. There's a parameter named "Pan". Open the sound test and you'll see it under volume and pitch. Now, making the value change dynamically is another story. Unless there's a plugin for that (which wouldn't be too hard to do honestly), I'm not sure how you would do it.
-
@MushroomCake28
You know better, is there a script but volume, that goes up little by little?
what I did was to create an event that is raising the volume, and it worked, but you notice the rise in volume cut -
I searched Google, and found a tutorial and some plugins.
Tutorial:
https://steamcommunity.com/sharedfiles/filedetails/?id=159929723
The tutorial is for VXAce but the concept is the same.
Plugins:
https://forums.rpgmakerweb.com/index.php?threads/javahuts-audiomanager-extension-1st-plugin.67619/
https://forums.rpgmakerweb.com/index.php?threads/mbs-sound-emittance.52718/ -
Okay, for the volume control, I made a little script for you. So here's what you need to do:
1) Create a parallel process event.
2) Insert a wait command. Put the number of frames you want between every time you want the SE to play (in my testing I put 30 for twice per second)
3) Insert a script command and copy/paste my code:
Code:var maxVolume = 100; var origin_x = 25; var origin_y = 8; var maxDistance = 10; var se = {"name": "Bell1", "pitch": 100}; var falloff = maxVolume / maxDistance; var pow_x = (origin_x - $gamePlayer.x) * (origin_x - $gamePlayer.x); var pow_y = (origin_y - $gamePlayer.y) * (origin_y - $gamePlayer.y); var realDistance = Math.sqrt(pow_x + pow_y); se.volume = Math.round( Math.max( maxVolume - falloff * realDistance, 0 ) ); AudioManager.playSe(se);
4) Now change the 5 first variables to your liking:
a) maxVolume = the max volume you will hear. This will only be heard if the player is directly in the area in which the sound is emitted.
b) origin_x = the x position of the origin of the sound.
c) origin_y = the y position of the origin of the sound.
d) maxDistance = the distance the player needs to move away from the origin of the sound to not hear it anymore. Note that I calculate this
based using Pythagoras (moving 3 cases x away and 4 cases y away will equal 5 cases away from the source).
5) Set the name of your SE and the pitch of your SE inside the "" in the brackets. I've put "Bell1" for testing and 100. Change it as you like. -
thank you very much @MushroomCake28
I found this plugin but sorry it is outdated and with errors, I will try yours, and if I do not have problems I will leave it in my project, in the same way I will give you credit, because this is a great help.
-------------------
Thank you as well @Aloe Guvner
I was searching and found this, the truth is for MV 1.6.1 without problems, but when installing it you have to set the switches to FALSE since they generate error and sound ambio.
https://forums.rpgmakerweb.com/index.php?threads/mbs-sound-emittance.52718/
the example you gave me was doing it for mine, although I had not seen the example of your link, but it sounded half weird hahaha
https://i.gyazo.com/8accbe1cccd1eab8cebade97514905e8.png
---------------
@MushroomCake28
Query to use the Waterfall1 (bgs) just change the SE data?
I will modify the script to use BGS if it does not work the same, I will be attentive to your answer -
Code:
var maxVolume = 100; var origin_x = 25; var origin_y = 8; var maxDistance = 10; var bgs = {"name": "Bell1", "pitch": 100}; var falloff = maxVolume / maxDistance; var pow_x = (origin_x - $gamePlayer.x) * (origin_x - $gamePlayer.x); var pow_y = (origin_y - $gamePlayer.y) * (origin_y - $gamePlayer.y); var realDistance = Math.sqrt(pow_x + pow_y); bgs.volume = Math.round( Math.max( maxVolume - falloff * realDistance, 0 ) ); AudioManager.playBgs(bgs);
This is the equivalent for Bgs. Haven't test it (I did test SE tho), but it should work. -
modify so what the had, what I'm wrong in the AudioManager.playBgs, which I put in lowercase hahaha but feels cut, that is, if you can add to the volume configuration that scales 0-60 but 1, 2,3,4,5 ......
-
Sorry, I don't quite understand what you said.
Does it work?
If you want smoother transition between volume, reduce the wait time. -
Hahaha I'm sorry I use Google Translate because I speak Spanish.
If it works perfect!
*The sound transition between 0-100 is a little abrupt, that's what I meant.
**About the above, I leave a credit?
**I withdraw the waiting time and the sound flows, thanks -
Yeah you can credit me if you like.
If the difference between 100 and 0 is too big, you can reduce the max volume. 80-0 would be less abrupt for example. -
-
So you copy/paste the event to another map and there's no sound?
Could be a couple of things:
1) Did you change the coordinate in the script?
2) Check if you've checked the autoplay Bgs in the Map Info. -
@MushroomCake28
hahaha, do not take me in, I forgot to change the position of the sound hahaha
I'll have to get used to changing the place of sound position.
*I found an error, when I leave the map it does not stop, how can I solve that.
I already solved it with this script, now I stop the BGS and through Switch it activates and deactivates the sound.
Code:AudioManager.stopBgs({name: 'Waterfall1'}); -
[closed]IgnoreMe[/closed]