Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Master Audio - AAA Sound Solution. #1 audio plugin on Asset Store!

Discussion in 'Assets and Asset Store' started by dark_tonic, Jan 28, 2013.

  1. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    V2.7 is now live on the Asset Store. Start integrating with Playmaker!
     
  2. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    509
    Great support! Thank you very much.
     
  3. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Awesome!

    Been meaning to ask this, but I'm getting two types of errors that don't appear to affect anything when I play, yet they consistently pop up.


    and


    Thoughts?
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Steve B, I was getting those errors as well and fixed them (at least for me) in a bug fix that's included in the newest version. Let me know if you're still getting those after updating. If so, which version of Unity are you on?

    I was getting that error when using EventSounds' "disable" event with "attach to caller" and when something would deactivate the entire game object, including the attached sub prefab which had the Audio Source. As I said, I could no longer reproduce the error on Unity 3.5.7 after my bug fix.
     
  5. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    I'm on the latest and greatest of everything (OS, Unity Pro/iOS Pro, every Assetstore asset including Master Audio). This error occured on 2.6 and yea again on 2.7.

    The only thing I'm doing is calling sound events for footsteps:

    Code (csharp):
    1.     void WalkStep_Left()
    2.     {
    3.         //MasterAudio.PlaySound("Dirt_StepA", FeetLocation);
    4.         MasterAudio.PlaySoundVariable("Dirt_StepA", VolumePercentage, FeetLocation, "", AttachToSource);
    5.     }
    Pretty straight forward and the 'Source' object isn't going anywhere other than along for the ride with the character.
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    What version of Unity are you using (sounds like 4.2.1 right?) and how many variations do you have for that sound? Also what is the weight of each variation? I will try to reproduce it on my computer. I suspect it's a Unity 4 problem only. I use 3.5.7 when working on plugins.
     
  7. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Unity 4.2.0f4 (no updates available when I check)

    Four sounds total (the primary footstep sound and three variations).

    Thanks for the quick response Brian!

    -Steve
     
  8. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Hmmm Playmaker gave me the exact same error during a PoolManager State...

    ...but during the Master Audio error I'm not using PoolManager nor am I spawning/despawning anything, hmmmm.

    EDIT: Just to clarify; the error I got during the PoolManager state was due to my using 'Attach to Object' for the called sound right when I was in fact Despawning the object...the error made sense.

    Since I'm not any such thing to the footsteps that error makes a little less sense...
     
    Last edited: Sep 4, 2013
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Please add me on Skype, user name is briandhunsaker. I'll be online shortly and see what we can find.
     
  10. sinoth

    sinoth

    Joined:
    Jan 15, 2013
    Posts:
    30
    aw yiss

    Not sure how I missed earlier references to attaching sounds, but awesome! Solved one of my few qualms with the asset.
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Indeed SteveB, this error only occurs in Unity 4. I will try and find a way to fix it in both versions now. I have an idea that will probably work.

    By the way, I have 4.2.1f4 installed, not sure why you don't see that version unless it was recalled?
     
  12. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Nope its on the download page but Unity itself says I'm up to date...

    Downloading now...
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    SteveB, you could just go ahead and delete the entire innards of the Reparent method inside SoundGroupVariation for now. That is meant to put the variations back into the MasterAudio Hierarchy when the prefab containing the variation (it got attached there) despawns or becomes inactive. When it despawns it works fine, but setting the game object inactive recursively makes Unity 4 complain. I'm fixing it by doing a delayed reparenting, but it's not trivial. Will have a hot fix soon.
     
  14. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Sounds good Brian thank you :D
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Bug fix for the reparenting issue submitted: v2.7.1, should be live soon :)
     
  16. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    131
    Wanna share your remaining qualms? Everything is up for discussion / debate.
     
  17. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    131
    V 2.7.1 with the hotfix is live on the Asset Store. Yay!
     
  18. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Not being able to call MasterAudio methods from a .JS is becoming problematic. I had to move my script into /Standard Assets, but now thats introduced other problems with my code, never mind I already had my scripts nicely organized outside of /Standard.

    I'm sure you're aware if you try to call MasterAudio.Playsound in a JS, you get:


    Any suggestions?
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    I believe you're supposed to move the scripts from MA (and every other plugin you have that's in C#) into Standard Assets, then everything else you wrote you can keep in Assets. This page was where I read this: http://answers.unity3d.com/questions/48874/accessing-javascript-variable-from-c-and-vice-vers.html

    It's pretty normal to have to use the "special folders" when you use more than one language in Unity. I hear it happens less often if you stick to writing C# yourself since most of the popular packages on the Asset Store are written in C#, however I do have a couple JS packages I got there that can give me the same problem.
     
    Last edited: Sep 5, 2013
  20. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Okay see I was reluctant to move anything that wasn't created by me.

    Should I move the entire folder, specific scripts or what? I don't want to break anything further when I can work around this if need be...

    Thanks Brian

    -Steve
     
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    What I usually do is create a "Scripts" folder in Standard Assets and another one in Assets also. Then I drag the Scripts folder for the plugin under the right folder and rename "Scripts" to the name of the plugin. So you could have "Standard Assets/Scripts/Master Audio" with all the MA scripts there. Still organized! But yeah in two places. However hopefully you don't need to mess around in the MA scripts much so it should be ok. The Editor scripts (for Inspectors) I think you want to keep up in Assets, but if that doesn't work, move them too.
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    I'm working on some cool updates to the functionality. So far, I've got the following working:

    1) Inspector option for variations to either browse for clips as before or specify a filename inside a Resource file to load from.
    2) A method to change the clip used by a Sound Group variation, which can also load from a Resource file.
    3) A method to create a new Sound Group on the fly, using a clip in or out of a Resource file.

    And I have an idea on how to make a prefab where you can specify Sound Groups to create through these new methods when the scene starts (or later) so that you don't have to write any code but can be dynamic about things :)

    Sound cool anyone?
     
    Last edited: Sep 5, 2013
  23. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Morning Brian!

    Can I not use 'this.transform' to denote the transform to play the sound from?

    My code:

    Code (csharp):
    1. MasterAudio.PlaySoundVariable("Metal_Impact11", this.transform, "", true);
    Thanks man!
     
  24. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Actually it might not even be the transform variable.

    I attempted to use another transform but that didn't fix the error either.

    If it's not the transform, I have no idea what's wrong, and while I don't suspect it's due to my moving MasterAudio scripts to /Standard Assets (as I have that exact same code in another GO, though I supply the transform rather than using 'this'), I suppose I can't rule it out?
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Yes, that should work SteveB. I don't think I can help any further through the forum with this particular issue. You'll need to either email me a small project that reproduces the error (use filemail.com) or we can Skype. Let me know!
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Submitted V2.7.2 to the Asset Store. What's new?

    - Added the ability to specify a clip in a Resource file for a Sound Group variation.
    - Added methods to replace variation clips at runtime:
    1.ChangeVariationClipFromResources
    2.ChangeVariationClip
    - Added methods to create new Sound Groups on the fly, from Resource Files as well.
    1. CreateNewSoundGroup
    2. CreateNewSoundGroupFromResources
    - Added DynamicSoundGroupCreator prefab to specify any number of Sound Groups to create on the fly. It can load sounds from Resources as well.

    You can use this prefab (last item) and attach it to dynamic prefabs (say if a user selects an item to bring into the game) and create the Sound Groups dynamically. This was a user request!
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Let me know what features you would like to see! I'm all out of things to put into the plugin now. Hope you enjoy the updates!
     
  28. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    How do you detect if a clip is done? In my scene I have a character that starts a "Chat" animation and want to stop the animation once the voice-over is complete. Make sense?
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Yes, that makes sense. There's currently no way to do this. Implementing this for every single clip would definitely cost some considerable performance if you're playing a lot of different clips at the same time. I will try and add a configurable way to do this and get back to you.
     
  30. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    That would be great! If I could tell it to trigger a specific event or something when done.. The main challenge is you may change the triggered event depending on when you call the sound. And as you said, my problem is there may be a dozen sounds going. If I only check for when there are no sounds going, it won't do me any good.

    Or, if it could return a handle I could poll.... then I could poll it in my update function and know it was done.
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    I have a way to do this now. It requires code like the following:

    var result = MasterAudio.PlaySound("Scream");
    if (result.SoundPlayed) {
    StartCoroutine(result.ActingVariation.DetectSoundFinished(this));
    }

    And then you just add this method to your same class to receive the message sent:

    void SoundFinished(object soundGroupName) {
    // do something!
    }


    This will be in the next update!
     
  32. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    131
    Note: Our support forum is going offline very shortly. For whatever reason, customers only post there about 1% as often as they do on this forum (and by emailing us), so we are getting rid of it. Narrowing it down to these 2 methods of support seems to be working fine!
     
  33. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    89
    Hi,

    Been using this for a couple of weeks, it's alright but missing some functionality we need.
    I need to be able to adjust a groups volume while a clip from the group is playing and have the volume change affect the clip, also a GetGroupVolume(string sType) method would be handy.

    Also I think theres a bug on line 567 of MasterAudio.cs
    Code (csharp):
    1.  
    2. info.source.transform.position = sourceTrans.localPosition;
    3.  
    but I think it should be
    Code (csharp):
    1.  
    2. info.source.transform.position = sourceTrans.position;
    3.  
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    I will look into adding these things tonight. At first glance line 567 does look like a bug, I will test it out and make sure before changing it, thanks! If there's anything else you can think of that would take this product from "allright" to awesome, do let me know.
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    V 2.7.2 is live, grab your updates!
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Your wish is my command! V 2.7.3 submitted to the Asset Store. Changes are:

    - Added the ability to be notified when a sound is done playing, so you can stop an animation or things like that.
    - Added MasterAudio.GetGroupVolume to read the volume before modifying it.
    - Adjusting bus volume will now immediately change volume of clips playing in that bus.
    - Adjusting group volume will now immediately change volume of clips playing in that bus.
    - Removed SetBusVolumeByIndex and GrabBusByIndex methods. They were not useful. Use the "by name" ones instead please.
    - Fixed bug with positioning sounds.
    - Moved the "create group" section into the top of the mixer section instead. More convenient.
     
    Last edited: Sep 11, 2013
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Asset Store has already released V2.7.3, dayam they are quick lately! Grab yer updates :)
     
  38. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    738
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Sure, just submitted V 2.7.4 update to the Asset Store. It now provides an additional parameter for MasterAudio.PlaySound (and PlaySoundVariable) to set a delay before playing the sound. I also included this on the Playmaker custom actions and Event Sounds scripts.

    These options are only visible and available in Unity V4.X+ since that's when the method was created.
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Bump to announce that "Master Audio Free!" has had an update submitted tonight, so it now once again includes everything in the full version. That means full Playmaker support!

    It is limited to 6 Sound Groups, but everything else is unlimited and exactly the same. I will post again when the update is live.
     
  41. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    738
    Thanks!
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Master Audio Free 2.7.4 is live. Now includes all the Playmaker custom actions and every other new feature!
     
  43. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    275
    Hi There,
    Is there any way to organise all sound groups I have into folders or with tags or something similar?
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    What you can do is put them into buses using mixer view in the Inspector. Then the SoundGroups group by bus in mixer view. Is that what you're looking for?
     
  45. ConcreteIguana

    ConcreteIguana

    Joined:
    May 11, 2013
    Posts:
    2
    Hi Brian,

    I'm looking for a way to do a dynamic soundtrack on Unity. What I'd like to do is make multitrack music with my DAW and load more than one track into Master Audio. I'd like to have these tracks stay in sync but be able to fade one in or out from time to time. For example, in a dangerous moment I might turn on a loud drum beat. Later, I might replace brass with a softer synth pad. They would all need to loop and stay in sync, but they wouldn't all be playing all the time.

    I heard a talk about this recently and then saw a video about the technique. Apparently many of the pros are doing this now. It makes the soundtrack feel dynamic seamless and allows musical variety (less monotony) without requiring huge, mobile-unfriendly audio files.

    Can Master Audio do that? If not, would you consider it? I think it would be a great selling point.

    Thanks,
    Steve
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    That sounds really cool Steve. However, I am so far unconvinced that this is possible how you want, because of one thing in general you said: "without requiring huge, mobile-unfriendly audio files". This goes against the fact that you don't to stream more than 1 or 2 at the most audio files on a mobile device simultaneously to avoid hurting performance. So if you had only say 6-8 long music tracks (since you're separating them into stems for this purpose), the remaining 4-6 would all need to be non-streaming, and likely take up a lot of memory on the build. Of course, if they were fairly short loops (under 10 seconds) this is not true, but I don't think loops that short would make for very good music (I am a musician myself as well).

    If you'd like to explain further or debate this, we can do it in this thread or you can email me at jerotas2005@yahoo.com

    Thank you!
     
  47. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    275
    Yes that did the trick - thanks!:D
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Good to hear Eyehawk :)
     
  49. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Master Audio V2.7.5 is now live. Pick up your delayed PlaySound updates :)
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,191
    Master Audio is now 50% off for a limited time! If you have been using the free version now's a good time to upgrade.
     
unityunity