Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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
    Ah. Well yes Addressables and Resource files both have latency because they have to be loaded up before they play. You can read about all the Audio Origins here: https://www.dtdevtools.com/docs/masteraudio/AudioOrigins.htm
     
    nico_st_29 likes this.
  2. altugs

    altugs

    Joined:
    Jan 14, 2017
    Posts:
    17
    Hi, I need to adjust the pitch of a specific Voice of a variation. Basicly I use
    MasterAudio.PlaySound3DFollowTransform("engineLoop", vehicle.transform); to attach the sound to the vehicle (and I set weight number to a high value so all npc's can get a sound). But when I use
    MasterAudio.ChangeVariationPitch("engineLoop"), all of the clones changes their pitch. Should I change my approach? How can I solve this?
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yeah ChangeVariationPitch is behaving how it's supposed to. You would need to use the reference returned to change the pitch.

    Code (csharp):
    1.  
    2. var result = MasterAudio.PlaySound3DFollowTransform("engineLoop", vehicle.transform);
    3. if (result.ActingVariation != null) {
    4.             // use one of these. The first changes pitch absolutely, the 2nd over time.
    5.             result.ActingVariation.VarAudio.pitch = 3f;
    6.             result.ActingVariation.GlideByPitch(1f, 1.0f);
    7. }
    8.  
     
    altugs likes this.
  4. LandePlage

    LandePlage

    Joined:
    May 21, 2016
    Posts:
    33
    Is there a quick way to convert a "Master Audio Group" into a "Dynamic Sound Group"?
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can use the Sound Group Organizer to convert to or from a Master Audio Group. Import it from one and export it to another.
     
  6. LandePlage

    LandePlage

    Joined:
    May 21, 2016
    Posts:
    33
    Cool, thanks!
     
    jerotas likes this.
  7. LandePlage

    LandePlage

    Joined:
    May 21, 2016
    Posts:
    33
    Is there a way to bypass the "probability to play"-functionality when playing a sound group? As in guaranteeing that it will play a variation?
     
  8. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sure. Since probably to play is on the Variation level, you make another clone of that Variation that has 100% probability to play, and specify to play that one by name (give it a different name).
     
  9. franklinbenini

    franklinbenini

    Joined:
    Feb 20, 2020
    Posts:
    1
    What is the real benefit of using this asset instead of using Unity's audiosources/audiomixers? From what I've seen, you are required to add a MasterAudio component in the 1st scene, put 500+ audio files all in that component and it stays in all scenes is that it? What's the difference with a simple "AudioManager" that I can code based on singleton myself? What if I just want to have a few separate sounds per scene, and not throw everything into one totally disorganized component?
     
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Great question! This was made for the same audience that Playmaker was. Namely that we've already coded up pretty much every conceivable scenario you'd need so that in 95-99% of cases for your audio needs, you need to write precisely zero code, and it's allocation-free in most of that.

    Here's a post with some of the benefits: https://darktonic.freeforums.net/thread/130/unity-great-master-audio-absolutely

    The thousands of hours that have gone into coding this from hundreds of feature requests from a dozen AAA companies make it a world-class product. Do you need all the bells and whistles? Almost certainly not, however for the price of 1-2 hours of a novice programmer's time you get all of it. And I am decidedly not a novice programmer, been programming since 1983. It's also battle tested and constantly fixed and upgraded.

    By the way - under the covers, you still will be using Audio Sources and Audio Mixers (this is not a new audio engine), but in most cases you won't need to think about them because we abstract most of that away from you and it "just works".

    I disagree that anything is disorganized about the way we structure it, but you may need to explore the plugin before you arrive at that decision yourself.

    As far as putting 500 sounds in one component that stays in all scenes, you're certainly free to do that, but it's rather naive usage and won't perform well for obvious reasons. You can use "sound skins", temporary or per-Scene Sound Groups and other features as well to make it manageable.

    You are always welcome to go pick up something free that suits your needs if you need only the most basic of features.

    I hope that answers your questions, but feel free to expand if you like.

    -Brian
     
    Last edited: May 20, 2022
    franklinbenini likes this.
  11. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Flash sale on Master Audio 2022 started today! Currently at $20 which is the current upgrade price as well. Great way to get additional licenses or if you don't already own it. Don't miss out!
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 1.0.2 is released! Changlog (FishNet integration is here!):
    • Added Playmaker Custom Action MasterAudioFadeSoundGroupOfTransform.
    • Added Multiplayer integration with FishNet.
    • Fixed previewing so it works in newer versions of Unity despite the PlayOneShot Unity bug.
    • Fixed Sound Group Inspector so during runtime, moving the Group Master Volume slider adjusts the volume of any playing Variations in the Group.
    • Fixed "All Groups" checkbox functionality for Event Sounds.
    • Fixed bugs in Mirror Multiplayer package. Some sounds were playing twice. Others not firing sometimes.
    • Fixed occasional wrong lookup of briefly named (clone) variations.
    • Reverted AsmDef packages, they must be ""all platform" or the Inspectors don't show in Unity.
    • Added Fade Sound Group Of Transform To Volume to Event Sounds.
    • All links to documentation website and API website are now HTTPS in case your browser doesn't auto-redirect.
     
  13. tchris

    tchris

    Joined:
    Oct 10, 2012
    Posts:
    133
    If I already have the legacy Master Audio asset in my project, can I just delete it from my Plugins folder and add Master Audio 2022 into the project?
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes. I'd say do the following:
    1) Delete all folders named "DarkTonic" and "RelationsInspector".
    2) Restart Unity
    3) Install new version.

    This is the safest.
     
    tchris likes this.
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It's been on our roadmap for years to investigate native audio functionality for Android to bring down the latency. However I tested on 2 phones today and it seems pretty snappy. Do people still complain about the audio latency with Unity on Android and if so, would anyone appreciate Master Audio product incorporating native Java code to lower the latency more still? A post I read said it's averaging about 39ms delay average these days.

    Thanks,
    -Brian
     
  16. RoosterMai

    RoosterMai

    Joined:
    Nov 6, 2016
    Posts:
    8
    Question about New Clip From Last Known Position. I put two music into a playlist, and set Song Transition Type to New Clip From Last Known Position. And I use
    Code (CSharp):
    1. MasterAudio.StartPlaylist("PlaylistController", "Map", clipName);
    to play music A, wait for seconds, then play music B, and then when play music A again, music A will start from beginning, not from last position. How can i play music A from last position?
     
  17. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I just tested it again and it works fine for me. Let's see the code you're using to change songs.
     
  18. RoosterMai

    RoosterMai

    Joined:
    Nov 6, 2016
    Posts:
    8
    I just use
    Code (CSharp):
    1. MasterAudio.StartPlaylist("PlaylistController", "Map", clipName);
    to change songs. I use wrong method to change song?
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Most likely. That command is how you start the first song, but not play a song after the Playlist is started.

    You would change to a new song like this:

    MasterAudio.TriggerPlaylistClip("YourSong");
     
  20. RoosterMai

    RoosterMai

    Joined:
    Nov 6, 2016
    Posts:
    8
    oh, It work, thanks!
     
  21. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Of course!
     
  22. Razputin

    Razputin

    Joined:
    Mar 31, 2013
    Posts:
    356
    Hi,

    Is there any way to associate subtitles with particular clips? Either by a direct string, or an index that I can use to access a .csv or list of strings.

    Thanks!
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Are you asking about clips used in Playlists or Sound Groups? The answer would be different for each.
     
  24. Razputin

    Razputin

    Joined:
    Mar 31, 2013
    Posts:
    356
    We are using sound groups
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Well there is the "Clip Id" field. You could use that for your purposes, as long as you use a different one for each clip.
     
  26. Razputin

    Razputin

    Joined:
    Mar 31, 2013
    Posts:
    356
    Sounds like a good idea, thanks :)
     
    jerotas likes this.
  27. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    I have added colliders to my character feet, and set the sounds to play when they collide against the terrain. But I don't hear any sounds. I have added master audio to the character and create sounds groups please help
    upload_2022-7-7_11-26-46.png

    upload_2022-7-7_11-27-39.png
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You'll need an actual collider or trigger on the Terrain. Probably a collision / trigger isn't occurring and that's why no sound is playing.
     
  29. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    how do I do that ? I have a terrain collider, like how ?
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You make one. There are plugins that help with it as well I think. I don't use terrain so can't be much help here. The Footsteps plugin works with colliders.
     
  31. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    PLEASE HELP: I am unable to play footsteps through MasterAudio !!

    I have setup 20 footsteps sounds in a sound group called Footsteps1 and it a bus name FootSteps. My dragon can box colliders on all of its four feet. I have chose OnCollision for the sounds but nothing happens !!.

    My character is a rigibody with colliders, and I have check all the layers where collisions is supposed to happen. I have attached the footsteps event to my dragon and the master audio gameobject is close by. Also I want to know to how to play sounds with animation events
    upload_2022-7-15_18-58-14.png

    upload_2022-7-15_18-58-59.png

    upload_2022-7-15_19-0-1.png
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    First I would check that you have 3D physics enabled on the master audio manager welcome window. Or 2D physics if you're using that.

    Are you sure sounds aren't playing or you're just not hearing them? Turn on the log sounds checkbox under advanced settings and watch the console window.
     
  33. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    My sounds are checked to 3D

    upload_2022-7-15_19-17-27.png

    I made my own script to run sounds based I on animation, I can hear the sounds. But with MasterAudio I am unable to hear anything. Also I have checked the logging, and the console doesn't log anything. I am not sure if I am missing something in the step , I have followed your video and read the documentation
     
  34. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    upload_2022-7-15_19-20-21.png

    This is where I have added my footsteps script

    upload_2022-7-15_19-20-57.png
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If the Console didn't log anything then the OnCollision code is not firing. You may want to check your Physics Layer collision matrix window. Besides that, I don't have any other things to try unless you send me a Scene to troubleshoot. Thanks!
     
  36. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    I don't understand it, I ran a OnCollisionEnter code separately and it was been logging collisions. Is there no other way to run sounds for animations ?
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can also add an animation event.

    Anyway as far as Footstep Sounds script, you can go into it and add some Debug.Log statements to find out where it's failing. i.e. add a log first thing inside OnCollisionEnter.method on line 45. If you're hitting OnCollisionEnter elsewhere that should work as well. Your code doesn't have code to exit if the layer doesn't match, and a couple other things.
     
  38. Jshh

    Jshh

    Joined:
    Sep 14, 2019
    Posts:
    38
    Hey, I just had a similar issue for a few minutes and came across this thread as I was trying to it figure out.

    In my case, these were the conditions necessary for it to work:
    - add Collider, Rigidbody, and FootstepSounds to the foot bone gameObjects of the character model- in my case the toe joints:
    upload_2022-7-17_0-34-56.png

    upload_2022-7-17_0-37-36.png

    - set rigidbody isKinematic to true
    - set collider isTrigger to true (and line up the collider appropriately)
    - an instance of the footstepSounds component should be on each object that has a collider and rigidbody
    - set footstepSounds EventUsed to OnTriggerEnter

    Then tweak the other parameters until you get a decent result. I needed to add a separate FootstepSounds component to each foot bone on my model.

    @jerotas I came across this thread because I wasn't sure where exactly I was supposed to add the footstepSounds component; I just guessed it might need to be on the same object as the collider & rigidbody. If this is true it might be handy to make it explicit in the docs (which are generally excellent, but occasionally seem to assume some familiarity with the system). On the other hand, if I'm doing it suboptimally, I'd love to hear how to improve it. I used SoundGroup retrigger rules to throttle the overall frequency of multiple footstep components, but I don't know if that's ideal.
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You've set it up for Trigger. We also support Collision. If there's something in particular you think should be added to the doc let me know, that's a large post above.

    As far as Unity basics on how to set up colliders and such, that's probably best learned elsewhere.
     
  40. Jshh

    Jshh

    Joined:
    Sep 14, 2019
    Posts:
    38
    Oh right, interesting. I couldn't get the OnCollision method to work, so I must be missing something else. I tried removing the foot rigidbodies, setting the foot colliders to isTrigger = false. Still no collisions, so I tried adding a kinematic rigidbody to my ground collider, but that made no difference. Any other ideas? It works fine with onTriggerEnter as mentioned above, so I guess the physics and soundGroups must all be functional, there must be some other setup step I'm missing.

    I just meant the detail about putting the footstepSounds component on the same object that has the foot collider/rigidbody, which may not be the root object for the character model. If this isn't actually the case, I'd like to understand better.

    Yes! And thanks for your response.
     
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Well there's cases where you might want it on the parent collider, so you can get all colliders including on child game objects to trigger it, if I remember correctly. So I'll leave that up to the user.
     
    Jshh likes this.
  42. Jshh

    Jshh

    Joined:
    Sep 14, 2019
    Posts:
    38
    Right, makes sense, didn't realise it would work like that. Thanks!

    BTW got the OnCollision event working, just needed rigidbodies set to kinematic = false, colliders set to isTrigger = false.

    All good!
     
  43. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yep, sounds right :)
     
  44. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    I was able to get sounds using on Trigger enter, but it is failing for me for onCollisionEnter, also you don't have to add rigidbodies for each foot, adding it to the parent should be sufficient
     
  45. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    I have added a debug statement on line 45 for the private OnCollisionEnter. It was not logging anything. OnTriggerMethod is working fine though
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You won't get both to log something. It's either a trigger or a collision, not both. Depends how you have your collider set up. Anyway, if it's logging for trigger, then perhaps your layer filter is what's stopping it from making the footstep sound. You may want to log the layer as well, and check your Physics layer collision matrix.
     
  47. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    can you share your inspectors for OnCollisionEnter ? my rigid body is attached to parente, isKinematic is false and all the box colliders are triggered as false as well
     
  48. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    My physics layers are fine, because if they wouldn't collide then my dragon (which has 4 legs would fall through)
    upload_2022-7-19_18-48-58.png

    upload_2022-7-19_18-49-47.png
     
  49. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Basically the layer filter and the retrigger limit are the only things between OnCollision and playing the sound. You will need to add logs to see which one kicks it out and doesn't play the sound.
     
  50. MoonBeam91

    MoonBeam91

    Joined:
    Jan 28, 2021
    Posts:
    35
    I was able to fix it !! I had to add the footsteps sound on the parent object where all my scripts are. The OnCollision started working.