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,190
    Just a quick post to say that the half price sale for Master Audio will be over as soon as this update is approved. So make sure to grab it in the next day or so for 50% off!
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    And V 2.4.2 is released! Get using those buses!
     
  3. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    720
    hi,

    Great work. can you tell me it's work with audio triggering because i'll making game and i'll need voice recognition future in my game. so mind telling me.:p
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    This can trigger audio, definitely. That's the main thing it does. As far as the voice recognition part, this does not help you with that. If you have any other questions, let me know!
     
  5. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    275
    Hi there,
    I had a look through the manual, and was interested in the cross fading feature. So is it possible to script which songs start playing at certain sections of the game, which will then cross fade from one song to another?
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Yes, you can set up all the songs in MasterAudio's Playlist Controller settings. With one line of code you can play a song by name. Cross-fading will automatically occur. And you can tweak the cross-fade time in the Playlist Controller's Inspector. The line of code looks like:

    MasterAudio.TriggerPlaylistClip("songName");

    In fact, we are using that in the game we're working on now.
     
  7. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    275
    In that case - sold! Thanks for the information :p
     
  8. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    91
    Hi There,

    Can i can load clips from Resources folder into Master Audio for different sound groups?
    As i don't want to load all the sounds into memory at once,but want them to be loaded/unloaded as per the requirement.

    Thanks.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    I am not sure. I don't know how the Resources folder actually works and I haven't used it before. Is that iOS specific or does it exist on all platforms? If you could send me some information about that, I'll take a look. Also, you can mark some sounds as "streaming" in the audio file itself if you don't want to load them into memory and they are infrequently played. They will still be available in MasterAudio but won't take up room.
     
  10. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    Here's some documentation on Resources Folders:
    http://docs.unity3d.com/Documentation/Manual/LoadingResourcesatRuntime.html
    http://docs.unity3d.com/Documentation/ScriptReference/Resources.html

    I'm not sure if that's the right answer to the problem, but...
    It seems to me that the current Master Audio system implementation can potentially use a lot of resources. Though I haven't done any profiling to determine resource usage, it seems that some other audio solutions have less Audio Sources loaded simultaneously because they only load the files on an as needed basis, whereas Master Audio has everything loaded upfront. This seems like Master Audio could benefit from some type of system where it only loads the Audio Sources into memory for the current max polyphony, and also not loading the audio files until they're needed. Loading the audio files as needed could, in theory, increase CPU usage though, so it might be a trade off... I guess all of this is theoretical though, without doing some performance profiling.
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Our first game used MasterAudio and had over 100 sound clips loaded in a scene and didn't have memory problems on an iPhone 3GS. Of course, you must be judicious. For example, know that iOS native sound is 22k, so resample all sound to that and save memory. As I said, you can stream some of the sounds and they won't take up any room in the profiler. Although you don't want to simultaneously stream more than probably 2 things. I've never heard of the Resources thing before so I'll need to do some research into this. Thank you for the links!

    Per your other comment, loading resources only "as needed" won't necessarily help your memory footprint if eventually most of the same sounds are played during gameplay. Still the ones that are loaded would be around occupying memory, although not initially. I'm not sure I see the win in that. Also, with a system as you describe it, you'd lose a lot of the guaranteed flexibility Master Audio provides. For example, you can currently configure that you want exactly a max of X-voice polyphony for each sound. I greatly prefer that stability than the "random" per-sound polyphony of a runtime-loading system. Just be conscious of how many sounds you place in a scene and in the vast majority of scenarios, memory usage will not be a problem.
     
    Last edited: Aug 3, 2013
  12. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    720
    Thanks for ans...
     
  13. john-essy

    john-essy

    Joined:
    Apr 17, 2011
    Posts:
    464
    Just purchased, totally happy with this. One thing though and it might be me, but when i am trying to set up a playlist i get the following errors

    PlaylistController script is not in the scene or attached to an incompatible component.
    NullReferenceException: Object reference not set to an instance of an object

    I have the playlist controller in the scene also.
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    I had that happen before I fixed it in the last update. Are you on Unity 4 or 3? If you have a project you can send me, I can help debug. Filemail.com is good for that. My email is jerotas2005@yahoo.com
     
  15. john-essy

    john-essy

    Joined:
    Apr 17, 2011
    Posts:
    464
    Im on unity 4.2.

    I would send the project but i am under NDA.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    We can do a screen share on Skype if that works any better. I'm "briandhunsaker" on Skype. Or you can create a brand new blank project and put Master Audio in it and see if you have the same problem. That you could send me.
     
  17. john-essy

    john-essy

    Joined:
    Apr 17, 2011
    Posts:
    464
    hmmm... Works fine in a new project :(
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    You did pull a PlaylistController prefab into the scene right? If you did, delete it and pull it in again. I haven't able to get this to "break" since my fix in the last update.
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    John Essy - it's possible it is some setting in your non-blank project. Create a new blank scene in that project and see if it works there. If not, you can send me the project stripped down or we can Skype just about that blank scene. Should be ok with your NDA.
     
  20. john-essy

    john-essy

    Joined:
    Apr 17, 2011
    Posts:
    464
    It was my fault. Awesome support, Cheers
     
  21. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    128
    Hey folks - i'm not 100% certain, but Unity quietly upgraded default iOS native audio sample rate max to 44 or 48KHz (i think 48KHz). it was originally 24KHz last i recall, not 22KHz. this was gleaned from trolling the forums a while back. i can dig up the thread if you want. as far as i know the hardware itself has always been capable of 44.1/48K playback, but FMOD had ramped it down to increase performance.

    @uniphonic - all that being said, Brian's point is a good one, and you can always ramp sample rates down yourself before importing. it depends on the exposure of the sound and the quality of the overall game and assets. you can also use ADPCM audio format to further reduce size to half of the original, although it's not recommended for looping sounds from what i've read. in either of those cases, you would likely not compress the sounds in Unity, just leave then as raw PCM or ADPCM.

    scott
     
  22. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    128
    OK i'm having an issue getting the music to start playing at all. getting the following error:

    "PlaylistController script is not in the scene or attached to an incompatible component."

    i first stuck the prefab Playlist Controller under the Master Audio as a Child - no dice. all controls are visible but same error.

    then i deleted the Prefab and added the Playlist Controller script as a Component to the Master Audio object. got a single Audio Source to register there plus the aforementioned controls. still no music.

    Deleted that component and added the Playlist Prefab back into the scene as a independent object. still the same message.

    BTW - this is with a new project and i updated to latest version. it's possible the import might have written over an older version but not completely...

    Not sure what to do now. Any ideas? is there a recommended place to put the Playlist Prefab? should i just wipe Master Audio and start over?

    scott
     
    Last edited: Aug 4, 2013
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Hi Scott,

    you don't want to add the PlaylistController script by itself, that won't work. The PlaylistController prefab should be dragged into the scene somewhere close to your AudioListener. My AudioListener is in the main camera prefab, so I usually put PlaylistController as a child of the main camera prefab at exactly the same location (offset of 0x 0y 0z). You definitely don't want it as a child of the MasterAudio prefab. Oh and make sure you have the absolute newest version of the plugin. There was a bug like you're describing in the previous version.

    Let me know if that works for you. Otherwise ping me on Skype, I'm usually around or back soon. Skype name is briandhunsaker.
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    You are right, it was 24k. I remembered wrong. Thanks!
     
  25. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    128
    OK Brian - i used MasterAudio in my other project where i was using 2.3 and there's definitely something wrong here. wiped the Master Audio Folder, and reimported 2.4 - just importing 2.4 over the old version didn't work. recreated Sound Groups (gotta be a better way to handle this in the future for updates - that's another subject...). all the audio works fine, but the music does not trigger.

    the Playlist controller object is a child object of the Main Camera where the Listener is. i filled out in Master Audio object which clip i wanted to play, and set it to loop and Play on Awake. here are the errors i'm getting:

    NullReferenceException: Object reference not set to an instance of an object
    PlaylistController.FillClips () (at Assets/MasterAudio/Scripts/Utility/PlaylistController.cs:142)
    PlaylistController.Awake () (at Assets/MasterAudio/Scripts/Utility/PlaylistController.cs:76)

    and then this one, like in the other project:

    PlaylistController script is not in the scene or attached to an incompatible component.
    UnityEngine.Debug:LogError(Object)
    PlaylistController:SceneHasPlaylistController() (at Assets/MasterAudio/Scripts/Utility/PlaylistController.cs:308 )
    MasterAudio:Start() (at Assets/MasterAudio/Scripts/Singleton/MasterAudio.cs:241)

    so there you are - i think there's some kind of issue, seeing as how someone else had similar problems and i've replicated this one twice - the last time with all brand new version material and properly setting up Playlist.

    i can dropbox what i have to you, but ideally would like to get this dealt with sooner rather than later.

    best,
    scott
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Dropbox would be good as I haven't been able to reproduce the problem. I am not home for a few hours, you can also catch me on Skype later. It's not strictly necessary to delete everything when upgrading. That's just something to try when things aren't working.
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Scott, disregard my Dropbox comment.

    This is an Asset Store mixup. The version 2.4.2 on the Asset Store does not actually have the code for the 2.4.2 version I submitted. That's because I submitted a code update, then before it was approved, I submitted a non-code update. It must have cancelled the first submission without letting me know. So I will now submit 2.4.2 again as 2.4.3 so the bug fixes will be in there.

    In the mean time, email or Skype me if you need the update and don't want to wait a few days for the Asset Store approval.

    Thank you!
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Last edited: Aug 5, 2013
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Ok, the hotfix 2.4.3 is live! You will not see the Playlist Controller problem on startup anymore.
     
  30. jdyeager

    jdyeager

    Joined:
    Aug 18, 2008
    Posts:
    29
    About the removal of the SoundType enum, I don't think you should have to remove it really. It seems like people just dislike having to edit a script to add/remove/change sound group ids. But having to type string names for ids everywhere would cause a lot more problems for everyone in the long run. The enum is especially nice because it gives you an easy drop-down in the Inspector and easy code-completion in script. I'm not sure what else you could do to get both that wouldn't be very complicated.

    I think you could just break out the SoundType enum into its own file, and have a custom editor that modifies that file. The editor would need to be able to add/remove/rename group ids. (Maybe re-order?) Any changes through the enum editor would re-write the enum file and reimport it. I think we did something like that with an enum for a project a couple years ago. If you're interested I can try to dig that up and see what issues we ran into there.
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    I agree, I really like the enum for intelli-sense. But I see why non-coders and sound engineers (most of who shouldn't need to touch code) do not like the extra step we have with it in. Ultimately, I've only had you (one person) say they want it to remain in, and 5 people who want it removed. So far I still am going to remove it, and will take a stab at it this week. It's still going to have a way to add drop-downs to inspectors if I can get that to work. It will pull from the current scene's MasterAudio children Sound Types. I will likely not go to the trouble of re-writing an enum standalone file with a custom editor window and instead just get rid of it altogether.

    It will lose the code completion capability though. I don't think there's a clean way around that. If anyone else wants the enum to remain, or an alternate solution like just moving it into its own file, please speak up ASAP.
     
  32. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    738
    i think so long as we can in code create a play(soundtype);
    and we can define the soundtype as a public so we see a dropdown that we can select in the inspector. that would probably be fine.
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Not sure I understand the first part of your sentence. What does this part mean?

    "i think so long as we can in code create a play(soundtype)"

    I should be able to get a dropdown list to work...
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    As far as loading sounds from Resources, the following code should work to modify a single variation:

    AudioClip resourceClip = (AudioClip) Resources.Load("audioFileName");
    MasterAudio.GrabGroup(SoundType.Laser).groupVariations[0].audio.clip = resourceClip;

    If you're wanting this to be automated somehow without having to write code, how would you envision it working in the UI?

    --
    By the way, the Sound Type enum is now removed and I hope to have this version submitted tonight! Dropdowns for Sound Types still function in the scripts I provide, but adding a Sound Type to your custom scripts you will have to type or paste the name of the Sound Type there unfortunately.
     
    Last edited: Aug 9, 2013
  35. Nezabyte

    Nezabyte

    Joined:
    Aug 21, 2012
    Posts:
    110
    I'm curious on how this compares to Audio Toolkit. Anyone switching over from that and can give an objective comparison?
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    I'd be curious to hear a blow by blow as well. I made this plugin not knowing Audio Toolkit existed. Then I found it but watching the videos made me think the setup was just more complicated than it needed to be. I think the setup and use of Master Audio is more intuitive than the other similar plugins I've seen. Of course I am probably biased. Making "flow" intuitive is something I am great at as a programmer and that's extremely uncommon for some reason.

    There is now Master Audio Free! for trial purposes. Link is in the OP.

    The only complaint I've heard about Master Audio is the "enum thing", which will be resolved in a couple days (update coming). I know there are at least a few Audio Toolkit converts using this, probably more than that though.
     
    Last edited: Aug 27, 2013
  37. Nezabyte

    Nezabyte

    Joined:
    Aug 21, 2012
    Posts:
    110
    Hmm $30 doesn't seem too bad to take a leap of faith, so I'm checking it out. It has good reviews; you seem fairly responsive to issues; and the only thing that didn't sound so appealing from watching the videos were the enums, so I'm glad those are going away.
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Thank you sir! We do our best to support and upgrade our products. If you see anything you'd like added do pop on here and let us know!
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Thought I'd drop a line and tell everyone that V2.4.4 has been submitted to the Asset Store. Changes are as follows:

    - Removed "SoundType" enum. Now play sounds with strings. No more editing code files! Dropdowns still are there for selecting sounds in all the included Inspectors.
    - Added empty defaults always to New Sound Group section and New Variation section.
    - Added random volume slider to each SoundGroup variation.
    - Made Master Audio volume work in realtime during Editor play.
    - Added an alert in the Master Audio prefab if you have no Playlist Controller in the scene and a button to create from there.
    - Added "group by bus" checkbox so you can choose to see your Sound Groups in sections.

    I'll post back when it's approved.

    Obviously, removing the enum is a breaking change. Any mentions of the MasterAudio.SoundType enum in your code files (besides the ones in the MasterAudio package of course) will need to be changed to strings. Now you will use the actual name of the child nodes of the MasterAudio prefabs instead of the enum. Likely you'll need to reconfigure your ducking and EventSounds scripts.

    Sorry for the breaking change, but I think you guys will like it a lot better now! Sometimes we need to take a step back to take two steps forward.
     
    Last edited: Aug 10, 2013
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    I have a question for Master Audio users. Would it be useful to have a setting to allow the sound variations of a certain Sound Group automatically attach to the prefab "making" the sound ? To me it seems that it would be easier when you want to do that sort of thing to simply bake the AudioSource and clip you want into the prefab itself and not bother with an audio plugin. But if it is useful, let me know how / why and I'll add it to the next version! I think maybe it is cool?

    Alternatively, we could instead play a MasterAudio sound using the AudioSource component on the prefab "making" the sound and replacing whatever clip and settings are in there at that time. Are either of those useful, or just weird?
     
    Last edited: Aug 10, 2013
  41. jdyeager

    jdyeager

    Joined:
    Aug 18, 2008
    Posts:
    29
    In my opinion, anything that helps to centralize assigning of AudioClips is great. I don't like having to dig through prefabs any time I want to change an AudioClip. One of the main benefits I see with Master Audio is the ability to set the SoundType on a prefab and then configure what sound that actually maps to in a central place (the Master Audio prefab).

    I'm wondering though with the new non-enum id system, will I be able to have one Master Audio prefab that I persist across scenes to play all my audio? Or will prefabs lose references to which sound group they should try to play from?
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Good question! Yes, the new version will still work across scenes. Sound names to play are just stored as strings now. However, Master Audio (the prefab) doesn't inherently "stick around" when scenes change (I haven't marked it as "don't destroy on load"). That will mean that currently, you can set up a separate Master Audio prefab with different Sound Groups for each scene (so you don't take up RAM with clips that only need to be in certain scenes). However, if you like, you can use the exact same Master Audio prefab for each scene. It will run its initialization code when each scene starts up, during Awake.

    Would you guys like an option to persist the same MasterAudio prefab across scenes? If so, you'd put it in the Bootstrapper scene that runs only once ever.

    By the way, I'm going to release a free version of MasterAudio very soon, probably submitting this week to the Asset Store. It will do everything but be limited in capabilities.
     
  43. Nezabyte

    Nezabyte

    Joined:
    Aug 21, 2012
    Posts:
    110
    Yes
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Consider it done! I'll make that a checkbox you can turn on or leave it off. I have a couple other cool enhancements in mind as well.
     
  45. sinoth

    sinoth

    Joined:
    Jan 15, 2013
    Posts:
    30
    I'm concerned about this in the documentation:

    My current situation involves a vehicle and is much like the helicopter example mentioned above. It is a 3D sound that needs to follow an object. Is this still a limitation? Audio Toolkit has a function that looks like this:

    Code (csharp):
    1. public static AudioObject Play(
    2.     string audioID,
    3.     Transform parentObj
    4. )
    It causes a 3D sound to be played and parented to a Transform. I'm actually not 100% sure this works as I'm imagining it does, but the term "parent" implies the 3D sound will move with the supplied object. This is exactly what would solve the helicopter scenario. Any hope of getting similar functionality in Master Audio? One caveat seems to be that it screws up pooling:

     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    That is still the case, I asked a few posts up if anyone would like me to try and add this functionality. No one answered. Indeed MasterAudio has the same method type as you describe:

    PlaySound(string soundType, float volumePercentage, Transform sourceTrans)

    However, this merely changes the position of the Sound Group variation that's located inside the MasterAudio prefab to the position of the prefab "making" the sound just before playing the sound. It won't "follow" the object as it moves. I am not sure if AudioToolkit does the same thing or not.
    The pooling part is easily solved on my end. However, the polyphony limiting code may not be, and I want to guarantee the polyphony limits you set, especially since no other audio plugin currently does that.

    If it is a looping sound you are playing this way, may I ask why is there a need to use Master Audio (or an audio plugin at all) to play the sound? Why not just place an audio source component with the looped clip on the vehicle prefab itself? If there is a valid need, I will look into it for sure. Currently I don't see how it's needed. Is it because you want access to the random and polyphony settings that Master Audio has?

    Thank you,
    Brian
     
  47. sinoth

    sinoth

    Joined:
    Jan 15, 2013
    Posts:
    30
    I haven't used Master Audio so I'm not entirely sure of it's flow (though I have read through the docs!) Seems it would be nice to have the looping audio in a group so you can control its volume in the mixer along with all the other groups. Also it would respect the master volume.

    More importantly, for me there is a want for all my sounds to exist within a framework if I'm going to be using a framework at all. The limitation text drives the point home I think... you say "for pretty much every other conceivable scenario, Master Audio will save you a lot of time if you use it." Well, if it won't take too much development time, why not fill that limitation and cover all scenarios? Plus, then you could remove that limitation paragraph from your documentation, which is what caused me to question purchasing Master Audio in the first place.
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Good points all sinoth. I will look into making this work in the next version. Thank you for the explanation. I agree it would be great to be able to remove that disclaimer from the docs.
     
  49. ismyhc

    ismyhc

    Joined:
    Nov 28, 2012
    Posts:
    10
    Just purchased Master Audio today and it seems to be working as expected, with one exception. I think there maybe an issue with cross-fading. I have two wav files in the Playlist on my MasterAudio object in the scene. "Auto Advance" is selected, and I start the playlist in code with:

    MasterAudio.TriggerNextPlaylistClip();

    I also have the PlaylistController in the scene.

    Ive tried adjusting the crossfade time, but it just seems to basically end the first clip sooner and start next clip later. Its almost as if there is no fade in/ fade out involved. I have also noticed that I can set the crossfade to 0 and the first clip ends before its finished. I can remove the "auto advance" setting and the first clip doesn't get cut off, but obviously it doesn't advance to the next song.

    Any help much appreciated!
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,190
    Hmmm, let me see if I can reproduce this and get back to you. This part seemed to work correctly in my tests before. Maybe a later bug crept in.
     
unityunity