Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

[RELEASED] SECTR AUDIO: Immersive, Spatial Audio

Discussion in 'Assets and Asset Store' started by MakeCodeNow, Feb 21, 2014.

  1. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409

    Woah... I had no idea this was in the package. Does it work on terrain? I built my own system for this but terrain is the thorn on my side. I'm considering implementing footsteps for my enemy AI but they can be very numerous and I worry about performance on collider checks.

    Oh I should clarify: Does it allow you to specify a sound cue based on terrain splat texture is what I meant. IE: Grass footsteps for grass, concrete for concrete, etc.
     
    Last edited: Aug 6, 2014
  2. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    It's based on the physics material, but sadly I think you can only have one physics material per terrain. You could probably do a version that looks into the terrain textures, but I'm not sure how fast it would be.
     
  3. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Also you can use the MaxPlaybacks feature in SECTR to ensure there aren't too many footstep sounds at once. Then you can probably also do some distance LOD for the AI so that they don't even try to generate footstep SFX until they are close enough to be audible.
     
  4. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    Sounds nice. I already do some AI culling/LOD based on distance so that should be no problem. I wrote a bunch of code that uses Unity audio in my scripts and really want to tackle turning into SECTR Audio but sadly its low on my priority list since it involves rewriting a significant amount of code.

    If only I had more time in my nights :)
     
  5. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Exciting news! SECTR is a technical achievement finalist in the 2014 Unity Awards! If you like SECTR, please take a moment to vote for it!
     
  6. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.1 is now live in the UAS, just in time for the end of the August Madness sale. It includes mostly bug fixes.
     
  7. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.2 is now live in the asset store. Includes mostly bugfixes for CORE and AUDIO.
     
  8. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.3 is now live on the UAS. Includes a fix to drag and drop in the Audio Window.
     
  9. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.4 is now out on the UAS. Includes AUDIO improvements, lots of bug fixes, and early Unity 5 compatibility!
     
  10. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    New SECTR update out now. Includes improvements to terrain splitting, plus some Unity 5 updates.
     
  11. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Hm, so I've been getting back into SECTR. The HDR feature is neat, but I really wish there was more control over it. Particularly:

    1.) I'd like to be able to manually edit the envelope of a sound. For example, the immediate BANG of a gunshot may be loud, but the following tail should not be very loud at all. However, SECTR seems to think the whole thing is fairly loud. Same with explosions, only the initial bang should be loud, not the falling rubble and echoing tail.
    2.) I'd also like some control over how much a sound's volume is affected by the HDR mix. For instance, I need voice over sounds to be much more audible than they are. I could make them louder, but then they mask other sounds (which I don't want). I could also make them not HDR, but I'd still like them to become quieter when loud sounds are playing (just not as much as they are). It'd be nice if I could just say that a sound's volume is only reduced by, say, 0.5 as much.
     
  12. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I'll reply to point 2 once I've though about it a bit more, but on point one try baking HDR keys. That will compute an envelope based on the waveform. As you say, a constant volume for the whole sound rarely sounds good for sounds that are not of constant loudness.
     
  13. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I am baking the HDR keys. The thing is though, I've done a bit of EQ and levelling to my gun sound so that the gun tail is more audible, and that seems to make SECTR think it's fairly loud. I'd love to be able to manually edit the HDR keys after baking to make it quieter.
     
  14. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Makes sense. I'll look into a UI for that tonight. If you'd like to help test, email support@makecodenow.com and I'll send pre-release updates for you to play around with.
     
  15. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Also, I have no idea if this is feasible at all (in fact, I have my doubts), but some Source engine games have a neat system where they use the two channels of a weapon sound to store near and far versions of the sound (left channel is near version, right channel is far version) which at runtime is mixed down into mono based on the sound's proximity to the listener.
    I don't know if that's possible with Unity's Audio API, but if it is it would make a great feature.
     
  16. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That is a cool trick. It's pretty easy to do with the actual FMOD API but it looks like Unity has not exposed the necessary API in AudioSource. However, if you created a custom component you could implement that logic in OnAudioFilterRead.
     
  17. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Hm, if I created a little audio filter for this, maybe you would consider integrating it with SECTR? Maybe on a cue you can enable a "Near/Far Audio Channels" which enables the effect on the internal audio source....
     
  18. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Thanks for the offer but I can write that filter pretty quickly. The problem is that I need to add proper filter support to SECTR and do it in a way that doesn't generate a bunch of garbage. Hopefully that'll be soon :)

    PS - I have an HDR curve prototype. Email if you want to help test.
     
  19. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    OK cool, email sent.
    I'll probably see about hacking that distance crossfade functionality in myself :)
     
  20. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Welp, apparently I won't. Grr.
    Evidently, it doesn't feed in the channels of the source audio clip to OnAudioFilterRead, unless it's a 2D audio clip.
    Damn you, Unity! *shakes fist*
     
  21. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Oooh I had an idea of a way I'll probably be modifying SECTR audio...

    I have a collection of impulse response filters, which I've pruned and organized into just three for my game - Outdoor, RoomBig, and RoomSmall. The idea is that I can generate the following variations for a dry recording:

    - Outdoor Near/Far (I can get near/far versions easily by messing with Dry/Wet mix)
    - RoomBig Near/Far
    - RoomSmall Near/Far

    And tag areas of my game with which variation to choose.

    I just realized, the impulse responses are binaurally recorded. Meaning, for instance, when I apply the Outdoor effect to a sound, you can almost hear the echoes bouncing around in different directions from one ear to the other. It really makes it sound like you're there.

    Anyway, long story short they sound like total ass when mixed down to mono. So, my thinking is, for each sound I keep the "dry" signal separate, plus the "wet" signal as a separate cue. The "wet" version is set to 2D, so that it plays in stereo and doesn't pan. The idea is that I might modify the SECTR_AudioCue to allow each sound to have a reference to the "echo" version of itself. Then, when I pass a cue into SECTR_AudioSystem.Play, it checks this reference and if it's not null it plays the other cue on top (fading with distance, so that as the sound is further away the "wet" signal becomes more and more audible).

    It's twice as many cues to play at once though, but it should sound pretty good...

    Anyway, just rambling.
     
  22. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Very cool ideas. Should be a reasonable extension. I provide source to help with issues like these!
     
  23. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    1.1.4e is out now. Includes API fixes for U5 Beta 13 and a nice curve editor for HDR keyframes (thanks to Phobic Gunner for the request).
     
  24. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    Just upgraded to Unity5. and I'm getting an error.

    sectr complete v1.1.4e
    Unity5 version 5.0.0b14

    Assets/SECTR/Code/Audio/Editor/SECTR_AudioWindow.cs(979,49): error CS0246: The type or namespace name `AudioClipFormat' could not be found. Are you missing a using directive or an assembly reference?

    Thanks.
     
  25. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yep. Some stuff broke due to API changes in b14.

    I have it updated but not live on UAS. Will be there in a day or so. Downgrade to b13 or email support@makecodenow.com if you want the fixes sooner.
     
  26. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    I figured it was just Unity5 growing pains, Appreciate the fast updates.

    Thanks
     
  27. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    FYI that fixes for U5 b14 are now live on the UAS.
     
  28. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    Every things working great!
     
  29. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    571
    Just started with SECTR Complete. After running the demo scene I have some questions:
    • If you have a nested buses, how can you solo a child bus? If you solo a child bus then it mutes the parent bus, making the children inaudible. Conversely, soloing a parent mutes all children. Example: in the DemoMaster you can Solo DemoMaster/Music to hear only the music. But if you solo DemoMaster/FX, you won't hear anything.
    • In the AudioSourceInspector there is a volume and pitch slider. I can't edit them and if they are intended to be read-only, they don't seem to reflect any matching setting.
    • Not really a question: in the AudioSourceInspector there is also a Play/Stop togglebutton. When stopping playback the togglebutton remains in the enabled state.
     
  30. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Good questions.
    * You can solo multiple busses, which is way to handle that now. However, I agree that's not the most intuitive thing. I've been debating on making it so that when you enable soloing on a child bus that it auto enables soloing on the parent buses, or at least doesn't prevent the child bus from being audible.
    * Good spot. There was a bug that prevented the Volume slider from working. I've just fixed that. It'll be in the next release. Both of them are scales on top of the settings from the AudioCue.
    * I'll double check this but usually it's because of an update issue in the Editor. They do lazy updates so sometimes it shows the wrong value because they haven't updated the GUI element. I haven't figured out how to work around that yet.
     
  31. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    571
    So it's actually possible right now to solo multiple buses? That would be kind of OK with me. I think bubbling up through a child bus' parents would be more intuitive though.

    Hm, I have trouble figuring out how to solo multiple buses. Unlike muting, when bus A is soloed and I leftclick to solo bus B, then bus A will be unsoloed. Also tried Shift/Alt/Ctrl+leftclick/rightclick/middleclick. I don't know what else to try :(

    Maybe you can use the EditorApplication.playmodeStateChanged callback to toggle GUI.enabled?
     
  32. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Multi-solo should work but I just checked the code and it does not :p Will be an easy fix. I'll make that part of the next update.

    I think I actually see the issue you are talking about w/ the toggle. What *should* happen for PointSource's that are PlayOnStart and Loop is that their button says Stop even outside of play mode, because they should be playing (so that you can hear them with sound on in the editor). I saw one case where that wasn't happening, but haven't been able to repro. If you find a repro, lmk!
     
  33. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Hey, do you have any tips for working with HDR audio mixing? I've been experimenting with the HDR feature of SECTR but it's been a little frustrating. In particular, weapon sounds seem to lose a lot of punch, and it sounds way too heavy handed. BF3 seems to have done it perfectly (if you're not listening for it, you'll never notice it's there), but whatever I try it just sounds way too heavy handed and obvious, and as mentioned some sounds actually lose a lot of punch and volume.
    I assume it's something I'm doing wrong...
     
  34. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Not much other than a little goes a long way. I know the BF team started with real dbSPL, but then just tuned until it sounded good. From my tests I notice that a few db difference goes a long way. Remember that it's a log scale.
     
  35. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    264
    I am also having this problem. You mentioned that you resolved this in email with Viper50BMG, but the resolution was never posted here. There doesn't appear to be anything in the manual about how to work with spline sources. How can I add a 3rd, 4th, 100th, etc. key to the spline?

    Thanks.
     
  36. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    264
    On further review, it looks like the spline source keys are nothing but empty gameobjects, so I can just add new ones to the list arbitrarily. This will work fine, so you can disregard the question!

    As a side question however, could I use something like Curvy (http://u3d.as/content/fluffy-underware/curvy/48Y) to create splines instead of using your simple list of gameobject transforms?
     
  37. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    264
    On further, further review... I'm still having trouble setting up my audio for my intended use (a shoreline in an outdoor area with a large terrain and large water table as large as the whole terrain). Perhaps a spline is not the best method to do so.

    Ideally, I'd love to find a way to have the sound source snap to the nearest intersection of my water table and my terrain (i.e. the shoreline). How would you suggest doing something like this?
     
  38. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    To add more keys to the spline source, just make some more children and then add them at the right spot in the Spline Points array of the Spline Source.

    A Spline Source is the best way to do something like a coastline, provided the users can not go (far) into the water. If the player can go far into the water, you probably want to use the spline for the coastline/waves sounds and combine it with other systems, like Audio Environments that start to play when the player goes well into the water.
     
  39. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Derp! I see that you've figured it out.

    Right now there is no support for other curve tools like Curvy. In my experience most games make sparing use of spline sources, hence the current tools. If you have specific pain points with the current tool, though, please lmk and I'll see if I can't improve them.
     
  40. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    264
    Thanks for the replies. I think I will look into Audio Environments, or regional audio triggers.
     
  41. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    I just upgraded to U5 beta 18 and am getting an error.

    Assets/SECTR/Code/Audio/Scripts/SECTR_AudioSystem.cs(345,51): error CS1061: Type `UnityEngine.AudioClip' does not contain a definition for `audioDataLoaded' and no extension method `audioDataLoaded' of type `UnityEngine.AudioClip' could be found (are you missing a using directive or an assembly reference?)
     
  42. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Just get the latest SECTR and that'll be fixed.
     
  43. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    Yup that was it. Sorry I thought I had already updated. I think I may have used the wrong project when I updated the engine. Thanks again.
     
  44. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    No prob. Happy to help!
     
  45. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5 is now live on the asset store. Includes lots of audio improvements including beta versions of filters and parameter control and various bug fixes.
     
  46. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    I have SECTR Complete(version 1.1.5) ....but after a fresh install of Unity 4.6.2F1 and a fresh import of SECTR Complete ...I keep getting this error:

    It keeps repeating 999+ ...it only happens when the "SECTR_Audio System(script)" is enabled on the included complete player prefab ....if I add the "SECTR_Audio System(script)" and the SECTR_Start Music(script) to an empty game object I seem to get no errors..
     
  47. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I see the problem. You must have an ambience with a list of one shots where one of the entries in the list is NULL. I'm fixing the code now, but you can work around the problem by removing the NULL oneshot.
     
  48. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Awesome, thanks for the fast response and for fixing it already!
     
  49. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5a is now live on UAS. It includes some bug fixes and a major reduction in garbage generated by Member update.
     
  50. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5b now live on the UAS. Includes a critical bug fix for 1.1.5a.