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. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    Thank you for the explanation. I got myself into a bit of a mess with the various fade functions and volume sliders to the point where I wasn't sure any longer what was authoritative. That helps clear it up quite a bit. Thanks again.
     
    jerotas likes this.
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No problem.
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The brand new Master Audio online documentation website is up!

    http://bit.ly/1F8fxpb

    The next update will have dozens of context-sensitive help buttons linking to the corresponding page or page of page. The readme has been reduced to a mere 2 pages!
     
  4. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    Unfortunately that's a unnecessary overhead for client/server projects. Will MasterAudio still work if we move the folder back to the Asset root?
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It will work, but you'll need to update the installation path on the Master Audio Manager window if you move it at all.

    Please explain why it's unnecessary overhead. Not sure I understand. A lot of our customers were already performing this move manually. We're saving them time by making it the default.
     
    Last edited: Sep 14, 2015
  6. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    Usually we only add native .dll's to the plugins folder, as they are added to the build automatically. I'm not sure how unity handles other files types (e.g. prefabs). But for example it wouldn't make sense to auto-load audio files to a server build.

    Also when reading http://docs.unity3d.com/Manual/SpecialFolders.html it just doesn't feel right to add a whole addon there. Imho it would be better to keep MasterAudio in the Asset root and create something like a performance guide teaching the devs how to move MA to the plugins folder, but I would benchmark the results first, I don't think that will speed up things at runtime.
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    The impetus for moving it into Plugins was that it was a repeated request for "all plugins" on several Asset Store guideline suggestion threads. I own several plugins that do the same thing (entire plugin in Plugins folder). The description of the Plugins folder at that link is only one possible use of many.

    There's no reason to put audio files in Plugins. Those can go in your own folders elsewhere.

    Compilation time is definitely way improved with the scripts in Plugins, I already tested that. At runtime, no, it affects nothing.
     
    Last edited: Sep 14, 2015
  8. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I cannot create builds anymore after upgrading.

    Tons of errors :

    Code (csharp):
    1.  
    2. Assets/Plugins/DarkTonic/MasterAudio/Editor/AudioEventInspector.cs(3,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    3. Assets/Plugins/DarkTonic/MasterAudio/Editor/ButtonClickerInspector.cs(2,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    4. Assets/Plugins/DarkTonic/MasterAudio/Editor/ButtonClickerInspector.cs(2,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    5.  
    Among others. Any advice?
     
    Ony likes this.
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    This is a mistake on my part. Sorry about that.

    You must make some new folders so the Plugins/DarkTonic/Editor folder is in: Plugins/Editor/DarkTonic/MasterAudio folder. Then it will compile. The version I'm submitting tonight will have this fix.

    Editor folder should be directly under Plugins, not 2 folders deeper.
     
    Ony likes this.
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V 3.5.8.6 has been submitted. Changelog:

    • Fixed compile problem: Moved editor folder to Plugins/Editor/DarkTonic/MasterAudio
    • Fixed bug: Resource files were not unloaded from Playlist Controllers when the game object was destroyed by a Scene changing.
    • Fixed bug: Footstep Sounds script logged errors to Console when no Master Audio prefab in Scene.
    • Added new API methods for "StopLoopingCurrentSong". This does the same as QueuePlaylistClip, but without having to queue a clip. So it will turn loop off for the current playing song and play the next song in the Playlist when done.
    • Added StopLoopingCurrentSong to EventSounds Playlist control so you can do it without writing any code.
    • Anywhere a Sound Group dropdown appears, added a button to go to that Sound Group and edit it.
    • Gizmos now default to off for EventSounds and only show for actively playing Variations instead of all.
    • Added "Filter Out Inactive" checkbox during Runtime on the mixer. Enabling this will hide all Sound Groups with zero voices playing. Good for investigative audio work.
     
    Ony likes this.
  11. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    That "suggestion" implies it would be the best to move all project files to the plugin folder. Don't get me wrong on this, I was always happy to see the structured code and active development of MA, but this one is going in the wrong direction and would be a reason to ditch MA for future projects, at least for client/server ones where every used MB in memory counts.

    Moving the editor folder to the plugins root is one more thing to fiddle around when using MA now.

    I don't own a single one which isn't a native .dll.
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    So far you're the only one who has voiced dislike for the change, whereas I've received more than a few "likes". And there's a simple way to move the files to wherever you like, so it should be a non-issue.

    I'm not sure why you believe that MB memory count is affected though. If you have still have issue, please email us privately to continue the conversation.
     
  13. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    Having a few problems with gapless transitions and I was wondering if you have any tips. I don't seem to be able to get it to work properly. It seems like gapless still pays attention to the master crossfade time. Is that expected? I had it set to the default of 1 and couldn't tell much difference between gapless on and off. If I set the master crossfade time to zero, I don't hear crossfading but I do hear a slight gap between the music tracks. For reference I'm using resource files, I haven't checked any of the fade in / out boxes, transition type is new clip from beginning, and I'm on MA v3.5.8.3 and Unity 4.6.1f free version. Thanks!
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Occasionally gapless will play the next track slightly late or slightly early (about 1/4 of the time on my testing), due to floating point math inconsistencies, which is unfortunately unavoidable (there's a thread in the Unity audio forum investigating this). If you're using crossfading, you don't need to turn on gapless though. Normally people either use gapless OR crossfading, not both at the same time. Indeed they won't both fire if both are enabled.
     
  15. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    Right, I only want gapless. Is there a way to explicitly disable crossfading and only rely on gapless? I assumed all I had to do was check the gapless box, but it seems to still be relying on the crossfade value. The only options on the tracks themselves seem to be 'use master setting' or 'override'.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah, you set crossfading to zero.
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Here's the thread on the issue: http://forum.unity3d.com/threads/wh...always-slightly-different-every-frame.354579/

    Currently no solution has been identified.
     
  18. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    Thanks for the info. I'll do some more experimenting and see what happens.
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I will try to make alternate gapless code that *should work* for "new song from beginning" only in the next update or 2.
     
  20. pea

    pea

    Joined:
    Oct 29, 2013
    Posts:
    98
    I'm experiencing a wee problem updating to the latest version. I moved DarkTonic to the Plugins folder and reverted the installation path. All working well, except when I do a non-development build (for Android) I get:

    Code (CSharp):
    1. Assets/Plugins/DarkTonic/MasterAudio/Editor/AudioEventInspector.cs(3,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    It happens for all the files that are in the Editor subfolder of MasterAudio. Seeing how they are inside the Editor folder they shouldn't be included in the build, but they are for some reason.

    When I move the DarkTonic folder back out of the Plugins folder it all builds fine. Anything I'm doing wrong?
     
  21. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    Answered a few posts up...
     
    pea and jerotas like this.
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ony is right. The latest version, when live (submitted yesterday) will have this fix.
     
    Ony and pea like this.
  23. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    "Window -> Master Audio > Master Audio Manager"


    Just in case anyone has a hard time finding it.

    Although I think it should probably say 'click Update' instead of 'click Revert' (?)
     
    Last edited: Sep 16, 2015
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Depends on if you already moved the folder or not which button you click. Thanks!
     
  25. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Hi,
    I bought this a long time ago, and I am finally to the point where I must think at music and sfx.
    Does this plugin handle scheduling of sounds? I have some effect that need to be in sync with the graphics and timed at a certain pace so I would like to schedule them in advance.
    Can I do it with MasterAudio and maybe even get notified when the audio I scheduled is playing?
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can tell each sound effect to play X seconds later, so yes.

    You can't get notified when it starts playing (there's not an event for that), but you can get notified when it finishes playing, if that's of any use. However, you could probably use a CoRoutine for that if you need it.
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Announcement!

    Dark Tonic is now available to provide training in our Plugins Master Audio & Core GameKit. We can set up an online session or in-person depending on location of your team and other logistics. Rates depend on number of attendees. Contact us at support@darktonic.com for more details!
     
  28. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Hi @jerotas,

    I'm encountering an issue with MasterAudio, where I want to fade out a sound and then fade in back to the original volume I set via the Editor. Problem is, I can find a SoundGroupVariation.OriginalPitch property, but not an OriginalVolume one. Any hint on how I can get it?
     
  29. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    P.S. Also, is there a way to now the sType of the currently playing variation?

    EDIT
    P.P.S. (sorry for all the question) And what if I want to know if a sound is playing (using its sType), plus the volume at which it's playing?
     
    Last edited: Oct 3, 2015
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Didn't exist. I've added OriginalVolume property now. This will be in the next update.
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    First question: that's not stored in the Variation, because it's actually the name of the parent game object. So this would get it if you had a variable "var" which is a Variation:

    Code (csharp):
    1.  
    2. var sType=var.ParentGroup.GameObjectName;
    3.  
    But I've now added "SoundGroupName" property to the Variation for the next update.

    I'll come back and answer the other question when I have a free moment.
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    There's a couple things that may help you out here.
    Code (csharp):
    1.  
    2. MasterAudio.GetAllPlayingVariationsInBus("bus name");
    3.  
    Only useful for stuff in a certain bus.

    Code (csharp):
    1.  
    2.   if (MasterAudio.GrabGroup("Death").ActiveVoices > 0)
    3.   {
    4.   // group has one or more Variations playing
    5.   }
    6.  
    Maybe you'll want me to add MasterAudio.GetPlayingVariationsInGroup("group name")?

    However, you'll need to note that each Group has its own volume and each Variation can play at a separate Variation volume. So asking the volume it's playing at? I'm not sure what you're asking. Which one do you want?
     
  33. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    What's the best way to have music continue playing in my "game" scene even when I reload the scene, but also to have a different song loop in my "menu" scene.

    Is it best to just make the master audio prefab persistent, which makes the playlist persistent?
    So i'd have my single master audio prefab first appear in my "menu" scene, I will have event script trigger my menu song which is set to loop forever.
    When i start my "game" scene, every time the "game" scene starts and event script triggers the game music which also loops forever, so if i was previously in my "menu" scene then the game music starts, but if i was already in my "game" scene and am just reloading it, then triggering the game music does nothing.

    Is this the correct approach?
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds correct, but I think the "game" scene's music will probably start from the beginning of the song each time you reload the Scene. Try it and see. If this is the case, you will need to add code to check the currently playing song (if any) before telling it to play the song. This of course means you won't be using EventSounds for this.
     
  35. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    is there any way to do have persistent music without any coding?
     
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Not in the particular scenario you want (without restarting the current song when reloading same Scene).
     
  37. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    84
    Can I somehow know (get an event) when a song from playlist has finished playing?
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes.
    Code (csharp):
    1.  
    2. PlaylistController.Instances[0].SongEnded+=delegate(stringsongName)
    3. {
    4.      // do something
    5. };
    6.  
    7.  
     
  39. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    84
    Thanks - trying this now.
     
  40. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    84
    Thank you - this works fine!
     
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No problem Demanuele.
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Master Audio V 3.5.8.7 has been submitted. Changelog:

    • Fixed bug: Localized Resource Files didn't work properly when added in Dynamic Sound Group Creators.
    • Fixed bug with "playing / not playing" indicator when using Resource files.
    • Fixed bug with "input stealing" in EventSounds.
    • Fixed bug where Duck Groups set up in Dynamic SGC's would not show in the Master Audio Inspector at runtime.
    • Fixed bug where Custom Events configured in the individual songs in a Playlist would fire even when disabled in the UI.
    • Fixed bug where next song would be scheduled even when current song is set to loop, when Gapless Song Transitions is turned on.
    • Fixed excessive logging to the Console window when no Master Audio game object exists in the Scene and Dynamic Sound Group Creator or Playlist Controller game objects try to initialize. Now there's a single error logged to the Console.
    • AudioUndoHelper moved into the DarkTonic.MasterAudio namespace.
    • Added "unduck time" (seconds) to each Duck Group. The default is 1 second. This controls how long it takes the music to completely unduck after unducking begins. Note that it used to always take until the clip finished playing to finish unducking, so you may need to adjust the new setting in Duck Groups if you don't like the default of 1 second.
    • Added "volume multiplier" to each Duck Group. The default is .5. This allows you to have a different multiplier for each Sound Group.
    • Added OriginalVolume property to Variations. Retains the volume you set in the editor before hitting play.
    • Added SoundGroupName property to Variations.
    • Added "Force to 2D" checkbox for buses. This is useful because now you can make a "2D / UI bus" for all 2D sounds and leave the Mixer's Spatial Blend Rule at "Force to 3D". So whenever you create new UI sounds, just assign them to your 2D bus!
    • Added button to clone a song in a Playlist, including all settings.
     
  43. vicenterusso

    vicenterusso

    Joined:
    Jan 8, 2013
    Posts:
    130
    I have 2 persist PlaylistController

    PlaylistController -> used for main musics (variable _playList)
    PlaylistLoadingChime -> used only one time on mainscreen for a specific sound effect (8 seconds length, variable _playListLoading)
    When I hit the InGame scene both playlists are still fading out. I use something like _playList.StartPlaylist("InGame"); after InGame starts but nothing happens.

    If I change to _playListLoading.StartPlaylist("InGame") it works, but I had to fadeOut the volume of _playList.

    So what I'm doing wrong?

    Edit: Ok I have found the problem. Gapless switch was ON (I dont know why it work unchecked though)

     
    Last edited: Nov 2, 2015
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm not clear at all what the problem is or what you were trying to do. I do however wonder why you're using a Playlist Controller to play sound effects. Why not just use Sound Groups as they are intended?
     
  45. vicenterusso

    vicenterusso

    Joined:
    Jan 8, 2013
    Posts:
    130
    Well it's a 8 seconds lenght sound that plays only ONE time on mainscreen, so having it loaded in memory seems unnecessary. Anyway, found out that I can load sfx from resources folder and changed to Sound Groups.

    But the question remains: how the gapless switch button relates to the problem? My music has 64 secs. When I changed (using EventsSound/ChangePlayList) it fades and stops for exact 64 seconds, THEN it plays normally.
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If you would like to send me an example project that demonstrates this bug, I can take a look. Thank you.
     
  47. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Hey Brian -

    I'm seeing a bug that should be easy to repro.

    Take a sound group in the main masteraudio and call GetVariationLength on a variation. Should come back fine.
    Now move that group to a dynamic sound group creator prefab with the organizer. Attempt the same GetVariationLength.

    In this case I'm getting "Could not find variation <variation name>". When looking in the debugger, at that point there appear to be 0 variations in the sound group, though they are there in the inspector. Can you please try to repro? This is a workflow bummer.

    We're on MA 3.5.8.6. If this sounds like something that's fixed in an update, plase let me know.

    Thanks for the solid support.

    Ben
    Frame Interactive
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Send me (or paste) your code that's calling GetVariationLength please and I'll take a look. If it fires too early for instance I don't expect it to work.
     
  49. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    Not sure what you mean. I am calling this:

    public float GetVOLength(string VOName)
    {
    return (MasterAudio.GetVariationLength("VO", VOName));
    }

    Several seconds after everything is loaded. It's not like an Awake/Start race condition scenario in my view.
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Right, I means is that code firing after the Dynamic SGC has populated into the MA prefab for sure? How would you be sure?