Search Unity

[20% off!] 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,110
    Well it's not *my* fastest ever :twisted:

    You're welcome.
     
  2. odolphie

    odolphie

    Joined:
    May 22, 2013
    Posts:
    10
    Hi, I want to be able to control Master Audio using code, so i've setup a basic scene with just Master Audio imported and a cube. Created the three prefabs using the Master Audio menu, I've dragged sound1.wav into the group and it plays OK from the inspector panel, havn't added it to a bus.

    In the cube I just have (after boilerplate):

    void Start ()
    {
    MasterAudio.PlaySound ("sound1");
    }

    I'm getting the error "Cueing only child of sound1" debug error?

    T: 0 - MasterAudio Cueing only child of arrow
    UnityEngine.Debug:LogError(Object)
    MasterAudio:LogIfLoggingEnabled(String, String) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:3556)
    MasterAudio:playSoundAtVolume(String, Single, Vector3, Nullable`1, Transform, String, Boolean, Single, Boolean, Boolean, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:1050)
    MasterAudio:playSound(String, Single, Nullable`1, Single, String, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:684)
    cube:Start() (at Assets/cube.cs:10)
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    That's not a bug, that's debug information. You have debug turned on either at the Master Audio top level or for the sound group. You can turn it off so you don't see debug information like that.
     
  4. odolphie

    odolphie

    Joined:
    May 22, 2013
    Posts:
    10
    Ah - I see. Was expecting it just to log as a message or warning - the redness caught me off guard. Unticked 'Log all sounds' and I'm away!

    Also - surely a record response rate - perfect :)
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Oh, good point. I'll make it not red in the next version. Thanks!
     
  6. cloudcamaleoniv

    cloudcamaleoniv

    Joined:
    May 17, 2013
    Posts:
    57
    Changing the pitch of all sound groups of a bus by code. Is that possible? Like... MasterAudio.ChangeBusPitch("BusName", 1.5f);

    Also, how to change all playlists pitch by code? Is that possible too?

    Thanks
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Edit: this has been added in the newest version!
     
    Last edited: Mar 14, 2014
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Master Audio v3.4.2 will be live in 20 minutes. Changelog:

    • Changed Master Audio logging info that isn't critical to warnings instead of errors.
    • Added MasterAudio.ChangeBusPitch method, which changes the pitch of all Variations in all Sound Groups in a bus.
    • Added MasterAudio.ChangePlaylistPitch method, which changes the pitch of all songs in a Playlist. This does not affect any already playing clips however.
    • Bug fix: Retrigger Percentage should be ignored for Chained Loop Sound Groups. Made this work properly and hid the Retrigger percentage for Chained Loop types.
    • Bug fix: made Replay Limit Mode ignored when not in normal Variation Mode, where it's not visible.
    • Bug fix: made Limit Polyphony ignored when not in in normal Variation Mode, where it's not visible.
    • Added 3rd Variation Mode to Sound Groups: "Dialog". This stops all other Variations in the Sound Group whenever you play one. This is very useful for a single character's dialog and makes sure they're only saying one thing at a time. Normal mode doesn't work properly for this without calling StopAllOfSound every time you play the Sound Group to be sure.
     
  9. cloudcamaleoniv

    cloudcamaleoniv

    Joined:
    May 17, 2013
    Posts:
    57
    Wow man, that was fast. Thanks!

    About the playlist pitch... you said that the current song is not going to be affected by this command. So, how may I affect the current song's pitch through a more complex code?
     
  10. ErwanB

    ErwanB

    Joined:
    Nov 14, 2012
    Posts:
    25
    Hi Brian,

    I'm currently trying to decide whether I should buy Master Audio or not. In fact, I need to know if it can handle the following scenarios :

    1) Looping BGM with an intro (that shouldn't be looped obviously) : can I set up a playlist and select which tracks should be looped (and how many times) and which should not ?

    2) Random gapless BGM with multiple tracks : I have several BGM musics composed of 4 or more tracks (intro, one or more loops, outro, transitions) and I need to set up a BGM system that transitions randomly from one music to the other, based on the available transitions.
    I cannot use simple crossfading since transitions between musics are just more than that.
    For instance, let's say I have 3 musics : A, B C with according tracks. II would like to set the system like this :
    A can transition to B or C, B can transition to A or C, C can transition to A.

    Does Master Audio address these scenarios ?
     
  11. Henrik-Flink

    Henrik-Flink

    Joined:
    Feb 1, 2013
    Posts:
    25
    Hi there,

    I've been using Master Audio for a while and I must say that I'm very satisfied with it.

    I have one question thou, is there any possibility or future plans, to have the volume of a 3D sound depending on the direction of an object/audio listener? (I've started too implement this my self but was wondering if there would be an official support for this)

    Thanks!
     
  12. PrisonerOfLies

    PrisonerOfLies

    Joined:
    Dec 6, 2013
    Posts:
    105
    I just started using master audio and wanted to ask regarding firing custom event. Since it is sending a string from my script, and doing a string comparison to the audio listener, will it be a performance bottleneck once i have around 100+ objects ?
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Like this:
    Code (csharp):
    1.  
    2. PlaylistController.InstanceByName("yourControllerName").CurrentPlaylistSource.pitch = .5f;
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    #1, no problem, each song has its own loop setting.
    #2, Not 100% possible with Unity code because we can only check if the song is over every frame, which at the most is 1/60th of a second on mobile. However in most cases this is sufficient for "gapless" and you can't hear any gap. Using a very slight crossfade is usually preferable. For the random transition part you would need to code that. We can randomly play the entire playlist, but not target certain random tracks to play after each track.
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Hm, never heard of that idea. It's a possible future feature, please give me more details. Doesn't sound like it would be too processor intensive.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    It has been said that strings cause garbage collection eventually, but we've seen no stuttering on our game with over 100 Sound Groups (and an extremely busy soundscape). We've have had a couple users say that they saw much better smoother performance on Master Audio vs Sound Manager Pro, if that's any consolation.

    Unfortunately with the removal of "the enum" (due to overwhelming user feedback) we have no choice but to use strings. Which is the same as every other sound plugin for Unity.
     
  17. PrisonerOfLies

    PrisonerOfLies

    Joined:
    Dec 6, 2013
    Posts:
    105
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Also, if you want to code it yourself and send a current version patch over (with SVN), I'll consider using it. A few users have done this before.
     
  19. ErwanB

    ErwanB

    Joined:
    Nov 14, 2012
    Posts:
    25
    Thanks for the very detailed answer :)
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Any time!
     
  21. hima

    hima

    Joined:
    Oct 1, 2010
    Posts:
    183
    Is there any way to create a sound group and add AudioClips to the groups purely through code? My game is very dynamic in term of resources we are going to use so the prefab and drag all sounds into prefab approach isn't working well for me.
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Just use the Dynamic Sound Group Creator prefab. You can attach it to other prefabs you spawn conditionally. That way you don't need to write code to do that, except to spawn the object.
     
  23. hima

    hima

    Joined:
    Oct 1, 2010
    Posts:
    183
    Thank you. I tried to do it via code but since there is no example of how to do this, I'm not sure if I'm doing it right. This is what I'm doing
    This is what I get when I run the game.

    I'm not sure where that upgrade data button is since I couldn't find it. Any help would be appreciated!
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Don't even try to create that via script. That's not worth the trouble. Open the Master Audio Manager window and create the Dynamic SGC from there. Then click on it and configure one or more Sound Groups using the UI in the Inspector on it (it's like a mini-Master Audio prefab). Then make a prefab out of the configure Dynamic SGC and remove it from the scene. When you want to create the group(s) you configured there, just Instantiate that prefab (or spawn it if you have a Pooling plugin) and your group(s) will be created.
     
  25. PrisonerOfLies

    PrisonerOfLies

    Joined:
    Dec 6, 2013
    Posts:
    105
    i want to scale my gameobjects depending on the beat of the music.
    can i know how can i get the beat data from master audio ?
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    No you can't. And I don't have any idea how to add that, so it's not going on the features backlog. Sorry :(

    There is a plugin that can do that though. Here it is: https://www.assetstore.unity3d.com/#/content/1761
     
  27. PrisonerOfLies

    PrisonerOfLies

    Joined:
    Dec 6, 2013
    Posts:
    105
  28. PrisonerOfLies

    PrisonerOfLies

    Joined:
    Dec 6, 2013
    Posts:
    105
    what error is this ?
    i have only 1 audio file, called arrow (from sample demo) to be used for player jump, move left, move right and slide

    this is the error msg :
    T: 2.501339 - MasterAudio Cueing only child of arrow
    UnityEngine.Debug:LogError(Object)
    MasterAudio:LogIfLoggingEnabled(String, String) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:3556)
    MasterAudio:playSoundAtVolume(String, Single, Vector3, Nullable`1, Transform, String, Boolean, Single, Boolean, Boolean, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:1050)
    MasterAudio:playSound3DAtTransform(String, Transform, Single, Nullable`1, Single, String, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:814)
    EventSounds:playSound(AudioEvent, EventType, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Events/EventSounds.cs:351)
    EventSounds:ReceiveEvent(String) (at Assets/DarkTonic/MasterAudio/Scripts/Events/EventSounds.cs:681)
    MasterAudio:FireCustomEvent(String) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:3524)
    PlayerController:jump(Boolean) (at Assets/My Game/Scripts/Player/PlayerController.cs:603)
    InputController:Update() (at Assets/My Game/Scripts/Utility/InputController.cs:157)
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    That's not an error, that's debug info. Turn off "log all sounds" on the Master Audio prefab. In the newest version I made that yellow in the console. Errors are red.
     
  30. hima

    hima

    Joined:
    Oct 1, 2010
    Posts:
    183
    I see, what about adding an Audio Clip to a group at run time via script? Is this possible?
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    I'm not seeing a way to do that from script right now. I'll put it down and see if I can do this in the next version or 2.
     
  32. hima

    hima

    Joined:
    Oct 1, 2010
    Posts:
    183
    Thank you, I've looked at the Inspector class and there's a method to create a SoundGroupVariation. Would be nice if something like that is exposed to us and thus allow users to add variations groups at runtime.

    The reason for this is that my game has a debug mode that I would like a cutscene writer in my team to use. They won't have access to Unity3D so they'll have to test a game's cutscene through that debug mode.
    The build also comes with an external data folder where I store the game's cutscene scripts as well as audio files. When the game execute a play audio command inside the cutscene script, it will load an external audio file into AudioClip. If I could feed these AudioClips to MasterAudio easily, it would be perfect.
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Ok, I'll see what I can do.
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Master Audio v3.4.3 will be live in 15 minutes. Changelog:

    • Added optional fade out time for dialog variation mode. Now you can have the previous dialog clip fade out while the new one starts.
    • Fixed bug where a Variation's FadeOutNow command wouldn't work if it was already fading (called twice quickly).
    • Made a friendlier error when you have a custom property drawer with no MA in the scene. No Null Exception.
    • Added MasterAudio.CreateGroupVariationFromClip method to create additional variations at runtime.
     
  35. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    21
    Hey, Just wondering if its possible to dynamically add playlists/clips to a playlist at runtime. Our game is completely skinable, and dynamic groups work great for sound effects, but I cant figure out a solution to handle music correctly.

    Edit: Im currently using AddSongToPlaylist to add songs when they are needed, but there was no way to remove them so that they could be overridden (when I load a new skin, I need to override the currently loaded "backgroundMusic" with a new one), so I added a ClearPlaylist method to master audio which I can use to clear a playlist before adding music again. Is there a better way to handle this, or is there a way to clear playlists/remove specific clips that I haven't found? thanks!
     
    Last edited: Mar 18, 2014
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    It's not possible right now. I can add this in the next version or 2. But let's make sure the best way to do it first. Do you want me to add it to the Dynamic SGC prefab so you can do it with the normal Master Audio Inspector, or would you prefer to script it?

    I'm sure you know, but you can any basically infinite playlists and playlist songs without incurring any memory overhead if you set them all to compressed + streaming. That's normal practice for non-layered game music.
     
  37. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    21
    Thanks! Also just edited my comment with more info.

    The reason its important for me to do it dynamically is that "skins" are loaded through asset bundles.

    Adding it to the dynamic SGC would be perfect. Im currently including a dynamic SGC prefab in the bundle, and adding that to the scene, which handles sound effects fine.
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Ok, I've re-read both posts.

    If we add Playlist controls to the Dynamic SGC and make it so that the songs you add there can auto-remove when the scene is changed (or you call RemoveAll method), would that do everything you want? We plan on making it so that you can create a new playlist or add to existing playlist.
     
  39. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    21
    That sounds fantastic. Thanks so much for your fast replies and solution!
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    No problem! Now it may not be the easiest code to add, but it is coming. Might not be the very next version, but definitely the version after that if not. Hold tight while I get it all nice and easy to use :)
     
  41. Hesham

    Hesham

    Joined:
    May 29, 2008
    Posts:
    146
    Code (csharp):
    1.  
    2. MasterAudio All children of explode were busy. Will not play this sound for this instance.
    3.  
    I'm getting this message in my logs and I'm not sure how to resolve it.
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    That's not a problem per se, it's just information which you're seeing because "log all sounds" or logging for that Sound Group is turned on. If you want to be able to play that sound with additional voices, increase the weight of that Variation (or all Variations of that Sound Group) in the Inspector. If you're hearing enough of that sound, you don't need to do anything.
     
  43. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    476
    Hi jerotas,

    Just wanted to let you know that I've got all the audio working in my game, including an audio options menu, and I hardly had to spend any time at all getting it all implemented with Master Audio using Playmaker and scripting. Well done!

    What are your tentative plans for Master Audio for Unity 5, now that they are adding more features to audio?
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    Great to hear! We've watched the Unity 5 video and it looks awesome. Hard to say until we get our hands on it (we have bought pro licenses ourselves already), and it's unknown which features will be in Unity 5 free (non-pro) so far.

    I would say we will likely be removing some functionality if it's handled natively by Unity, and letting Unity handle that part. And we'll be making sure that everything that remains still functions properly, which may require rewriting some of the code. Above all, we'll make sure that the "no coding" options we lead the curve on will be brought up to the next level and beyond. Anyway, don't worry that we're going to take a long time to do this, we won't :) But we do have to wait until we get our hands on U5.

    Great question!
     
  45. NickHVenden

    NickHVenden

    Joined:
    Aug 3, 2013
    Posts:
    33
    Jerotas,
    You were extremely helpful when I purchased Master Audio. I just upgraded both your app and to Unity v4.3.4 and nothing is working--namespace errors. My Music Masters Thesis project at CSULB has come to a complete stop.
    Is there something I should know about compatibility. Really desperate right now.
    Nick Venden
    (otherwise very impressed with your app)
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    There are no namespaces in Master Audio. Please paste the errors here in the thread and I'll see if I can help you figure out the problem. Are you using other plugins in your project? Maybe one of them has a class name of the same name as one of the Master Audio classes?

    Also, we changed the structure of folders recently, so it's possible you have duplicates of most of the files in 2 folders. Which won't compile. So I recommend deleting the Master Audio folder AND the Dark Tonic folder, then re-downloading the package.

    Let me know if that fixes it for you.
     
  47. NickHVenden

    NickHVenden

    Joined:
    Aug 3, 2013
    Posts:
    33
    There were namespace error notes in the console about Master Audio After rebuilding my project several times all the scripts compiled but now the eventSounds scripts (in my case attached to the FPC) in the inspector do not show anything i.e., the drop down doesn't open. I imported your entire package from the AssetStore but no change. My scripts all compile in MonoDev and the game will run but no audio events. I've re-added EventSounds scripts to the FPC (and others)-no audio. Sound files are resident and play. The $MstrAudio.jpg right side of your GroupMixer looks empty now (there were gears and accessor things there before.). The bottom of the picture: EventSounds dropdown not opening.
    Hope you can help. This is a great asset, in fact my Thesis project relies on it. NickV
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    You may be missing the Editor Default Resources/Master Audio folder. That's where all the gear and other icons are now kept. You cannot have things not working properly and no errors in the console. That's not possible. Did you delete the Dark Tonic and Master Audio folders before reimporting?

    If you want, you can send me your entire project and I'll take a look and see what's wrong. Use filemail.com to send it for free. Send it to jerotas2005@yahoo.com. That way we'll be sure to get this figured out quick.

    -Brian
     
  49. NickHVenden

    NickHVenden

    Joined:
    Aug 3, 2013
    Posts:
    33
    Yes. I am missing that folder (Can I find it in the import package?) Where does it go? the editor folder in the assets?
    Do I need to delete all of the DarkTonic before re-importing? I did not.
    Dumb. The scenes run but Unity crashes on stop or pause. (That may be unrelated to your app).
    It's late and I may not send you anything until tomorrow.
    This is really scary here right now, so Thank you so much for your quick responses and concern.
    Really great.
    Nick in LosAngeles, Ca
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,110
    That folder is in the package on the Asset Store. You don't need to do anything other than make sure it's imported. A couple people have been somehow missing it after import. I don't know how that happens. Yes, please delete the Master Audio and the DarkTonic folder completely, then re-import. Hopefully that will solve your issues. This is sometimes necessary because the importer will not put files in new locations and update them in the old locations instead if you do not. This would be a problem only when we change folder organization, which we did recently to save room in builds.
     
unityunity