Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,572
    No there is no built in functionality like this. But yes, you can pass in the volume to use with any MasterAudio.PlaySound{X} calls, so that's a good way to do it.

    Sorry I didn't respond sooner, I got no notification of thread update and just randomly looked. Please post on our support forum if you can because I check it daily. That's here: http://darktonic.freeforums.net/board/1/master-audio-aaa-sound-solution.
     
    Ramsdal likes this.
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V 4.0 has been submitted! Changelog:
    • Added Occlusion settings (for Unity 5 only). Must enable Occlusion in Advanced Settings, then turn on Occlusion per Group you want. Just like auto-prioritization, you choose how often to check for occlusion (raycast), a time interval of .1 - 1 second is possible. The raycast checks if something blocks the AudioSource in a straight line to the AudioListener. If so, a Low Pass filter is applied based on the distance from AudioSource to the blocker (You will not be able to use a Low Pass filter setting of your own when using occlusion because the setting is constantly hijacked by occlusion code). The further from the Audio Listener when blocked, the more frequencies will be filtered out. 2D sounds will not run occlusion code and do not show the option in the Inspector.
    • Occlusion settings now have an optional LayerMask for the RayCast, so you can choose which layers to consider a hit, just like the field on a Camera.
    • Added Occlusion setting to Sound Group's Inspector, choices are "All Groups" and "Turn on per Group".
    • Occlusion setting has runtime display of buckets: # of in-range, out-of-range and occluded Audio Sources. Each of these can be clicked on to select all in that bucket in the Hierarchy.
    • Occlusion has "show ray casts" checkbox (default to true), which shows green lines for unblocked and red for occluded lines. Helps when troubleshooting problems with occlusion.
    • Occlusion has "RaycastMode", settable to Physics3D (default) or Physics2D. With the former, the raycast can only hit 3D colliders. With the latter, only 2D colliders.
    • Occlusion has "Show Diagnostic Buckets" setting (defaults to false since it takes performance) to show the categories of: InRange / Out of Range / Occluded and the counts of each that you can click on to select the objects.
    • Auto-prioritization code now looks at Spatial Blend (bus and rule), since 2D stuff always should have highest priority.
    • Renamed "Apply Distance Priority" to "Use Distance Priority" to be consistent.
    • Added "Select Caller" button at the top of Variation Inspectors at runtime so you can click it to find the object in the Hierarchy that played it.
    • Moved "Buses Shown in Narrow" Advanced Setting to be stored in scriptable object MasterAudioSettings, since it's unlikely you would set it different per Master Audio prefab. Your previous setting will be reset to "on" so if you want it off, you must turn it off again.
    • Moved "Show Variation Gizmos" Advanced Setting to be stored in scriptable object MasterAudioSettings, since it's unlikely you would set it different per Master Audio prefab. Your previous setting will be reset to "on" so if you want it off, you must turn it off again.
    • Moved all Fading settings in Advanced Settings to be stored in scriptable object MasterAudioSettings, since it's unlikely you would set it different per Master Audio prefab. Your previous setting will be reset to "on" so if you want these on, you must turn it on again.
    • Moved all Resource file settings in Advanced Settings to be stored in scriptable object MasterAudioSettings, since it's unlikely you would set it different per Master Audio prefab. Your previous setting will be reset, so doublecheck your settings here.
    • Fixed bug where sometimes assigning something to a Unity Mixer Group at edit time would log an error in Console.
    • Moved icons in Gizmos folder under Gizmos/MasterAudio so it's obvious what they are for.
     
    chelnok and Tinjaw like this.
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The update is live, try out the occlusion!
     
  4. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Hey, I just updated and my Master Audio object in the scene throws Null Reference Exception when I try to preview a sound. http://prntscr.com/b0jpi0 heres a screenshot of the error.
    So I'm guessing something with the sound group references got lost when I updated. Is there anything I can press to fix it. :p

    Also I noticed the volume meters don't light up anymore is there a setting for this?

    And in the Master Audio Manager Window, the Upgrade button says V3.5.5.

    Man I keep finding some bugs, now when I add sfx when I drag them to Master Audio they aren't parented to it and there's some error. http://prntscr.com/b0jxjj

    On Import the Installation Path is some random numbers. Instead of the default path.

    I'll check out the occlusion soon.
    Cheers
     
    Last edited: May 5, 2016
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The upgrade button is correct, that was only ever needed when upgrading from versions prior to that.

    For adding Sound Groups, it sounds like somehow your Group Templates got lost. Is there some kind of alert above the mixer section saying something about that?

    Let's get this one figured out before we tackle any others. What version of Unity are you on?
     
  6. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    I'm using Unity 5.3.4f1 and I also imported it in a fresh project and it had the same issues. =/
    There aren't any alerts in the Master Audio scene object.
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, how many Group templates are in the dropdown in the mixer section then? If they don't show up there at all, change the inspector to "debug" in the upper right corner and show me a screen shot of GroupTemplates expanded please.
     
  8. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I've reproduced the error, should have a fix later today. Will report back.
     
  10. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Sounds great man! Please pm me the fix when you get it. :D

    Good news is it didn't mess anything in my main project. When I go to play more everything works. So I just wont touch it till I get the fix.

    Cheers
     
  11. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Hey,

    Since the version 4.0 update today I'm now getting the following errors:

    • 348: [Unity] Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs(933,42): error CS1061: Type `DarkTonic.MasterAudio.MasterAudio' does not contain a definition for `ResourceClipsAllLoadAsync' and no extension method `ResourceClipsAllLoadAsync' of type `DarkTonic.MasterAudio.MasterAudio' could be found (are you missing a using directive or an assembly reference?)
    • 349: [Unity] Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs(287,38): error CS1061: Type `DarkTonic.MasterAudio.MasterAudio' does not contain a definition for `ShowGizmos' and no extension method `ShowGizmos' of type `DarkTonic.MasterAudio.MasterAudio' could be found (are you missing a using directive or an assembly reference?)
    • 350: [Unity] Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs(482,96): error CS1061: Type `DarkTonic.MasterAudio.MasterAudio' does not contain a definition for `ResourceClipsPauseDoNotUnload' and no extension method `ResourceClipsPauseDoNotUnload' of type `DarkTonic.MasterAudio.MasterAudio' could be found (are you missing a using directive or an assembly reference?)
    • 351: [Unity] Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs(933,42): error CS1061: Type `DarkTonic.MasterAudio.MasterAudio' does not contain a definition for `ResourceClipsAllLoadAsync' and no extension method `ResourceClipsAllLoadAsync' of type `DarkTonic.MasterAudio.MasterAudio' could be found (are you missing a using directive or an assembly reference?)
    • 352: [Unity] Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs(287,38): error CS1061: Type `DarkTonic.MasterAudio.MasterAudio' does not contain a definition for `ShowGizmos' and no extension method `ShowGizmos' of type `DarkTonic.MasterAudio.MasterAudio' could be found (are you missing a using directive or an assembly reference?)
    • 353: [Unity] Assets/Plugins/DarkTonic/MasterAudio/Scripts/Settings/SoundGroupVariation.cs(482,96): error CS1061: Type `DarkTonic.MasterAudio.MasterAudio' does not contain a definition for `ResourceClipsPauseDoNotUnload' and no extension method `ResourceClipsPauseDoNotUnload' of type `DarkTonic.MasterAudio.MasterAudio' could be found (are you missing a using directive or an assembly reference?)

    I'm building for Android. Everything works in the editor, but you get these errors when trying to actually build.

    FYI, everything works fine with the last version.

    Thanks, Justin
     
  12. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    Hey im getting error dragging audio clip into Group Creation area, doesn't matter if i use template or not i get same error.
    The variation object gets created outside of master audio object.
    I tried reimporting all assets and still getting errors.
    I could really use a fix asap.
    using latest versin of master audio

    error.PNG
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That was reported already above. Will hopefully fix this today.
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    What version of Unity are you on?
     
  15. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    Allright cool, Can i download earlier version anywhere for now?

    I understand if it's not possible, just wondering.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If you email support@darktonic.com, ask for version 3.5.9 and send your asset store invoice PDF. I think he has the password for that zip.
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Previewing and creating Sound Groups bugs have been fixed. Those using the new MA 4.0 need only replace this single file.

    Let me know after updating with that if you see any issues.
     

    Attached Files:

    luniac likes this.
  18. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    whoohooo it worked! now i don't need old version.

    dat was quick.

    thanks brah.
     
    jerotas likes this.
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Looks like this is a result of me moving a bunch of PlayerPref settings into MasterAudioSettings. I'll have to revert some or all of that to fix. Will report back tomorrow, out of time today.
     
  20. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    That's cool. Thanks buddy. FYI Unity version 5.3.4p5.

    Justin
     
  21. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Hey, so that last fix did work for the sound groups, I still can't see the meters that are supposed to light up when I preview a sound, is there a setting for that or is it a bug?

    I seem to also have the errors (from SketchWork's post) when trying to build for Standalone.

    Cheers
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah it will happen when building for any platform. The code in question is in an "#If editor" block so it can't work. I'll check out the meters.
     
  23. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    quick question:

    Is it possible to detect through some API method if a particular sound group is currently playing?
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The LED's are working for me. Only in play mode. They never did anything in edit mode. So I can't reproduce this one. Anything in the Console when it happens?
     
    Last edited: May 6, 2016
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah, use this:

    Code (csharp):
    1.  
    2.  if (MasterAudio.GrabGroup("Arrow").ActiveVoices > 0) {
    3.  // is playing
    4.  }
    5.  
     
    luniac likes this.
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I've fixed the compile errors for building standalone / android. Unfortunately it affects many files so I can't post it here. I'll resubmit to the Asset Store tomorrow.

    Anyone who doesn't want to wait can email support@darktonic.com for the latest with their PDF invoice. I already have that zipped up on Dropbox for our customers.
     
  27. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Ok so I found another error. When I try to add a sfx to Master Audio and Use Group Templates is checked off I get the same error as the one that was fixed, so I guess you have to add that fix as well.

    Also I found out that the LED's don't light up for my old sound groups in the Master Audio prefab that was made before the update. After applying the update these stopped lighting up, but if I add a new Sound Group, they do light up for that sound group. Weird?

    Hope we get everything fixed.

    Cheers
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, I've fixed the first one, will investigate the other is a project with "old" Master Audio by upgrading. Hopefully it can be reproduced. If not, you'll need to export that prefab (MA) and send it to me.
     
  29. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    That's great thanks buddy. I can wait till the asset store version is available as it still works fine for testing inside the editor.
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I tried upgrading an existing project. I couldn't get LEDs to not show when either previewing or triggering a Sound Group through code. So I can't reproduce this problem. Please export your MA prefab and send it to me.
     
  31. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    Using fixed master audio plugin im still getting the same nullreferenceexception adding audio clips when NOT using group templates.
    Checking "use group templates" allows me to set up clips.
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm aware of that, fixed it today but haven't updated the build on Dropbox. I have a couple other things I'm going to look into first.
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I rolled back most of the aggressive optimization I did for 4.0 because it's causing too many bugs.

    Email us at support@darktonic.com for the latest, on Dropbox. Make sure to include your asset store invoice PDF. V 4.0.2 is what you want.
     
    luniac likes this.
  34. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    @jerotas is the last version safe to import for an IOS project? have been tested on a device?
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You talking 3.5.9? Well we rarely test on a device, but haven't had problems reported for awhile.
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I think this happened because I accidentally included MasterAudioSettings.asset in the upload. V4.0.2 will not have it. Please delete that file (in Assets/Resources/MasterAudio folder) and re-make any changes you had there (DB setting / pitch cents / narrow mode etc) or roll back to pre-installing the new.
     
  37. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Builds perfectly - thanks so much buddy :D

    Justin
     
    jerotas likes this.
  38. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Hey, so I'm trying out the occlusion and it's very interesting.
    I'm encountering a case where I'm playing the sound effect inside of a collider of my Door object which has the layer that I use for the occlusion, so the sound is occluded because its inside the collider.

    So I think the solution to this might be to add an option wether Raycasts start in Collliders in the occlusion setings.
    And if we check that bool you use
    http://docs.unity3d.com/ScriptReference/Physics2D-queriesStartInColliders.html

    Before and after the raycast like so:

    Code (CSharp):
    1.  
    2. public bool raycastsStartInColliders = true;
    3. ....
    4. ....
    5. bool oldSetting = Physics2D.queriesStartInColliders;
    6. Physics2D.queriesStartInColliders = raycastsStartInColliders;
    7. Physics2D.Raycast();
    8. Physics2D.queriesStartInColliders = oldSetting;
    9.  
    Can this be added please? :D

    Cheers
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    In fact I am using Raycast instead of Linecast because I ran into the same issue with Linecast (starting inside the collider always got hit by the collider we're inside). And changing to Raycast made the problem go away for me.

    So I'm pretty confused why the code would need the change you propose.
     
  40. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Well don't Raycast always return the inside collider as well unless you have the "queriesStartInColliders" to false? o_O

    This is for Physics2D btw, there's not such an option for 3D Phyiscs.
    Can you maybe tell me in which script and line the code for the Raycast is so I can experiment with this?

    Cheers
     
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    First question: I don't know, but I know I have the default setting for that in my project, whatever that is. Maybe your setting is non-default?

    There's I think UpdateForOcclusion method in SoundGroupVariationUpdater.cs. Check the LateUpdate method that calls a bunch of things.
     
  42. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    any advises to manage interior/exterior ambiance sounds with MasterAudio? im thinking about using audioMixer, does master audio have some tool to help?
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Normally we just hook ambient sounds to a bus (maybe two buses for you: interior / exterior?), and assign that bus to the Unity Mixer Group. Then you could "transition to snapshot" when you walk outside a trigger so you can change the level of both Mixer groups. That transition can be done with EventSounds component without writing code.
     
    Tiny-Tree likes this.
  44. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Ok so I just tested it out and added the code I mentioned in the previous post to the Physics2D Raycast sections and everything works nice. The default setting for "queriesStartInColliders" was true, which is not good for us in this case, so its better if this is toggled in Master Audio when Physics2D is enabled so people can still decide to leave it true in their Physics2D settings if they need that for something else.
    You might wanna check it out and add it as well.

    Cheers
     
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok the next version will add this option for 2D raycasts only.
     
  46. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    i tried using occlusion, i set it to per group but the occlusion option is not visible on each groups
     
  47. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It doesn't appear on the mixer section, you have to go to the actual group settings (click the gear icon on the mixer). This is where it is:

    upload_2016-5-12_20-50-20.png

    If you don't see that, what platform and Unity version are you on?
     
  48. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    ok found it! thanks
     
    jerotas likes this.
  49. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Hey, so I'm wondering. Is it possible to add another mode to the occlusion which doesn't use a low pass filter, but does a volume adjustment?
    So basically in a 2D game if you're outside a room and there are sounds coming from inside the room and they are supposed to be occluded, do a volume adjustment so they are much quieter.

    Tell me what you think about this? :)
    Cheers
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I had thought about it when I made the feature, and didn't like the way it sounded. Didn't sound realistic to me, but the LP filter did.

    It would also mess with fading code and other volume-changing code.