Quasi Audio


Quasi Audio
​
For a newer version, go here:
https://forums.rpgmakerweb.com/index.php?threads/qplugins-latest-qm-regioncolliders.73023/

About

This plugin lets you play audio at a certain location. The audios volume and pan will be determined based off the players distance from the audio location. Audio can also be binded to an event.


Plugin Commands

Play a Q Audio at X Y:


qaudio play ID TYPE AUDIO MAXVOLUME RADIUS X Y


To loop audio at X Y


qaudio loop ID TYPE AUDIO MAXVOLUME RADIUS X Y




Play a Q Audio at event location ( follows event )


qaudio play ID TYPE AUDIO MAXVOLUME RADIUS EVENTID


To loop audio at event location


qaudio loop ID TYPE AUDIO MAXVOLUME RADIUS EVENTID




ID - A Unique ID for the audio, can be a number or letter. Used for stopping the audio. if * is used for ID a unique ID will be found, down side to using * is you won't know the ID so you will not be able to stop it. Though you can get the ID with some script calls after you play the qaudio.
TYPE - bgm, bgs, me, or se
AUDIO - The filename of the audio to play
MAXVOLUME - The max volume of the audio when play is directly on the audio location. From 0 - 100
RADIUS - The tile distance the audio can be heard
X - The grid X Location for the audio
Y - The grid Y Location for the audio
EVENTID - The event ID to bind the audio to

Stop a Q Audio


qaudio stop ID


ID - The unique ID you set when playing the Q Audio.


Links


https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiAudio.js
Update 1.01


https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiAudio.js

  • Change the previous "qaudio play --" plugin command to play only once. Can be used to create a footstep effect
  • Added the "qaudio loop --" plugin command, will keep playing the audio until you stop it
  • Added a * ID. It will be replaced with a unique id
  • Fixed a bug with stopping a Q Audio causing it to crash
Now this is gonna be useful! 😀
Great! I was waiting for something like this that actually worked! 


I did find a bug though.


Filenames with spaces don't seem to work.


Also this isn't a bug, but a minor annoyance. Does it have to be in an autorun in order for it to start automatically? I noticed in autorun, it has a delay when the map is loaded if you are standing right next to a source.
I aways wanted to use something like this for a horror game <3
@Yin Yeah you'll need to run from an event. There may be a plugin that can "fix" autorun events to run instantly. I remember there was one for VXA.


And yeah, this plugin will be useful for like horror / stealth type games. Can give the game a better atmosphere.
That one is great. An option to disable 3D sound could be handy though. I mean with no distribution to the left or right speaker.
I have a weird issue where the audio that I set in the plugin command only plays when I'm on the in-game menu. Even the event radius works perfectly.


During the game(play) itself, I can't hear the audio playing. So basically it needs the in-game menu overlay to play the audio, which is strange.


Any idea what could be causing this? I can't figure it out myself.


EDIT: Found the issue. The event needs to be set to Autorun (and not Parallel).
@Logan C. You can manually edit that out, you just need to comment out / delete the line that looks like:
 


buffer.pan = pan;


in 1.02 that is on line 204


Small update: 1.02


https://github.com/quasixi/Quasi-MV-Master-Demo/blob/master/js/plugins/QuasiAudio.js

  • Fixed QAudios not stopping when map changed
  • Fixed issue with * not working correct
  • Fixed issue where adding multiple audios at once would only play the last one
Oops, please ignore.
I've been looking for something like this for ages! Amazing script, it worked flawlessly, thank you very much!  😀


Just a question tho... 


I was testing out the sounds and I realized that choosing a type different from a BGM in the settings of a qaudio, doesn't actually change the fact that it uses it as a BGM.


In other less confusing words:


I have a fireplace event, which uses the default Fire2 BGS sound. However, even if it is a BGS, if I lower the BGM volume in the options menu, the qaudio (which is a BGS) also has its volume lowered. So, as far as I understand it, the plugin creates new BGM files as qaudio, disregarding wich "type" of audio (the folder where it came from) it is, am I right? Is this intentional or a bug? I mean, it's not that much of a problem, but it surely would be awkward if the player noticed it. lol


Anyway, great work with the plugin!  😉
@JohnnyR First sorry for the late reply. You're right, I noticed that as well when I last worked on it, but never got around to fixing it since it was around the time I was quitting MV. But this is one of the plugins I will continue supporting. So I'll most likely have an update for this before the end of the month.
Hey hows it going Quxios? Awesome plugin you have here, did you ever get around to fixing the issue the previous comment was about? Would be great to know! Thanks ^_^
@DMIgames If you mean the volume then I did. The new one can be found here:
Awesome! Thanks for the reply, i downloaded Qaudio and Qplus, popped em in, adjusted the plugin command and BOOM! It works ^_^


Tested the audio changes from options menu, fix is definitely applied. Nice work ^_^
How do i specify what sound file I want to use and have loop? I must be blind because everyone else manages to know how :s
@Skurge use the newer one found here:
https://quxios.github.io/#/plugins/QAudio
IMO, it should be easier to use / understand how to use.
Hm having slight issues here, I've tried using qAudio start Sea bgs max80 radius10 x5 y5 on an parrelel process running event and the audio is not at all being heard. also Qplus seems to want the project to ignore the menu screen? I'm not sure if that's intentional.
@Quxios Could you get a new feature that allows the events via command tags get this audio works?
Like Command: Bgm volume 100 pitch 50 tiles 5 or so?
This would be easier to copy and paste 😀 Oh so sorry, im lazy, i know xD
@styx92 Grab the newer version here:
https://forums.rpgmakerweb.com/index.php?threads/qplugins-latest-qm-regioncolliders.73023/

My new plugins have easier / more readable plugin commands.
Ex:
Code:
qAudio start City bgs idCITY radius5 bindToE1 loop

Original thread: https://forums.rpgmakerweb.com/threads/quasi-audio.65826/