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
    Thanks for the replies OnePxl and TekuStudios, I'll check one of those out.
     
  2. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    PlayEditor is a solid tool and includes the source (no DLL). The author comes across as a nice guy too, so you should contact him as well.
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Awesome, that should help a lot.
     
  4. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    Hey Brian, i'm having a weird issue with Looped Chain triggering of variations. if i read the docs correctly isn't looped chain supposed to play all variations either randomly or in top to bottom order each time you trigger? i've got 3.5.5 and it seems to only want to play one sound at a time. i seem to remember using an earlier version -3.3 it think- it would play the variations on a single trigger.

    EDIT - i just tried it out in my earlier version - looks like it was 3.5.0 - and it worked perfectly as expected. so there's something wrong with 3.5.5. i'm going to make a copy of my project and replace that version with the earlier one and see what happens...
     
    Last edited: Oct 4, 2014
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Metaphysician, chained loop groups only play one at a time, that is correct.
     
  6. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    wow - then ver 3.5 was the buggy one? because i just put it in there to my project and now it works like i expected to - meaning it fires off several sounds in succession - not at one time, in succession, until it hits the loop limit or if it's endless, gets turned off.

    from the manual:
    Looped Chain - with a looped chain, the Sound Group becomes something of a mini- Playlist. When you play a Variation, when it reaches the end of the clip, another Variation will be randomly played. It will continue to play random Variations until you stop the Sound Group.

    so in ver 3.5.0 i get behavior like this, but in 3.5.5 it only played one sound per trigger event and stopped. if that's correct behavior then i must be confused. how is that different than the normal non-looped variation method?

    scott
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Are you saying chained loop no longer works? if so, I'll take a look tomorrow after my 18 hour flight.
     
  8. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    yep, i guess i am saying that. certainly seems like it anyway....

    ouch...going to EU i guess? or maybe returning from there? have a good time, or hope you had a good time anyway...
     
  9. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    here's another question/possible bug on Playlists that are set to New Clip from Last Known Position- let's say you have two trigger areas and you create a playlist for each of them. Trigger1 playlist has an intro clip that leads to a loop. Trigger 2 has only one clip that loops. you enter Trigger 1, the playlist plays the intro and switches to the loop. You enter Trigger 2 and music switches and plays the other loop.

    Then you enter Trigger 1 again. Assuming you left the Trigger 1 area while the loop clip was playing (not during intro), shouldn't it play the loop section again when you return? instead it just plays again from the beginning of the playlist (i.e. the intro). This also happens in the second trigger. Seems like it's not keeping track of the position as far as i can tell, and simply triggering the new clip from the beginning.

    EDIT - okay, i realized i had Start Playlist checked when i changed playlists for each trigger, so that could explain why they just retrigger. However when i just use Change Playlist i don't get any change. hmm....

    scott
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Asia actually :) Yeah it was a good time, thanks!
     
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No, I don't believe that's how it works. While you maintain the same playlist, the same leave-off point is used when changing songs. I believe when you change playlists it always starts from song beginning due to a "best practice" bug fix I made a while back. Let me know if that's not the case.
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Huge sale on our other plugin Core GameKit for 80% off through 10/6/2014! $10 is a great price :)
     
  13. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    @jerotas

    I've hit an interesting bug. I've noticed that before but for the first time today I've managed to recreate on will...

    It doesn't seem to affect iOS (not tested Android yet) player but on editor (4.5.4p3 osx), here is how with latest MA (3.5.5.6)

    There is a MA prefab and one playlist controller. Controller has one playlist with two clips, first shorter plays once then moves to 2nd which is looping. Playlist has "Auto advance clips" enabled, so shot clip plays first then moves to looping longer music.

    Normally this works ok but:
    1. Hit Pause on Unity.
    2. Hit Play so it's paused play state.
    3. Click on desktop so Unity looses focus.
    4. Hit Pause to make scene play.

    At that point first clip is playing when the scene is started, but it's not playing the 2nd clip when the first one ends. So I guess auto advance is not working. I've also tried to use event handlers (so when the 1st one stops, my code starts the 2nd one) but behaviour is the same., even is not called at all. Everything else in the scene working as expected.

    If you skip the #3, it works also ok.

    Also, if you add following to above steps:
    5. While scene is still in playing state, click on desktop so Unity looses focus again.
    6. Click on Unity
    7. Event sent and 2n clip starts playing.

    This look harmless, but just thought I'd let u know.
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thanks for reporting the problem. I tried your steps 1-4 and it does auto-advance for me. If you can figure out how to get it to break on my computer I should be able to fix it.
     
  15. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Thanks for the reply. I've just tried this with an empty project, just MA imported and everything @ default. Result is the same. I'm currently uploading repo project & screen cast of the problem using the repo to my DropBox, I'll PM you the links shortly...
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, make sure to give me the exact steps to reproduce.
     
  17. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Thanks! This should work if I only knew how to define my Playlist name in this code.:confused:
    Code gives me an error: cannot call FadePlaylistToVolume without specifying a playlistname when you have more than one Playlist Controller.
    Thanks for your help and time and sorry about this, I'm complete noob coder.
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    So you have more than on Playlist Controller? You're layering music? If so, you need to do this:

    MasterAudio.FadePlaylistToVolume("YourPlaylistControllerName", val, 0f); // replace that string with your Controller name. You don't use the Playlist name, you use the Playlist Controller's name. I've edited that warning to say that now, it was confusing.
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Pro sound guys (and gals) rejoice! I've just added a "show dB for volumes" global switch so you don't have use the 0-1 Unity volume range. This affects all clips, playlists, playlist controllers, sound groups, variations, and everything else if you turn it on! The default is off.

    This will be in the next update later this week.
     
  20. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    YES! I didn't even think this was possible in Unity.
     
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Turns out it's just 2 math calculations (to and from), which one kind user had one their blog to help me out :)
     
  22. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    hey! great asset. I've got some questions for you :)

    1) How different is your Audio System from Unity's native?
    2) How optimized? I checked the youtube video (space shooter) and there were settings when to play the sound (disable,enable,collision). Do you attach a script for this at runtime?
    3) Its performance on mobile devices?
    4) Does your plugin has any performance overhead?

    Thanks :)
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    #1, it is Unity audio. We don't mess with that, we just make many things require minimal effort and "magically work" usually without any code needed to be written. We wrote everything on top of Unity audio.
    #2, extremely optimized. That script is already placed on the game object at edit time and stays during runtime. Since everything is event-based, it doesn't up zero CPU cycles except during when the selected events occur.
    #3, very high performance on mobile due to the extremely low (zero bytes in majority of cases) garbage collection allocations.
    #4, performance overhead is super low. Most things are event based. If you assign custom fades and "following" sounds, there's another script per sound that activates during when its used, then deactivates. So there are no extra scripts during Update method or anything like that.
     
  24. ConfirmCrit

    ConfirmCrit

    Joined:
    Nov 26, 2013
    Posts:
    7
    I've got a unique little problem, and I'm wondering if your asset can solve it.

    I have a background song playing in my game, and I want an additionally layer of the song to play only when the player is near an enemy (imagine the melody of a song only playing when within X of the enemy, for example) The main problem I'm running into is the best way to play an audio file at the same time stamp the background music is on. I tried simply making the enemy a sound source, tinkering with levels of volume different ways, 3d sound or not, etc, and no dice. It either sounded too hitchy, or just sometimes wouldn't trigger. (Multiple enemies spawn at different times, adding to the issue).

    The closest solution I've come is creating a global component that the enemies grab when they spawn, but it was inconsistent.

    Think your asset will help?
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah, sounds pretty simple to do with Master Audio. You can have any number of synchronized Playlist Controllers, each with their own Playlist. Then you just need to make the volume of the melody one fade in and out based on a trigger or other logic. Definitely doable!
     
  26. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    I know it's ready for it, but does you system supports all the new features of Unity 5? We want to reduce our port time when the final version of Unity 5 gets out, but I want to be sure I won't be missing out on any of the new features. Thanks!
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    We haven't added anything to automate the new Unity 5 mixer controls or anything like that (it's on our roadmap though). Master Audio doesn't step on any of the new features, so you can feel free to use what you like of the new Unity 5 audio stuff at the same time as Master Audio. I'm not sure if that answers your question?
     
  28. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Hey Jerotas, I just noticed there are new updates for both Master Audio and Core Gamekit, but Asset Store now tells me both extensions requires at least Unity 4.5.3 and 4.5.4 for me to upgrade! What's going on? I thought MA and CGK are still 3.5.7 compatible right?
     
  29. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Yes, that was exactly what I was looking for and now it works! Thank you!!
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes, they still are. I'll have to resubmit both tonight to fix that. Thanks!
     
  31. jerotas

    jerotas

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

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    We're back on sale for 50% off for a limited time, for anyone who missed the sale yesterday!
     
  33. jerotas

    jerotas

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

    • Removed option "Fast GUI Refresh" since it's not needed anymore after some changes we made recently to make the refresh more consistent.
    • Bug fixed: Chain Loop mode wasn't working at all, only played one sound and stopped.
    • Bug fixed: Top-to-bottom should play in the same order they show in Hierarchy (not auto-alphabetize).
    • Bug fixed: Load Resources Async controls weren't showing up for Unity 4.5.4.
    • Bug fixed: Calling MasterAudio.StartPlaylist with a single parameter caused a StackOverflow error.
    • Added Global Settings section in Master Audio Manager window. Its only option is "Display dB For Volumes". By default that setting is off. If you turn it on, all volume sliders in Master Audio will be displayed as decibels instead of between 0 and 1.
    • Removed AudioUpdater.cs from the plugin. It's no longer needed since 3.5.5.
     
  34. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Hi jerotas, nice so far, however UseDbScaleForVolume() is causing an error during compile due to the line UnityEditor dot etc. Is it something on my side? If I comment out bits of those function using #if UNITY_EDITOR compile works. Cheers.
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    edit - ok I see the error when building. Will find a fix.
     
    Last edited: Oct 8, 2014
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, fixed, but I had to use PlayerPrefs instead. Change that method in Master Audio to this:

    Code (csharp):
    1.  
    2. public static bool UseDbScaleForVolume {
    3.     get {
    4.        if (!PlayerPrefs.HasKey(USE_DB_KEY)) {
    5.           PlayerPrefs.SetInt(USE_DB_KEY, 0);
    6.        }
    7.  
    8.        return PlayerPrefs.GetInt(USE_DB_KEY) > 0;
    9.     }
    10.     set {
    11.         PlayerPrefs.SetInt(USE_DB_KEY, value ? 1 : 0);
    12.     }
    13. }
    14.  
    15.  
    The next update will have this fix.
     
    Last edited: Oct 8, 2014
    srmojuze likes this.
  37. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Hey Brian - I've had intermittent nullrefs come up when calling MasterAudio.GetVariationLength - in particular the List.Find using an anonymous delegate hits a null somewhere in the list of variations and dies. I was unable to figure out what was null. However, this code below avoids the nullref given the same data. Not sure what the difference is. Maybe worth a look?

    Code (CSharp):
    1.  
    2. //var match = grp.groupVariations.Find(delegate(SoundGroupVariation obj) {
    3. //return obj.name == variationName;
    4. //});
    5.  
    6. //BIT - monkeypatch to workaround nullref that I couldn't solve
    7. SoundGroupVariation match = null;
    8. foreach (SoundGroupVariation sgv in grp.groupVariations)
    9. {
    10.      if (sgv.name == variationName)
    11.      {
    12.          match = sgv;
    13.      }
    14. }
     
    Last edited: Oct 8, 2014
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm not sure how you got that error either. Doesn't look possible. I've replace the code with what you suggested and it will be in the next update.
     
  39. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Sweet, compiles fine now with that code. Cheers.
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Any time.
     
  41. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Hi all, I would like to share, here's a demo of MojuMusic™:
    http://mojuze.com/assets_mojumusic_demo.php

    This is music I will make and list on Asset Store (.wav files) ...Here is the Beta Demo using MasterAudio asset (no Synkro(yet)) ..Let me know your thoughts and suggestions :)

     
  42. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    @jerotas

    I've just switched my project back to android and I'm receiving this on console "error CS1501: No overload for method `ReceiveEvent' takes `1' arguments", I'm pretty sure it wasn't there before.

    The line causes the error ".GetComponent<EventSounds> ().ReceiveEvent("Close")", I have a custom event "Close" defined in MA.

    That's on 3.5.5.6.
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Correct, when we added the distance modes for Custom Events recently, the Receive Event method changed. Now you must add the 2nd parameter of Vector3 for originPoint.

    So you'll probably need:

    .GetComponent<EventSounds> ().ReceiveEvent("Close", transform.position);
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That is pretty cool, well done! Yes we would like to see more Synkro there for sure.
     
    srmojuze likes this.
  45. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Thanks, as the sound is GUI sound should I just use Vector3.zero?
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Either that or make the sound 2D so it doesn't matter where you play it.
     
  47. jerotas

    jerotas

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

    • Fixed bug where Distance Priority caused console errors for Groups with Variations of weight > 1.
    • Fixed intermittent bug on GetVariationLength.
    • Fixed bug where playing more than 1 of the same Variation by name wouldn't actually play 2, but only 1.
    • Fixed bug where Playlist songs wouldn't load on Unity 4.5.4
    • Fixed bug: Removed alpha-sorting of Variations on Group Inspector. Now they appear in the same order as Hierarchy.
    • Changed dB setting to use PlayerPrefs instead of EditorPrefs because you couldn't make a build with EditorPrefs unfortunately.
    • Added arrow and buttons to expand / collapse Variations in the Group's Inspector. This lets you preview / view all Variations without having to scroll up & down.
    • Added "Clone Variation" icon button in Sound Group's Inspector to quickly create multiple copies of a Variation with all settings cloned, including adding a number to the end of the name of the clone.
    • Added checkboxes to each Variation in Sound Group's Inspector when Copy Settings is expanded so you can choose which target Variations to copy to, instead of copying to all. Checked rows turn blue and the source Variation row has a yellow "SOURCE" label so you know why there isn't a checkbox.
    • Added buttons for Check All and Uncheck All in Sound Group's Inspector Copy Settings section.
    • Changed the default Sound Spawn Mode of EventSounds to Attach To Caller instead of Caller Location. This shouldn't change any already existing EventSounds components, only new ones.
    • Added a section in Playlist Controller's Inspector for you to specify an optional Custom Event to fire whenever a Song Changes or Ends. This allows you to set up a custom event receiver to play a "stinger" sound when the music changes or anything else you want to do, without writing any code.
    • Added a checkbox in Advanced Settings of Master Audio to Log Custom Events. This will log to the console whenever a Custom Event is fired. This can help you figure out what script is firing the custom event if you don't know.
     
  48. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Cheers. Yes I think my first release of .wav files to Asset Store will have full song, song section, and some* synkro clips. Gonna be a long "musical" weekend I think. :p

    *(I have to be careful that I don't simply resell the individual royalty-free samples I use to create the songs)
     
    Last edited: Oct 10, 2014
  49. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Will be awesome! Let us know if you'd like us to consider including some short "sample" clips of your music in our product.
     
    srmojuze likes this.
  50. dizzywhip

    dizzywhip

    Joined:
    Mar 17, 2014
    Posts:
    6
    Just bought this, it looks really great, but moving the assets into a subfolder seems to cause everything to break. Opening up the Master Audio Manager window generates a bunch of errors because it can't find the editor resources.

    I have a Packages directory where I keep all of my installed packages in their own folders, like Assets/Packages/MasterAudio for example. My project would be a huge mess if I didn't do this!

    Is there no way for the package to load resources using a relative path? If not, is there some way to configure MasterAudio with a universal prefix for all of the paths that it uses? I looked through the thread and found MasterAudioFolderPath in MasterAudio.cs and also did a text search for "Assets" to find a few other hard-coded paths, but changing those didn't seem to help.