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.5.3.2 will be live in 20 minutes. Fixed the performance problems.

    • Performance increase of about 94% on the very first sound effect played!
    • Huge Performance increase when refilling randomized pools.
    • Fixed bug in Sound Group Variation with lazy load parameter.
     
  2. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    1. Create a MasterAudio
    2. Drag an audio clip to create group.
    3. Click on the speaker to listen to the sound effect.

    ArgumentOutOfRangeException: Argument is out of range.

    Version: 3.5.3.2 (May 03, 2014)

    If you click on the child hierarchy speaker, it will fix itself.
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I can reproduce the error on my machine. I'll see if I can get a fix this weekend. Thank you for reporting this and figuring out the repro steps :)
     
    Last edited: May 4, 2014
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I've fixed this. I don't think this fix alone warrants a new version though. This will be in the next version.
     
  5. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    Thanks, I have another question.

    I have created a custom event for a jump sound and I have turned off the Show 3D Gizmo as I don't wish to see it.

    I then play my test scene and are using the scene editor window to view and debug. As soon as a custom event is triggered the 3D Gizmo is displaying again, but it is not enabled. This is a bug, otherwise please explain. Thanks!
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Do you have another EventSounds game object set up to receive the custom event? If so, does that one have Gizmos turned off?
     
  7. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    My fault, I was seeing "Show Variation Gizmos" and have turned it off now. Thanks!
     
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No problem. Ping us with any other questions or suggestions!
     
  9. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    Why does the MasterAudio request the scene to be saved when all I do is click on it? This doesn't seem to happen when I click on other objects. Thanks!

    You have also named your file BoostrapperDemoScene, I'm guessing this is a typo.
     
    Last edited: May 5, 2014
  10. Froman

    Froman

    Joined:
    May 5, 2014
    Posts:
    1
    Hi all,

    I have updated to MasterAudio 3.5.1 and I have one big problem:

    If I have a custom fading in a sound group, the group master volume and variation volume doesn´t works. Always plays at maximun volume.

    What can I do? Someone with the same problem?

    Thanks!
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's because the Inspector saves changes to the underlying MonoBehavior even if you made no changes, which was necessary because it couldn't detect certain changes. Very annoying I agree, but it couldn't be helped. I'll fix the typo, thanks!
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V3.5.3.3 will be live in 20 minutes. Just a couple fixes this time:

    • Fixed bug where trying to preview a new Sound Group in Master Audio prefab generated an error.
    • Fixed bug where having a custom fade in or fade out time for a Variation would ignore the Sound Group Volume and use full volume.
     
  13. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    This problem is fixed in the version I just submitted, live in 20 minutes. The bug was introduced recently by some resource file loading code.
     
  14. Pedro-Alaiagames

    Pedro-Alaiagames

    Joined:
    Apr 15, 2014
    Posts:
    28
    Hello:

    Im a new user of Master Audio. Im learning how to use it. I´ve got a simple question ( I hope ... ).

    I need that the audio source of a group follow the main character transform. I have the foot steps sounds in variations of a group. But i dont know how to make that the group follows the charcater.

    What is the proper way to do that?, I didnt found anything about that in the documentation. Ive been looking for something about that in this threat... but nothing ... except some lines in de 7 page.

    Sorry about my English. And thanks for your help.

    Pedro.
    Alaiagames. com
     
    Last edited: May 6, 2014
  15. Pedro-Alaiagames

    Pedro-Alaiagames

    Joined:
    Apr 15, 2014
    Posts:
    28
    Ive solved the problem... but Idont know if this is the prorper way to do it.

    I use events in the kinetic walk animation to trigger a function every time the foot hits the floor. And I play the sounds of the group with this function:

    void PlayerStepSoundPlay()
    {
    MasterAudio.PlaySound3DAtTransform("PlayerFootSteps", transform);

    }

    I dont know if this can help someone....

    Pedro.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    PlaySound3DAtTransform is good for short sounds that don't loop. If you need it to "follow" a transform, use PlaySound3DFollowTransform instead.

    Thanks!
     
  17. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    How do I make a countdown timer based on the active track time?

    I have a music track that is 120 seconds long and I want a 300 count down to sync with this. How do I achieve this or what functions do I need to help me do this? Thank you.
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    This is doable. I'll put some code here tonight that will do it.
     
  19. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    Thanks, I just want to make this question a bit clearer as I'm another one of them newcomers.

    Originally I thought I wanted to have a 120 second track sync to a 200 timer, but I have notice other games just loop the track instead.

    What I am trying to achieve:
    I have 20 levels each with a unique music track and a speed up track.
    During the first 200 gameplay seconds the normal track will loop and then the speed up track will play the remaining 100 seconds.

    Obviously I'm not sure how to do this yet and would appreciate any help.
    I'm also not sure if I need to add all of the tracks to a single playlist or have separate playliist controller for each level?
    I don't get what the bus is for or if I need it?
    I was wondering if I need to fade between the 2 tracks as the normal track will have looped, but I wasn't sure how?
    I saw the DynamicSoundGroupCreator, but I no idea if that would be needed for a platform game or if I should sick with using the master audio approach?

    At the moment I'm running a bootstrap with the master audio, playliist controller and game manager and have a few SFXs going. Hopefully I'm not repeating every other newcomer question on here, as I can't find the info to put the pieces together.

    Thanks
     
    Last edited: May 7, 2014
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The buses are for SFX, not soundtrack stuff. The bus is for being able to adjust the volume or mute / solo of several Sound Groups at once. Like you could assign 5 different characters' dialog clips to a Dialog bus, then adjust ALL dialog down in volume or mute it with the bus controls (or limit the number of voices that can play through the bus). That's all it does, pretty basic.

    Dynamic Sound Group Creator is for creating per-Scene SFX and playlists when you're using a persistant Master Audio prefab. If you don't use a lot of SFX and can just set them up in the Master Audio prefab and have it carry them through every Scene, then you don't need it.

    You should use one Playlist with multiple songs. Multiple Playlists are used when you want to use different song transition types (or crossfade times) for different groups of songs. We don't need that in our games. We just use a single Playlist. If you want to fade between the two tracks, it will use the crossfade time setting, which is initially set at 1 second, on the Master Audio prefab's Inspector up top. It will automatically "just work" and cross fade between the different songs you play in the Playlist.

    If you are going to loop your songs, you will need to tell the Playlist Controller at some point to change songs (auto-advance isn't used when a song loops). So it sounds like you won't need code to detect the amount of time left on your song, because you're going to loop them. If you have any other questions, let me know!

    Also, if you would prefer to post questions on our support forum, it's here: http://darktonic.freeforums.net/
     
    Last edited: May 7, 2014
  21. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    Thank you for the detailed reply, most helpful.

    I would prefer to carry on posting here, as I'm searching though the Unity forum questions when stuck. :)

    Say I don't want to loop or auto advance my track, I noticed that if you have loop and auto advanced clips turned off, press play, listen to the track and then click off Unity and back the sound track has stop playing. Is this a bug?
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds like a bug. I'm not sure what you mean by a couple of those steps though. If you have loop and auto advance turned off, it should play the song until it's over, and then play no other song, regardless of what you click on (except buttons in the Jukebox).
     
  23. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    Yes correct, the bug happens when Unity is inactive (OS Timeslicing), meaning the game audio is playing, I then go and click on another application (e.g notepad, desktop) and go back and no music is playing.
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, I'll see if I can reproduce this tonight.
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No, I couldn't reproduce this at all. Switching to another app, the music keeps playing. Then I go back to Unity, nothing changes. Music still playing.
     
  26. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Quick question:

    I know that MasterAudio.PlaylistMasterVolume will change the music volume, and it looks like MasterAudio.MasterVolumeLevel will change everything else, which is cool. Is there a way to implement an overall master volume for both sound fx and music like you see in most games (relative to the separate music and sound fx levels)?

    EDIT: wait, I suppose I can just set the normal AudioListener.volume, right?
     
    Last edited: May 8, 2014
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I don't think AudioListener has a volume. I don't see anything in the intelli-sense.

    There's already 4 layers of volume control for SFX and 3 for playlists, so I'm reluctant to add yet another layer on top of both. Normally that I've seen, games let you adjust the music volume and SFX volume separately. You could of course set both properties from a single slider with a couple lines of code if you want to use one slider.

    However, unless you have PlaylistMasterVolume at full (same goes for MasterVolumeLevel), you would need to hard-code the upper-limit in your volume setting code if you don't want players to exceed that level you have set.
     
    Last edited: May 8, 2014
  28. cloudcamaleoniv

    cloudcamaleoniv

    Joined:
    May 17, 2013
    Posts:
    57
    Sorry for the HUGE delay in my reply. So, the game runs a little slower in the Android device, but I noticed that this also happens on the PC, and it normally does when Time.timeScale = 0. Yeah, I've said normally. I've noticed these days that it also happens during the game, when timeScale != 0, but it's VERY rare. Only happened once (and I test this game A LOT)

    Anyway, the problems only occurs when the frame rate drops down EXACTLY when the song is about to loop.

    Changing "FRAMES_EARLY_TO_TRIGGER" to 5 made the problem rarer, but sadly, it still happening.
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Unfortunately there isn't really a fix for this aside from continuing to increase that constant, until I can redo the playlist controller with PlayScheduled, which is fairly tricky. Until then I'd suggest you use a short cross fade so at least the bug doesn't kill you.
     
  30. moopi

    moopi

    Joined:
    Apr 24, 2012
    Posts:
    39
    Hi!

    I'm having distortion issues with 3D sounds. I have a MasterAudio prefab in the scene with some audio clips attached in one bus. In the scene, I have one object moving around in 3D space. This object has a script, which makes following call:

    MasterAudio.PlaySound3DFollowTransformAndForget("scream",transform);

    Result is that played audio is distorted. It sounds almost like someone is randomly adjusting volume and pitch during the playback time.
    All Master audio and clip settings are defaults. I have only dropped clips in the MasterAudio prefab, set a name for the bus and selected all clips to use same bus. From those included clips, I'm calling just one.

    With Unity's default audio source, same clip and a script which makes a call: audio.Play(), the playback is smooth and clean and the 3D Positioning works correctly.

    Any ideas where the problem may lie? Could there be some issues in the follow transform functionality? Is the audio source position updated for every frame? If not, could it be that the audio source is lagging behind the object which may cause pitch shift or source position jumps.

    Br,
    - Moopi
     
  31. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Often games do have an overall master volume.

    I tried AudioListener.volume and it does work as an overall master volume. It's a static value on AudioListener:
    http://docs.unity3d.com/Documentation/ScriptReference/AudioListener-volume.html

    I guess since MasterAudio is a wrapper over the normal Unity stuff, it works.
     
  32. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    I had this exact problem when I had the AudioListener attached to the object that the sound was following. I set MasterAudio.ListenerID to the instance ID of the object containing my listener and then MasterAudio updates the sound's position at the right time. If you're AudioListener is attached to the sound source, give this a try.
     
  33. moopi

    moopi

    Joined:
    Apr 24, 2012
    Posts:
    39
    Hmmm... Do I need to attach some other audio listener in my scene than the unity default one which is I have attached in main camera?
    And what is MasterAudio.ListenerID and how I should use that?

    In my scene, the object is flying around and the player rotates his head around x and y axis according mouse movement. Main camera is a child of the player game object and it rotates along the player.

    - Moopi
     
  34. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    The ListenerID just gives MasterAudio the instance ID of the listener object so that if a sound is played from that object, it will update them in sync. I don't know if setting will help in your situation but you could try setting it to your player object's GetInstanceID() to see if it helps.
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Try Mike's suggestion. And also this.

    We do not alter the volume or pitch ever, unless you use a custom fade time or random pitch or volume. One other customer had distortion on his sounds. He believes it was caused by using a weird file format. Try a different file format. The follow code executes every 0.1 seconds.

    If you want to try following more frequently, change this line in MasterAudio.cs (line 21).

    Code (csharp):
    1.     public const float INNER_LOOP_CHECK_INTERVAL = .1f;
    Let us know if you figure it out.
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V 3.5.3.4 will be live in 20 minutes. Changelog:

    • Fixed bug where losing focus on the Application would sometimes cause Playlists to stop playing their songs.
    • Fixed bug in Dynamic Sound Group Creator, it now uses OnEnable to create items instead of OnStart. This fixes some Dynamic playlist bugs.
    • Added an optional package to try the free version of Audial Manipulators. This package gives you many FX filter scripts to use on AudioSources, even in Unity Free! Requires Unity V4+.
     
  38. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    I'm curious, how does the free version of Audial Manipulators differ from the paid version?

    Thanks!
    Jacob
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It looks like there's only 3 filters instead of 10, there's no source code (DLL only), and the 3 filters that are included have less controls.
     
  40. artaka

    artaka

    Joined:
    Feb 19, 2013
    Posts:
    128
    Hey Brian,
    Is there a way to list all the clips that are in in a playlist at runtime? Also, is there a way to trigger a clip not by name but by it's index in the playlist?
    Thanks,
     
  41. artaka

    artaka

    Joined:
    Feb 19, 2013
    Posts:
    128
    After digging a bit, I found a way to access the list of clips.

    PlaylistController.InstanceByName("MusicPlaylist").CurrentPlaylist.MusicSettings

    Really great tool Brian!
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Right, you figured it out. Thanks!
     
  43. artaka

    artaka

    Joined:
    Feb 19, 2013
    Posts:
    128
    I have one more issue I can't seem to find a clean solution for. How do I switch from one looping clip to another looping clip in a playlist without interrupting the first one? I'm currently using QueuePlaylistClip, but that turns off looping for the second clip. If I use TriggerPlaylistClip or TriggerNextPlaylistClip, it triggers right away, interrupting the first clip. Is there a way not to turn off looping when queuing? Please advise.
    Thanks,
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You found a bug. Queued clips should have been able to loop. I've fixed it for the next version. If you'd like to fix it in your version before the update comes out, change this entire method in PlaylistController.cs to the following:

    Code (csharp):
    1.   private void PlayFirstQueuedSong()
    2.     {
    3.         if (queuedSongs.Count == 0)
    4.         {
    5.             Debug.LogWarning("There are zero queued songs in PlaylistController '" + this.name + "'. Cannot play first queued song.");
    6.             return;
    7.         }
    8.  
    9.         var oldestQueued = queuedSongs[0];
    10.         queuedSongs.RemoveAt(0); // remove before playing so the queued song can loop.
    11.  
    12.         PlaySong(oldestQueued);
    13.     }
     
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Never mind about the post above. I found another bug that needed to be hotfixed.

    Master Audio V3.5.3.5 will be live in 20 minutes. Changelog:

    • Fixed bug where having an ampersand () in your folder name would make Clip Manager scans fail.
    • Fixed bug where a queued clip for Playlist Controller couldn't be looped.
    • Fixed Dyanamic Sound Group Creator. V3.5.3.4 fixed some and broke others. Now it should work with both persistent and non-persistent Master Audio prefabs.
     
    Last edited: May 12, 2014
  46. artaka

    artaka

    Joined:
    Feb 19, 2013
    Posts:
    128
    That did it! Thank you Brian.. You Rock!
     
  47. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Good to hear! Do check out our support forums here: http://darktonic.freeforums.net/

    It's better for other users if you post questions there since this thread is a monster and not searchable.
     
  48. artaka

    artaka

    Joined:
    Feb 19, 2013
    Posts:
    128
    Thanks for fixing the bug so quickly. I found what maybe another bug (or I'm doing something wrong). I posted the info on http://darktonic.freeforums.net/.
    Thanks,
     
  49. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah, I'll try and get that fixed ASAP. Thank you.
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I've fixed both of these now and the next update will contain the fix. If you want the fix earlier, email us at support@darktonic.com with the PDF of the invoice you purchased the plugin with and I'll Filemail it to you.