Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. 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

[RELEASED] SECTR AUDIO: Immersive, Spatial Audio

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

  1. toreau

    toreau

    Joined:
    Feb 8, 2014
    Posts:
    203
    How did you end up solving this problem?
     
  2. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    277
    Sorry for the delayed response. Unfortunately I never solved the problem as I wound up shelving the project temporarily.
     
  3. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.2.0 now uploaded to the UAS. Includes an Open World demo (finally!) and a native Unity 5 build.
     
  4. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    453
    Hello, What is the best way to use this with unity 5's audio system? Does it work with Unity 5's audio system, or is it its own separate entity?
     
  5. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR audio benefits from all of the low level improvements to audio clips in Unity 5 but otherwise is independent of the new mixing features.
     
  6. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    453
    got it :) thanks
     
  7. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    How would I go about creating a jukebox playlist for a game scene? ... I don't need transitional(triggered) zones just yet ...I just want it to play music until the song is over and go to the next song on the list until all the songs are finished ..then repeat the playlist... I made a script to do it ...but then I ran into errors(conflicts with SECTR audio) after Unity 5 upgraded the script... I already deleted the script to get the errors to stop so I cant post it here unless I retype it all and let Unity 5 update it again..
    I didn't clearly see any way to easily add a script to an empty game object that can let me add the audio clips in a list that will do as I said above using SECTR Audio.....unless I missed something..
     
  8. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Make a single cue with all the clips. Set it to shuffle and then use a music trigger or similar logic to play it. Done!
     
  9. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Yeah ...getting no sound from it http://www.pasteall.org/pic/show.php?id=87800 ..the Cue works because I tested it ....its probably obvious ...but I am not seeing the problem atm...
     
  10. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The cue should be 2d. Is it? If so, how side you test it?
     
  11. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    PS - better to just use a start music component or a music trigger, not a regular trigger and you don't need the audio source on your listener.
     
  12. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    I used the audition button in the cue settings....and yes its set to 2D ... I didn't realize though that I couldn't use HDR with the music...I unchecked it and it works fine now ...thanks for the help..


    EDIT: yeah its working but the cue isn't playing the tracks in order ...it seems to be looping just 1 of them...there are 5 in the cue.. I will keep messing with it..
     
    Last edited: May 7, 2015
  13. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    FYI that SECTR 1.2.0c went live on the UAS. It enables audio filters for non-Pro Unity 5 users.
     
  14. sleepCircle

    sleepCircle

    Joined:
    Jun 6, 2015
    Posts:
    6
    I hope this isn't answered anywhere already, but I've been kind of uncertain:

    Does sectr audio allow you to hear reverb areas outside the area you're in? If you're standing in an outdoor area with big concrete walls and two guys are shooting at you, and then you run indoors where there is some furniture and cruddy institutional carpet, then most games would suddenly stop the gunshots outside from reverberating. Whereas IRL you would hear the sound outside echoing the same, while inside sounds would be more muted—or if the door between areas was closed, you'd hear muffled, roaring echoes of the gunshots, and the dry clink of you looting the nearest cabinet at the same time.

    Normally you wouldn't even need something that complex in a game, but when you're drastically switching from one environment to another, it can be jarringly noticeable.

    Does propagation have anything to do with this?—or is it focused more on direction, volume, and filtering.
     
  15. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    For environmental reverb, SECTR just uses Unity's built in system, which bases the reverb mix on the location of the microphone, so in your analogy, the reverb will change for all sounds when you go indoors, including the sounds of the guns outdoors.

    However, SECTR also includes an occlusion system which will lowpass filter and/or decrease the volume of sounds that have obstacles between them and the listener. This system works on regular and propagation sounds, and can be configured based on collision or distance. If you want the sounds of the gunshots to be muffled when you go indoors, that'll achieve the effect you want.
     
  16. sleepCircle

    sleepCircle

    Joined:
    Jun 6, 2015
    Posts:
    6
    Ah--thank you for your quick response. I do understand the occlusion/propagation system, yeah—but I still would like to be able to control the reverb, so will sectr allow me to assign effects based on what sector the sound is in? cause if so, that'd be great! if not, then I hope you don't mind ballparking how exposed the script is to that kind of tinkering; would I be able to implement it without breaking the plugin, do you think?
     
  17. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Per sector effects are not part of the base feature set. If you wanted to support it yourself it wouldn't be too bad, esp if it was always focused on reverb. The main challenge is pooling, which is much easier if the underlying objects are homogeneous (ie always an audio source and the same set of filters). If that's there case, you can follow the existing pattern for lowpass effects pretty directly.
     
  18. sleepCircle

    sleepCircle

    Joined:
    Jun 6, 2015
    Posts:
    6
    okay, thanks!—I'll look into it.
     
  19. lyndontroy

    lyndontroy

    Joined:
    Dec 12, 2012
    Posts:
    28
    Hello, getting the following error in Unity 5.1.x: error CS1061: Type `UnityEngine.TerrainData' does not contain a definition for `physicMaterial' and no extension method `physicMaterial' of type `UnityEngine.TerrainData' could be found (are you missing a using directive or an assembly reference?)

    Any suggestions? Thanks.
     
  20. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    You were using an out of date eval. I sent you a link to the latest.
     
    lyndontroy likes this.
  21. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    I tried the demos, and the sound propagation is highly unrealistic. When the door closed you can still hear the sound coming from other side of the door, and there is that annoying background music that's making it hard to differentiate the sound sources. All the sounds are garbled in some way because of all the interfering sound sources, and because this Sector Audio doesn't seem to be doing the audio occlusion properly, there are just a lot of messy sounds.


    I am hoping this extension would be more realistic like the Propagate that just came out:


    The Propagate seems to be doing the sound occlusion properly, and simulate the sound far more realistically and accurately than SECTR Audio.
     
    Last edited: Jul 14, 2015
  22. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Propagate looks very nice. It targets a different use case, though. SECTR does everything on the fly, which is more flexible but lower fidelity. Propagate requires a lot of baking in editor, but you get a very high fidelity result out of it.
     
  23. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,147
    I saw that there's an Audio Spatialization SDK coming with Unity 5.2, but I'm not certain I understand what it is.

    Is this something that SECTR: Audio can build upon?
     
  24. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Thanks for the heads up. The new spatialization feature is basically an extension of native audio plugins that let them hook into FMODs mixing code in a new way. It's not relevant for SECTR, but is more intended for libraries that do realtime binaural encoding.
     
  25. Skyway-Interactive

    Skyway-Interactive

    Joined:
    Jul 29, 2015
    Posts:
    6
    Man I have been playing around with your code (for two days now) ,a bit a snooping around and basic character Audio setups. I must say I am impressed by your code and its nicely laid out in a most excellent manner. Implementing sounds is getting easier once I figured out you send messages() from the Character Controller script to activate the sounds nicely. Just dropped in to really give you a compliment. I feel the asset is amazing and at the same time I know it has some awesome feature but do to the lack of tutorials the learning curve is pretty slow and I know there is so much more. I think a few more in depth tutorials would compliment this nicely.
     
  26. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Thanks for the complements! If I did more tutorials, what would you want to see covered?
     
  27. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,029
    Just got this, great stuff, but when I duplicate a point audio source and move it somewhere else it doesnt seem to work.
     
  28. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    So I just tried this and was not able to repro. However, I had a few fixes that were not yet live. I've pushed a bugfix update of SECTR which should be live in another couple of hours. Can you try once 1.2.1a is live and see if the bug persists? If it does, a video of the bug would be super helpful or even a screenshot of the editor with the problem Audio Source selected.

    Regarding square sounds, the sounds themselves are always spheres. However, you can have volumetric emitters (see Region Source or Spline Source) and you can also use Trigger Source to control playback based on a trigger.
     
  29. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,029
    Thanks i will make a video to demo it, I am also finding that if I am standing hearing a sound, simply turning my character can make it turn off, why is that happening?
     
  30. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    For a simple point source, player orientation should not affect whether the sound stops and starts. Are you using point sources in this case or something more complex?

    If you can upload a video that week definitely help.

    Oh, and lmk what version of Unity you're using.
     
  31. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, just started checking out Sectr Audio

    1. Unable to do multiple editor in audioclips List. I can select multiple but checking the button only affects one.

    2. Is there an way to play from AnimationEvent? Didn't see that anywhere.

    3. I used to do code FMOD/OpenAL in C++ directly, there is a use case I'm wondering if you catered for. There is 32 sound channel limit (I think due to hardware mixing) so if concurrent audio is more than that, some gets cut off. I implement priorities to ensure, say explosions, are always played (by reserving sound channels) and never cut off, say if there's a lot of machine gun bullets flying, and must play to the end before cut off. This is on top of Max Instances. I'm wonder if this is something already handled?
     
  32. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    1. Good catch. That was an oversight in the original implementation. I've fixed it for the next release, but if you want the fix soon, email support@makecodenow.com.

    2) You can add a SECTR_PointSource to an object and then use the Play() method from the AnimationEvent.

    3) Unity sits on top of FMOD but doesn't expose it directly. However, the priority field is exposed. You can set it in SECTR AudioCue in the Advanced Properties section.
     
  33. GameVortex

    GameVortex

    Joined:
    Jun 14, 2013
    Posts:
    12
    Hello MakeCodeNow

    I was wondering if there is any way of using Unitys native DSP Effects / Filters and/or custom filters with SECTR Audio. I have looked through the documentation and can't seem to find anything mentioning it, apart from Reverb Zones though.

    This is the big thing we are missing at the moment, other than that SECTR Audio is working great for us.
     
  34. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I think I should explain my situation with an example. I have an Audiocue of Explosion sounds that are 10 seconds, Max Instance Limit to 3. When there are 4 explosions on the screen, I want to 4th want to play, and stop a currently playing explosion. It is weird when there is a new explosion without sound. Currently I understand the default behavior is to skip if Max Instance limit is reached.
     
  35. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    There is. You need to use the Prefab feature. Just make a prefab that contains an audio source and the audio filters that you want. Then, chose that prefab in the Prefab slot of the Audio Cue. Done!
     
  36. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Right now there is no logic for killing the oldest instance. Once the max is hit, no new instances will be created of that Cue. I recommend that you set the Max to be the maximum number that can be active at once. If you want to thin the mix, use the Proximity Source feature or HDR mixing.
     
  37. Prawnkus

    Prawnkus

    Joined:
    Sep 25, 2015
    Posts:
    2
    Hello,

    I'm facing an issue, where my stereo seems reversed on some propagation sources, but not others.
    I currently have 2 3D occludable propagation sources playing in more or less the same location, but one of them sounds like it's coming from the opposite direction, AWAY from the source. I've tried rotating my SECTR sound system object and sources, but to no avail.

    Any ideas?

    Thankyou :)
     
  38. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The spatialization of propagation sources is based on the shortest path via portals between the source and the listener. Sometimes small differences can substantially change the path and cause the effect you hear. Are there multiple paths from the source to the listener? Is it possible the shortest path is different between the sources?
     
  39. Prawnkus

    Prawnkus

    Joined:
    Sep 25, 2015
    Posts:
    2
    No, I can be standing right next to the source, within a single sector and it will still sound as if it's coming from the wrong direction...

    *Edit*
    NEVERMIND! I got it fixed.
    I had the 'spread' turned all the way up in the cue editor, which apparently made the stereo reverse itself on that particular cue.
     
  40. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That would do it! Glad you got it sorted out.
     
  41. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,029
    Hi, im using this with UFPS, I want to be able to turn my player off for cutscenes but when I do and turn him back on then the SECTR audio is no longer heard, why is this? Id expect it to come back when I switch him back on ? Thanks.
     
  42. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    In SECTR if you disable the audio system component or the game object that it's on, it tears down the audio. If you want to mute all audio, then mute the master bus.

    You probably want to make a separate game object for the SECTR audio system. You parent it to the player most of the time, but unparent during cutscenes.
     
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,828
    Is there a built-in way to play an audio cue from random positions? Taking the bird chirp example in the quick start, it's great that you can randomly play bird chirps, but it's unrealistic that they all come from the same point in 3D space. I can easily write a component to randomly move the point source around the area, but then it might end up moving in the middle of a clip playback. Just hoping there is already something to achieve this. If not, I'd like to request this feature.
     
  44. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    This feature already exists for audio environment one shots. Did you want it in another content?
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,828
    Not sure what you mean. What is audio environment one shot? Is that a SECTR Audio feature or a feature built into Unity that I'm unaware of?
     
  46. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    It's a feature in SECTR audio in the audio environment sub system. There's an example in the demos folder.
     
  47. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,828
    Thanks.
     
  48. felizimm

    felizimm

    Joined:
    Feb 11, 2015
    Posts:
    4
    Hi, I want to set up some different bird sounds too like in the quick start example. But in fact, birds aren`t chirping all the time! So, how can SECTR set up pauses/silent with a random length (min, max) between the randomized/shuffled/... chirps? At this moment, I help me by putting some silent audiofiles into the cue, but thats quick and dirty...
     
  49. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    You can just adjust the one shot interval in the audio ambience.
     
  50. felizimm

    felizimm

    Joined:
    Feb 11, 2015
    Posts:
    4
    You mean in an environment zone? It is quite dificult for me to understand e.g. the elements "one shot interval X and Y", some more documentation would be helpful - but the main point is (if I understand right), that enviroments are only for 2D sounds or 3D sounds that both will not change the volume. What I want is a bird, sitting in a tree, chirping sometimes and most of the times being quiet (randomly). When walking around, the bird should get louder or quieter by distance and staying at the same position. Thanks!
     
unityunity