JavaHut's AudioManager Extension (1st Plugin)

● ARCHIVED · READ-ONLY
Started by JavaHut 20 posts View original ↗


  1. AudioManager Extension v1.02

    By: JavaHut
    Required RMMV Version: 1.3.1+







    Download
    Download the script and impulse files here:
    http://www.mediafire.com/download/21r6stjbbj1v1y9/JavaHut_AudioManagerEx.js
    http://www.mediafire.com/download/mx35dblvhiwae68/impulses.zip


    Demo
    Download the demo here:
    http://www.mediafire.com/download/v3q7vp79w31klp7/AudioManagerExDemo.zip


    Note: Do NOT use the plugin file from the demo in your projects, as it may not be the most up to date version.


    Introduction
    This plugin provides more advanced sound functions to enhance the basic audio manager in RMMV.


    Features
    - Make sounds dynamic to allow volume/pan/filter changes as the player moves away/toward the sound event
    - Choose from multiple sounds to play at random, with the option for varied pitch (For example: choose from step1, step2, or step3 with varied pitch, as the player walks across a surface)
    - Add/Change loop and starting points for background music and background sounds
    - Add reverb to any sound (See Author's Notes below)
    - Fade in, fade to, or pause/resume background music and background sounds
    - Allow for more than one background sound at the same time


    How to Use
     

    Spoiler
    -Download the JavaHut_AudioManagerEx.js file and place it in your project's js/plugins folder. Once installed, Add it to the Plugin Manager, and click the Help... button for more info. If you are unsure about a plugin Parameter, double click the value and read the description.
    -If using reverb, download the impulses.zip file (or supply your own impulses) and extract it to your project's audio folder. If you change the impulse folder name, be sure to adjust the plugin's Impulse Folder parameter.
    -For the demo, download the demo file and extract it to your RMMV Games folder, and open the Game.rpgproject file in RMMV.



    Author's Notes
     

    Spoiler
    -An important feature that is not present in the default AudioManager is a simple limiter on the audio signal to prevent it from peaking, which could cause speaker/ear damage. This plugin implements a limiter to control the output and keep it under the peak threshold.


    -When the plugin is enabled, all sounds are somewhat lower in volume because of a custom panning system on the WebAudio buffers. Please take this into consideration and adjust accordingly.
    -If a sound is set to dynamic, a falloff value of 20 or more is recommended for a more natural sound.
    -If using reverb for a sound, be sure to use it sparingly, as it can cause heavy lag on slower computer systems.



    FAQ
     

    Spoiler
    Plugin Commands
    Q. Why does the plugin command not work?
    A. Be sure to double-check your arguments. For example, if I use pauseBgs 2 thinking it will pause and fade out for 2 seconds, it won't work. This is because there is a required name argument before the fadeTime: pauseBgs myBgs 2.


    Background Music / Sounds


    Q. Why does the bgm or bgs loop, even when I set the plugin Loop Parameters to false?
    A. Because the bgm or bgs file itself may contain loop points in the meta data. You can use a program like Audacity to remove the LOOPSTART and LOOPLENGTH tags.



    Q. Why does the bgm or bgs continue playing after transferring the player to another map?
    A. You have to use the pause plugin commands or fadeout RMMV event commands before transferring the player. If you don't want to manually clean up any unused bgs, set the Clean Bgs On Transfer plugin parameter to true.


    Q. Why can I not resume or change loop points on a bgs after transferring the player to another map?
    A. Check if the Clean Bgs On Transfer plugin parameter is set to true. If so, the system will erase any paused/faded bgs from the buffer list. If you decide to set it to false, be sure to use the eraseBgs plugin command to clean up your unused background sounds.


    Dynamic Sounds
    Q. Why does a dynamic background sound or sound effect erase after transferring the player to another map, even though the Clean Bgs On Transfer plugin parameter is set to false?
    A. Dynamic sounds have to be deleted when the map changes because the events that they are tied to are not active on any other maps, and therefore cannot carry over.



    Changelog
     

    Spoiler
    -Version 1.02: Fixed a bug that prevented paused BGM from using loop and starting points when resumed/played again.
      Added the eraseBgm plugin command to erase saved/paused BGM.


    -Version 1.01: Fixed a bug that caused reverb to be cut off on short sounds.


    -Version 1.00: Plugin completed.



    Known Issues

    Spoiler
    None at this time.



    Latest RMMV Version Tested
    1.3.1


    Bug Reporting
    Please submit any bugs you find in the plugin to this forum post. And, if you have a suggestion for a plugin feature, feel free to post it here. Thank you for your support, and happy gaming!


    Terms of Use & Disclaimer

    Spoiler
    -This plugin may be used for commercial or non-commercial use, as long as the script file remains unaltered. Credit to JavaHut is optional.
    -JavaHut cannot be held responsible for any damages that may occur from using this plugin in your project. You agree to use this plugin with the acknowledgment that bugs may be present and cause issues within the project that contains it. Thank you for your understanding.
    -Royalty-free impulse file info:
    "huge" and "plate" impulses are from:
    http://www.airwindows.com/airwindows-impulses/
    All other impulses are from:
    http://www.voxengo.com/impulses/
  2. Thank you for this  :rhappy:
  3. Excellent work! I wish I could get my code to look so nice.
  4. Oh WOW!!! Can't wait to test this at home!!! Thank you very much!!!
  5. Thanks to all for the feedback so far. I look forward to hearing your experience with the plugin and if there are any ways to improve upon it.


    Please let me know if you find any bugs or things that you don't like about it. Thanks!
  6. Your demo is awesome, i really want to use your plugin, but this is happened :(

    Spoiler
    Unbenannt4.PNG
  7. styx92 said:
    Your demo is awesome, i really want to use your plugin, but this is happened :(



    Thanks for your feedback. The error you have is because you are probably using an earlier version of RMMV. The 1.3.1 is what you should be using in order to use the AudioManager Extension plugin. I don't recommend using the plugin in an earlier version of RMMV. I apologize, but I do not intend on supporting older versions. Let me know if you have any more issues. Thanks.
  8. JavaHut said:
    Thanks for your feedback. The error you have is because you are probably using an earlier version of RMMV. The 1.3.1 is what you should be using in order to use the AudioManager Extension plugin. I don't recommend using the plugin in an earlier version of RMMV. I apologize, but I do not intend on supporting older versions. Let me know if you have any more issues. Thanks.

    Yes you have right, i had only 1.3.0.


    But thanks for you quick help :)
  9. Can i use the same dynamic sound file for two events in the map? Exemple: In a sewer i put a kind of river sound where the water pass, but pretty far away, there is another water passage where i put the same event (copy/paste) but no sound when i get near that one. Those both events use a comment with the play bgs command. Both of them a set to parallel.


    Thanky you for the help! This script is awesome. It give so much more to my game, like getting near a waterfall and being muted by the sound! :)
  10. I noticed that the BGM don't loop anymore even if the option is set to true. It happen since i put BGM fade time to 0.


    UPDATE:


    I also found that BGS that are played in a common event won't loop. Even if i use the loop comment before.


    It feels like there is a problem with the looping option for bgm and bgs. + the auto clear bgs don't seem to work. If you want a demo of my game, don't hesitate to ask.


    UPDATE 2 :


    I also found that battle BGMs don't loop anymore. At this point, this wonderfull plugin is for majority of cases, not usable :(  Hope you'll pass by and find some fixes.
  11. solaris1111 said:
    I noticed that the BGM don't loop anymore even if the option is set to true. It happen since i put BGM fade time to 0.


    UPDATE:


    I also found that BGS that are played in a common event won't loop. Even if i use the loop comment before.


    It feels like there is a problem with the looping option for bgm and bgs. + the auto clear bgs don't seem to work. If you want a demo of my game, don't hesitate to ask.


    UPDATE 2 :


    I also found that battle BGMs don't loop anymore. At this point, this wonderfull plugin is for majority of cases, not usable :(  Hope you'll pass by and find some fixes.



    This is also happening on my project ;_;
  12. This might make a better replacement for the 3D audio plugin I currently have- which seems to have been abandoned with it's glitches.


    Does this plugin allow me to manage when a sound is on and off with ease? And does audio play 100% without random cutouts to complete silence?


    Sorry if i'm asking too many questions, I'm just trying to be careful with what I use :)
  13. So it seems that this plugin have some issues. Maybe it is a core MV update that made that happen? Anyway, I will follow this thread, because this plugin seems to be fantastic and it would be a shame not to be fixed. :)
  14. Is this plugin still being supported? I can't seem to figure out why the battle bgm won't loop anymore when this plugin is ON.
  15. I'm having the same problem... BGM isn't looping even when it's set to true. Any plugin/script masters hanging around who want to take a look?
  16. It makes victory music not loop any more.
  17. Bump for an amazing, now unusable plugin that probably just needs a little tweak. >< Anyone smart enough to figure out what MV core change must've broken the BGM looping?

    Edit: Maybe someone like @Galv could take a look at it? Javahut seems to be MIA.
  18. FIX TO "BGM not looping problem", if you don't need extended stuff in JavaHut's plugin for BGM:

    Let's make our own plugin (to honor JavaHut's ToS) then override "AudioManager.playBgm" with RPG Maker MV default function (in version 1.5.0). Make sure that JavaHut's plugin is ordered BEFORE our fix plugin.

    Make file in ./js/plugins/JavaHut_AudioManagerEx_FIX.js
    Then edit file with notepad and insert code below >> Save

    Code ...
    /*:
    * @plugindesc V1.00 Fix to JavaHut_AudioManagerEx.js
    * @author OcRam (free to use commercial/personal - free to edit)
    *
    * @Help Place this plugin AFTER JavaHut_AudioManagerEx.js
    *
    */
    var Imported = Imported || {};
    Imported.OcRam_JHFix = true;
    var OcRam_JHFix = OcRam_JHFix || {};
    (function ($) {
    // Fix to JavaHut's AudioManagerEx plugin
    AudioManager.playBgm = function (bgm, pos) {
    if (this.isCurrentBgm(bgm)) {
    this.updateBgmParameters(bgm);
    } else {
    this.stopBgm();
    if (bgm.name) {
    if (Decrypter.hasEncryptedAudio && this.shouldUseHtml5Audio()) {
    this.playEncryptedBgm(bgm, pos);
    }
    else {
    this._bgmBuffer = this.createBuffer('bgm', bgm.name);
    this.updateBgmParameters(bgm);
    if (!this._meBuffer) {
    this._bgmBuffer.play(true, pos || 0);
    }
    }
    }
    }
    this.updateCurrentBgm(bgm, pos);
    };
    })(OcRam_JHFix);

    My RPG Project (surely, but very very slowly) https://www.facebook.com/mightofdarkness/
  19. I have five torches in a room, all have this as a comment

    <dynamic>

    <falloff:10>

    <fadeTime:5>

    <autopan:true>

    Only one of the five torches actually plays the sound, the others don't.

    Help please!
  20. Since this plugin seems to be abandoned, are there any alternatives to this plugin? I like the features, but the issues are making it unusable. I am getting the loop issue, sometimes the BGS takes too long to start playing, the BGS doesn't clear when changing maps even with auto clear bgs enabled, and when changing maps, new BGS/BGM set on the map settings won't play.
    MBS Sound Emittance works great and it's super simple to set up, but I don't like how there's no limit to how much panning a sound can get (it can sound in just the left speaker while the right one is muted), and sadly it seems to be abandoned too.