OcRam - Audio_EX plugin [v1.06 updated 2019/09/06]

Discussion in 'JS Plugin Releases (RMMV)' started by OcRam, Apr 22, 2019.

  1. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    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:fade: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}
    • fade || Seconds || {number}
    • loop || Text || {true, false}
    • forced || Text || {default_trigger, forced}

    Following examples are written with default plugin parameters:

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

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

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

    *Comment* <aex:bg:0:3> (is same as: <aex:bg:0:3:true: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")
    • NOTE 3: "default_trigger" parameter will execute BGS/SE ONLY, when event is triggered as intended.
    • NOTE 4: 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 aex data on event)
    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 - v1.06 (released 2019/09/06)
    • Fixed forced playback on SE command
    Previous updates...
    • Load game works even if it has not been saved while this plugin has been imported.
    • saveBGM won't fail anymore if BGM is 'nothing'!
    • Fixed SEVERAL bugs related to forced 'AEX' BGS on game load
    • replayBgm works again ...sorry for any trouble it may have caused!
    • 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!
    • Now compatible with YEP_FootstepSounds
    • 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
    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].
     

    Attached Files:

    Last edited: Sep 7, 2019
    #1
  2. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    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
     
    #2
  3. Nicke

    Nicke Fortune seeker Veteran

    Messages:
    533
    Likes Received:
    511
    Location:
    Sweden
    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.
     
    #3
  4. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    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: Apr 29, 2019
    #4
    Nicke likes this.
  5. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    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!
     
    #5
    bazrat likes this.
  6. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    HOTFIX v1.031 >> replayBgm works again ...sorry for any trouble it may have caused!
     
    #6
  7. Gregaur

    Gregaur Veteran Veteran

    Messages:
    88
    Likes Received:
    11
    First Language:
    french
    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
     
    #7
    OcRam likes this.
  8. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    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.
     
    #8
  9. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    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
     
    #9
    AestheticGamer and Gregaur like this.
  10. Vardet

    Vardet Warper Member

    Messages:
    2
    Likes Received:
    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
     
    #10
  11. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    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).
     
    #11
    Vardet likes this.
  12. Vardet

    Vardet Warper Member

    Messages:
    2
    Likes Received:
    1
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Oh, understood!

    Thank you so much for the quick reply!
     
    #12
    OcRam likes this.
  13. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    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.
     
    #13
    Leon_Artmann likes this.
  14. TenTranVN

    TenTranVN Veteran Veteran

    Messages:
    132
    Likes Received:
    16
    First Language:
    Vietnam
    Primarily Uses:
    RMMV
    nice plugin
     
    #14
    OcRam likes this.
  15. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    687
    Likes Received:
    1,031
    Location:
    Fukuoka, Japan
    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?


    [​IMG]
    ]
     
    Last edited: Aug 31, 2019
    #15
    OcRam likes this.
  16. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    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.
     
    #16
  17. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    687
    Likes Received:
    1,031
    Location:
    Fukuoka, Japan
    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?

    [​IMG]
     
    #17
  18. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    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.
     
    #18
  19. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    687
    Likes Received:
    1,031
    Location:
    Fukuoka, Japan
    First Language:
    Swedish
    Primarily Uses:
    RMMV
    @OcRam
    Sure thing. Is this what you needed?

    [​IMG]

    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.
     
    #19
  20. OcRam

    OcRam Servant of the Universe Veteran

    Messages:
    318
    Likes Received:
    419
    Location:
    Void
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Hi,

    That was correct window, but wrong tab :)

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

Share This Page