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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[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. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Voices?
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    It's called weight because originally we were only using it for random probability of multiple variations (which it's still used for as well). Weight is definitely the correct word for that usage.

    Maybe we should call it "Weight (Voices)"?
     
  3. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Okay, so it is either a probability weight, or the number of voices? And depending on what factor? Because if it's either/or and depends on one other setting, you could show "weight" if that other setting is on, and "voices" if that setting is off. (Or "weight/voices"…)
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    It's both, all the time. Dual purpose setting.

    We'll probably go with Voices (Weight)
     
  5. MikeTon

    MikeTon

    Joined:
    Jan 10, 2013
    Posts:
    57
    Hey Jerotas,

    I'm getting this error when I have Master Audio and Core Game Kit in the same project:

    screen-capture-6.jpg

    Assets/DarkTonic/Editor/UndoHelper.cs(11,21): error CS0101: The namespace `global::' already contains a definition for `UndoHelper'

    There appears to be a clash between the UndoHelper.cs files...any thoughts on how to resolve?

    Thanks.

    -Mike
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    They are *supposed to* go to the same folder and are in fact the exact same file. It looks like Unity tried to be smart and keep both by renaming one. Go ahead and delete the "UndoHelper 1"
     
  7. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    I get this error every time I start:
    Playlist Controller is not initialized yet. It must call its own Awake & Start method before any other methods are called. If you have a script with an Awake or Start event that needs to call it, make sure PlaylistController.cs is set to execute first (Script Execution Order window in Unity).

    This is happening from MasterAudio.Awake() when it calls PersistenAudioSettings.RestoreMasterSettings() which calls PlaylistController.UpdateMasterVolume(). UpdateMasterVolume() now checks if ControllerIsReady first. Removing this check entirely gets rid of the error and everything seems to work properly.
     
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    That was fixed a version or two ago. Please update to the very latest.
     
    mbreitkreutz likes this.
  9. MikeTon

    MikeTon

    Joined:
    Jan 10, 2013
    Posts:
    57
    They don't look like the same exact file...and I got them to work in an isolated directory...but it appears to matter whether core game kit or core audio is imported first.
    Okay...but now I'm getting this:

    screen-capture-4.jpg
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    They are the exact same file. I don't know what you mean by "isolated directory" but that may be causing the new problems actually.

    That's a whole lot of errors. Go ahead and delete everything under "Assets/DarkTonic" (both plugins) and reimport both again.

    You really should be deleting the plugin folder before importing a new version, every time. If you get two of UndoHelper, I can't do anything about it (Asset Store import problem) so just delete one of them - likely the one with a funky name like "UndoHelper 1"

    I've reproduced the problem, and I think it's new behavior for Unity 5. In the next update of Master Audio, I will change the filename of UndoHelper so they aren't the same.
     
    Last edited: Mar 20, 2015
  11. unitywlp

    unitywlp

    Joined:
    Jan 3, 2014
    Posts:
    146
    Hi i was using multiple cameras in my scene i want to play audio when i switch from one camera to other camera i was not able to play audio can you pls suggest me any solution i have tested on sample scene when i try on main scene it will not work
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    There's only 1 Audio Listener component (which is where audio is "listened to") and by default it's located on your main camera object. So when you switch to another camera (and play sounds close to it), the Audio Listener may be too far away to hear any 3D sounds.

    You will either need to move your Audio Listener to the other camera when you switch camera, use 2d sounds, or use a longer max distance on your sounds.
     
  13. Nekotika

    Nekotika

    Joined:
    Jan 31, 2014
    Posts:
    17
    I've seen that in SoundGroupVariationUpdated the update code has been moved from Update() to LateUpdate(), that change means that in my game certain sounds that are spawned at the character position and are marked to follow its transform sounds with an incorrect panning, since the audio listener is at the player feet and the position of the sound and the player is changed in different updates. I cannot use pan level 0 since the same soundgroup is used for enemies, npcs and such.

    Can I simply move all the code from LateUpdate to Update or it will produce problems?
     
  14. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    389
    Hi Brian,

    I have just been looking at usfxr which is really quite cool for creating retro sound effects, and it's open source.

    https://www.assetstore.unity3d.com/en/#!/content/18619

    The only thing is that it does not have any built-in pooling solution, so when developing one has to create an instance of a synth every time.

    So I wondered whether it might somehow be possible to incorporate this within MasterAudio, with the usfxr being another sound type instead of a clip/resource (and perhaps being able to copy/paste the sound string into the inspector)? Then MasterAudio could potentially add a lot of value by creating/caching all the sounds at startup and also by pooling them.

    Sorry if it's off topic, it's just that the idea came into my head ;)

    cheers

    Nalin
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Are you saying it's a problem because your player moves during Update and not FixedUpdate? That should not produce any problems unless I don't understand what you're saying. FixedUpdate fires every frame after Update, according to this: http://answers.unity3d.com/questions/369723/what-is-the-difference-between-update-and-lateupda.html. I'm not sure what that has to do with pan level...

    You are of course free to change it to Update, and of course your change will be overwritten the next time you update Master Audio.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    That's a pretty involved change to make, which is why I haven't found time to do the new sound type of "Asset Bundle" yet.

    I think you should ask the dev of that plugin to add pooling, if it's really needed.
     
  17. mbreitkreutz

    mbreitkreutz

    Joined:
    Dec 4, 2013
    Posts:
    23
    FYI, playing a sound from an Asset Bundle is the same as playing it from Resources or anywhere else in the player. The only caveat is that the Bundle must be present on disk for the sound asset to be accessed. Making sure a Bundle has been downloaded seems beyond the scope of an Audio API. As I've noted in the past, ALL of our audio is stored in Asset Bundles and we have no problem using the normal API and prefabs you provide. Our game handles the concept of patching and downloading Asset Bundles before the bundled assets are ever needed. In the cases where we need sounds during that process, those sounds would be explicitly included in the player so they are always present (in our case, though, this hasn't been necessary).
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Thanks Mike. What I plan on adding is "Asset Bundle" Audio Origin and download all such Variations when Master Audio prefab fires Awake. It would make no sense to download when the sound is requested to play because the latency would be tremendous. Obviously the Variations cannot be played until they've been fully downloaded.

    I think it would be a useful addition but I've never used Asset Bundles.
     
    mbreitkreutz likes this.
  19. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    389
    Thanks for the reply.

    Ok - understood

    N
     
    jerotas likes this.
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Master Audio is on 80% off sale of $10 for the next 48 hours! Tomorrow Core GameKit is also 80% off, and Pool Boss is 80% off as well starting today!!!
     
  21. Async0x42

    Async0x42

    Joined:
    Mar 3, 2015
    Posts:
    104
    Hey, just bought Master Audio and imported the 2D Toolkit files, I guess they haven't been updated to changes in Master Audio yet. MasterAudio.NO_GROUP_NAME needs to be changed to MasterAudio.NoGroupName in the tk2dUISoundItemEditor.cs, if you can update that for future versions!
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Thanks for the heads up, I've fixed it for the next version! We don't use 2D Toolkit so I didn't spot the change.
     
  23. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    hey i'm getting a new bug. When i drag a new clip into the masteraudio group mixer, i get following error:
    capturebug.PNG

    the group object is created outside of the masteraudio object with the single variation also created outside of the masteraudio object.

    also the default templates are no longer in the masteraudio prefab, and dragging them in from the project window doesn't do anything.

    Manually dragging the variation into the group object and then dragging the group object into master audio prefab seems to work. Still a bug though.
     
  24. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    also have another question:

    lets say i have a sound group with 3 variations and i want to play them TOP TO BOTTOM mode.
    but i also have retrigger percentage to 100% to prevent interrupting, and also make each clip have weight 5 so there's enough clips to avoid the situation where all clips are playing and an action produces no sound.

    Currently in play mode, TOP TO BOTTOM means the 1st variation gets played 5 times, then 2nd variation 5 times, then 3rd 5 times.
    Is it possible to make it so that it always plays 2nd after 1st, 3rd after 2nd, while still allowing a weight of 5 for each variation?
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Are you on the latest?

    I've never seen that error and can't reproduce over here. What Audio Source Template do you have selected on the mixer section?
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Nope. You could make that happen though by using weight of 1 and making real copies of those and renaming them.
     
  27. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    oh yea didn't think of that, that works.
     
  28. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    yea im on the latest.
    For the template, what i meant was it shows this:
    captempl.PNG

    It's not abig deal cause the fix i mentioned works, once i drag in the hierarchy the sound group and variation into the master audio everything seems to connect properly and i can select the sound group from within the master audio prefab.
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    You need to do what it says in red and drag all the audio source templates in. You have none.
     
  30. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    lol... i did try, i went to the group templates prefabs in the project folder and tried dragging them in, and it didn't do anything.
     
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Not Group Templates, Audio Source Templates. Different folder :)
     
  32. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    oh yea i tried those too, dragging them into the yellow rectangle does nothing.no error or anything.
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Well I'm not sure how you managed that. The Master Audio prefab created from Master Audio Manager window already has all the Audio Source templates set up. Check the Master Audio prefab and see if it has Audio Source templates. If not, re-download the plugin.

    After that, I suggest you delete your Master Audio game object and create one from the manager again. You can copy out your Sound Groups into a Sound Group Organizer and then re-import them after creating the new one.
     
  34. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    hmm totally worked, the prefab had the templates... and the error is gone too... transfered groups fine.

    maybe i updated plugin in the wrong way before or something.
     
    jerotas likes this.
  35. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    127
    Probably a Unity 5 thing. Make sure you always delete the Master Audio folder before updating.
     
  36. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    got a question regarding something in the readme file.
    it says:
    Use the Master Audio Clip Manager window to convert any mp3's to wav's quickly.
    a. Make sure to NEVER use mp3's or "stream from disc" for sound effects (Sound Group Variations). A single call to AudioSource.Play() with an mp3 file will take about 2.4ms. Whereas AudioSource.Play() with a wav file takes about 0.02 seconds. That's 120 times faster! It can drastically affect your frame rate if you have a lot of sound effects playing! For playlists it's fine to use mp3's because you don't fire off many each second like sound effects.

    I thought smartphones convert everything to MP3 anyway? why not have sound effects be mp3's then? did stuff change in unity5?
    also is there another way to convert any mp3's to wavs quickly in the editor now that the clip manager is gone?
     
  37. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    No, they don't. Uncompressed audio will always be ready for playback faster than compressed audio, since it does not need to be uncompressed to be played back.
     
  38. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    so it's definitely "decompress on load", that's what uncompressed is now?
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    I'm not sure. I haven't actually been making a game in Unity 5 yet. I would have you ask the question over on the audio forum here: http://forum.unity3d.com/forums/audio.74/
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Unity 5 has built-in bulk editing of Audio Clips anyway, so Clip Manager is redundant. Just select as many files as you like in Project view, and set the audio properties in the Inspector.
     
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Now that Unity 5 gives all pro features for free (well almost all), we will be putting all Master Audio classes into a namespace (DarkTonic.MasterAudio) in the next update. This will mean ending support for Unity 3.

    Sorry for the long wait, I know people have wanted this for awhile.
     
    twobob likes this.
  42. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,785
    Nice one. As a lifelong musician I am looking forward to using the pack with u5's mixer.
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Sounds good! To clarify, we already have full support for the U5 mixer and have for several months.
     
  44. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    116
    I've got my game set up so that I can run and test each scene individually, such that I don't have to run a bootstrapper scene first. I have a persistent singleton that accomplishes in code what a bootstrapper scene is supposed to do (load/create things necessary to play the game). I'd like to get MasterAudio to work with this setup.

    So here's the way I'm trying to do it:
    - I have a MasterAudio prefab in my assets with the settings I want.
    - I have a PlaylistController named 'PlaylistController' in my assets with the settings I want.
    - In my singleton script, I use "Instantiate(thePrefab) as GameObject" to create clones of my MasterAudio and PlaylistController prefabs.

    In the scene, it creates clones of those prefabs, but I get a "Could not find Playlist Controller 'PlaylistController' error.

    What ya think? Thanks!
     
  45. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    I'm not sure, however...

    Instead of going to all that trouble (writing code), why don't you just put the Master Audio and Playlist Controller prefabs into each Scene? That works for me. This method is listed as a workaround in the readme.

    -Brian
     
  46. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    116
    That's the way I've had it, but every time I changed scenes, I'd see this message about there already being a MasterAudio object in the scene. Seemed kinda sloppy or unneccessary for that to happen on every scene change, so - that's why I posted this message.
     
    twobob likes this.
  47. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    I can remove that message if you like, if that's your only problem with it, but it's intended for people who might have things set up wrong and not know it. I'd rather leave it there as I think more people will find it helpful instead of an annoyance.

    I'd suggest you try instantiating your objects in the reverse order and see if that fixes the problem.
     
  48. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    116
    I think I got it working the way I want. I'm Instantiating the MasterAudio and PlaylistController prefabs from a script and they're persisting across scenes, and there's no pre-exisitng MasterAudio or PlaylistController objects pre-saved in my scenes. The 'Could not find Playlist Controller' error I was getting before was from this statement:

    PlaylistController aPlayListController = PlaylistController.InstanceByName("PlaylistController");

    I changed it to this statement and things seem cool:

    PlaylistController aPlayListController = PlaylistController.Instances[0];

    Not sure why that first statement was giving me an error. I checked the returned PlaylistController.Instances[0] .name and it was "PlaylistController" which seemed like it should've worked. Whatevs - I'm happy!
     
  49. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,125
    Ok cool. Let me know what line number that was, and I'll see if I can reproduce and fix it. I think there's probably an easy way.

    Otherwise your changes will be overwritten the next time you upgrade.
     
  50. Carles-Balsach

    Carles-Balsach

    Joined:
    Sep 1, 2013
    Posts:
    1
    Hi,
    I've been working with Master Audio and found something weird.
    To begin with, I just have one instance of master audio that won't be destroyed (created once the game starts).
    The thing is that some elements in my gameplay scene have a loop sound, and once they're destroyed (OnDisable() method), the sound stops. This works fine. The thing is, if I go back to the lobby, and the element was not destroyed before, the OnDisable() method is called but the sound will persist in the next scene.
    Any Idea why it's happening?
    Thnx
    PS: Here's some code to clarify what I'm doing.

    public class GamePlayClass
    {
    PlaySoundResult _sound;

    void Start()
    {
    Debug.Log("Start");
    _sound = MasterAudio.PlaySound3DAtVector3 ("MyGPSound", transform.position);​
    }

    void OnDisable()
    {
    Debug.Log("OnDisable");
    _sound.ActingVariation.Stop();​
    }​
    }
     
unityunity