Search Unity

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
    Master Audio v3.4.1.7 will be live in about 15 minutes. Changelog:

    • Optimized CoRoutine speeds by creating the yield instruction up front.
    • Fixed bug where ducking did not work when playing Resource file clips.
    • Added MasterAudio methods StopAllSoundsOfTransform and StopSoundGroupOfTransform. These stop all sounds following or triggered at the location of a given Transform.
    • Added MasterAudio methods PauseAllSoundsOfTransform and PauseSoundGroupOfTransform. These pause all sounds following or triggered at the location of a given Transform.
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I have added 4 new methods (2 pause, 2 stop) in the version that will be live in 10 minutes :)
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    This is now fixed and will be live in a few minutes. Thank you for letting me know!

    By the way, DarkTonic is talking about getting a plugins forum going so issues are more searchable than a 50 page thread. I'll let everyone know when something's up and running.
     
  4. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    Excellent on both counts, thanks!
     
  5. Slaktus

    Slaktus

    Joined:
    Dec 5, 2012
    Posts:
    60
    I'm learning Master Audio 3.0 now, and I'm rather happy with what I've seen so far. I'll be using it for a procedurally sequenced soundtrack, constructing playlists on the fly in response to in-game events. Seems very suitable for the purpose so far.

    One big question, though: Can I play sounds backwards? I'm pretty fresh to Unity's audio, but I've looked at Rewind Time Manager (http://u3d.as/content/voodoo/rewind-time-manager/3kh) and it plays music backwards when rewinding, even setting playback speed. Is this possible via Master Audio, or would I have to bolt on that functionality?
     
  6. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    I've just confirmed that the Resource file ducking is now working. Thanks again.
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm not sure, let me check on that.
     
  8. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    It looks like it should work simply by setting the Pitch to -1, however I get no sound when I do that (using a Resource). I didn't test with a normal Clip though.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Hmm, I don't know if that works or not. I'm not in the office for most of the day today, so let me know if that does anything useful. Did you try previewing a clip with a negative pitch?
     
  10. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    Clip Preview apparently ignores pitch altogether (which could possibly be considered a bug). And it doesn't work at all on Resource clips (which seems like a bug to me).
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's not a bug that it doesn't preview resource clips, that's intentional. Because I couldn't be sure that the resource was unloaded when done previewing while in edit mode (no callback), and I didn't want to show false indicators if that happened on the profiler.

    Pitch not working on previewing might be a bug. Let me check on that.

    Try negative pitch playing on a non-resource clip and see if it plays backward?
     
    Last edited: Mar 5, 2014
  12. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    I did try a Clip with -1 pitch and it simply doesn't play back in-game.
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I think it's just not audible. Pretty sure it's playing. Does the number of voices for that Sound Group change from 0 to 1 on the mixer (far left square bracketed section) when you "play" it? If so, it's playing.

    I'll try some stuff later and see if I can get a backward sound to play.
     
    Last edited: Mar 5, 2014
  14. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    Nope, it doesn't play either in a group or in the playlist if Pitch < 0. Number of voices stays at 0.
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds like a bug. I'll look into it.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Let me know if you figure out a reliable way to reproduce it. I haven't seen that myself. Are you not using a single persistent Master Audio prefab across all scenes? If not, why not?
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I did some toying around. Regarding the negative pitch that is supposed to play backward, I'm seeing what looks like buggy behavior. Not in Master Audio, but in Unity's default implementation. And I'm not sure we can work around that.

    I just put an Audio Source in a Game Object, stick an audio clip in it and set the pitch to -1 and Play on Awake. Hit play. You hear nothing. Hit Stop. Turn on looping. Hit play. Still nothing is heard. Change the pitch to a positive number. Hit play. You hear the sound.

    Now after a small bug fix in Master Audio, I have gotten things to play back in reverse with negative pitch. But only if you turn on loop for the Variation. Otherwise nothing is heard. I can't explain it. That is what Unity is doing.

    Any ideas?
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I just tested 3 MA Inspectors' preview buttons and they were all respecting the pitch when previewing. If you found one that does not, please let me know.

    Note that as I described in the previous post though, negative pitch will not produce an audible result unless loop is turned on for the Variation. Unity seems to require that for some reason.
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Actually, I'm not seeing this behavior either. Maybe I added the feature at some time, but previewing a Resource clip works fine for me. If you can tell me which Inspector you're using that doesn't work, I'll take a look.
     
  20. Slaktus

    Slaktus

    Joined:
    Dec 5, 2012
    Posts:
    60
    Hey,

    Thanks, I'll play around with the pitch trick. I'll also dig into the code I was talking about and post any findings.

    I get behaviour similar to what Arcanor pointed out: I can only play a clip backwards by setting pitch to -1 if I tick the Loop Clip box. If I don't tick Loop Clip, no sound will play.
     
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Please read my posts on the previous page. I said that Unity won't even play the clip backward at all unless loop is checked, even outside of Master Audio. I have no idea why, but that's apparently how it works.
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V3.4.1.8 will be live in 15 minutes. Changelog:

    • Attention: Please delete the following folder: MasterAudio/Sources/Textures. They have been moved to Editor Default Resources so they won't take up room in builds.
    • Added method: FadeOutSoundGroupOfTransform to MasterAudio. This operates on all sounds following or triggered at the location of a given Transform.
    • Revised WasTriggeredFromTransform method to include embedded Audio Listener objects as well for that scenario.
    • Fixed a bug to allow playing of samples backward, using negative pitch. Note that this only works when loop is turned on for the clip, otherwise nothing is heard. Unity only allows it when that's on. I have no idea why.
    • Fixed bug where dragging Resource files into a Playlist wouldn't use the folder name, so the song wouldn't load at runtime.
     
  23. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    It is sticky. He always updates the second post on the first page with the changelogs for each version.
     
  24. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    It seems a lot of changes to the structure of this asset in the last few updates and I think some people might miss the previous changelogs so I will sum up for people who missed the previous update (if you haven't update for a while)

    1. Make sure you delete your "MasterAudio Icon" in the top-level Gizmos folder before updating. It has been moved to an inner folder.
    2. Delete DarkTonic/MasterAudio folder (or just DarkTonic folder if you don't have "Core GameKit + Pooling!" previously known as "Killerwave")
    3. Now update!

    BTW Jerotas, I think you should do this as sticky - a lot of people might missed all these little changes and because you update Master Audio so often (almost on daily basis! Which is a good thing!) I am sure many people would miss these changes.

    So instead of hunting those little changes (and directories where those files are) - you should instruct people to just do what uScript guys do for their update mechanism - delete the whole package and reinstall (easiest and most consistent result - it will get rid of unused deprecated code left over from previous versions).
     
  25. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574

    Yeh, but not everyone comes to the forum to read the changelog - most people I would assume just update from Asset Store without looking.

    Also, as I said previously, the update needs to be streamlined - instead of hunting those changes (and the files and locations) just delete the whole package and clean reinstall - it will guarantee to get rid of ALL the unused deprecated code left over from previous versions.
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It's a good idea to do that. It doesn't simplify my job.
     
  27. ojuzu

    ojuzu

    Joined:
    Jun 29, 2006
    Posts:
    67
    Hi Brian. I just updated to the latest build and it looks like all the icons are missing. I did follow the instructions to delete the old texture folder but I was still getting the errors. So I created a fresh project and it's happening there as well. Sample error:

    Code (csharp):
    1. Unable to find required resource at 'Editor Default Resources/MasterAudio/inspector_header_master_audio.png'
    2. UnityEditor.EditorGUIUtility:LoadRequired(String)
    3. MasterAudioInspectorResources:.cctor()
    4. UnityEditor.DockArea:OnGUI()
    And then I'm getting this for each image asset that's missing, so about 21 errors. If I do a search for any of the missing PNGs nothing comes up.

    Dennis
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Do you actually have the Editor Default Resources/MasterAudio folder? I definitely uploaded it. Checking the store now.
     
  29. ojuzu

    ojuzu

    Joined:
    Jun 29, 2006
    Posts:
    67
    No, it's not in the project.
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    How nice :mad:

    I'll try and upload a new one and hope it decides not to ignore that folder this time.
     
  31. ojuzu

    ojuzu

    Joined:
    Jun 29, 2006
    Posts:
    67
    Yeah, that's annoying I'm sure. I re-downloaded and imported it a couple of times and no dice. Cool, thanks for the quick response.
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The root folder somehow reset itself. I'm uploading a new version now. Should be live in about 20 minutes. New version is 3.4.1.8.1
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The fixed version is live. I can see that the previously missing folder now shows on the Asset Store. Thanks for letting me know about this!
     
  34. ojuzu

    ojuzu

    Joined:
    Jun 29, 2006
    Posts:
    67
    Sure thing! Thanks again for the quick response.
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Any time.
     
  36. ojuzu

    ojuzu

    Joined:
    Jun 29, 2006
    Posts:
    67
    I have a quick question. I'm going though and cleaning up my project and as I was looking at the Master Audio stuff I realized that you recommend against re-parenting the MA object. That's actually what I've been doing in my project and everything has been working fine. Is there a gotcha that I might run into down the road by doing this?

    The reason I have it re-parented btw, is so 2D sounds (like voiceovers) are played back correctly. My game is a top down/rts style so the camera/audio listener is all over the place.
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Not that I know of. I just state that we don't support it not being top-level because I can't test everything. If it works fine, then you're good.

    I don't understand why you would need to do that for 2d sounds though. 2D sounds you just need to set as 2d (disabling 3d sound settings on the clip) and they'll play fine no matter where the listener is.
     
  38. ojuzu

    ojuzu

    Joined:
    Jun 29, 2006
    Posts:
    67
    Great, good to know.

    I thought that would be the case as well but in the Master Audio PDF I read this:

    "The position of the MasterAudio prefab will be used for all triggered 2D sounds (if you have any), so put it somewhat close to the AudioListener in your scene if you have any 2D sounds planned."
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm going to edit that text. It's confusing now. At the time I wrote it, "2d sounds" didn't really mean 2d, but that you weren't telling them a location to play at (no Transform passed in).
     
  40. ojuzu

    ojuzu

    Joined:
    Jun 29, 2006
    Posts:
    67
    Ah, I see what you're saying. Cool, that's very helpful, thanks for clarifying.
     
  41. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    943
    Not sure if you've noticed but whenever I select the Master Audio prefab on my scene, the CPU usage goes through the roof (80%+). Not exactly a show stopper but still a bit annoying.
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That particular custom Inspector needs to refresh constantly to correctly show the LED meters, voice count and Jukebox functionality correctly. It's not possible to get those to work properly without that workaround unfortunately. I tried about half a dozen other solutions and none worked.

    So at the end of the Inspector it calls GUI.Repaint().

    I could make that toggle-able but those features really should show correctly at all times. It probably takes more CPU the more sections in that Inspector you have expanded (more to draw each time?). You can test that.
     
    Last edited: Mar 8, 2014
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I found some new information I'm going to try as a substitute for the GUI.Repaint().

    Hope it works!
     
  44. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    943
    Awesome! Thanks man! ;)
     
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I've got it done, will submit a new version tonight. I now have normal mode (which still shows everything, just slower updates), and "fast GUI response" mode, which is a checkbox that defaults to on. You can turn it off.
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V3.4.1.9 will be live in 15 minutes. Changes are:

    • Added option to Master Audio Inspector "fast GUI refresh" which defaults to on. You can uncheck it for less intensive CPU usage.
    • Fixed icons. Play icon was in place of speaker icon for previews.
     
  47. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
  49. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    943
    Awesome! That has to be the fastest support ever!! :D Thanks man!
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Well it's not *my* fastest ever :twisted:

    You're welcome.