Search Unity

Audial Manipulators [Released] - In-game audio processing

Discussion in 'Assets and Asset Store' started by atmospherium, Apr 22, 2014.

  1. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    I just released my first Unity asset to the Asset Store and I'm really excited to see what other people think. All the effects are MonoBehaviour components that you can drag-and-drop onto any AudioSource game object, so it's incredibly quick and easy to get effects processing working with your current audio. Additionally, every parameter for every component is ready for in-game modification through simple methods.

    The asset package is completely compatible with the free version of Unity but also adds several effects that aren't available in the pro version - there's something for everybody. Check it out and let me know what you think!



    Manipulators (with full source code) include:
    • Compressor - Squash the dynamic range of your audio and even out your sound.
    • Bit Crusher - Get that retro feel instantly.
    • Delay - Give space to your audio stems and, with the wet-signal panning, make your mono tracks feel like stereo.
    • Distortion (standard and foldback) - Whether you want to give your audio some warmth or some bite, these will make it happen.
    • Fader - Nothing more exciting than volume control!
    • Pan Control - And pan control!
    • Reverb - Make your audio sound more organic with a touch of reverb.
    • Saturator - Compression/distortion/hard limiting all in one.
    • State Variable Filter (Low/Hi/Band Pass, Low/Hi Shelf, Band Add) - Completely change the impact of your audio in significant ways, from natural rolloff of high frequencies to extreme filter sweeping, this component does it all.
    • Stereo Widener - Take your audio from mono to stereo and beyond.

    Asset Store: http://bit.ly/1lwvPtp
    Try out the free demo: http://bit.ly/1mWlcFx

    Webplayer Demos (asset package includes scenes and source code)
    Song Mixer

    UPDATE September 1, 2014
    Audial Manipulators 1.5 is now live! This is a substantial update that includes numerous improvements.
    • 5 new components (Phaser, Flanger, Ring Modulator, Gate, and Tremolo)
    • New UI controls for all components (including tooltips)
    • Volume readouts, including Gain Reduction meter for the Compressor
    • New Audial Utils, including Envelope and LFO, that can control Audio and non-Audio code (documentation and demos not currently available, but will arrive shortly).
    • All around performance improvements.

    UPDATE May 14, 2014
    Audial Manipulators are now able to be utilized directly in the G-Audio interface.
    A free demo version of the package is now available (http://bit.ly/1mWlcFx)

    UPDATE April 23, 2014
    Just uploaded a new web-player demo to give people a chance to interact directly with the effects. Check it out: All Effects Demo
     
    Last edited: Sep 2, 2014
    uniphonic likes this.
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Extremely cool! We make the Master Audio plugin and some of our customers have asked how to get more filters (or ANY filters if they don't have pro). I will definitely point them to this package next time they ask and sticky it on our forum!

    I assume you just add one or more of your manipulators to a GameObject that has an Audio Source component. Is that correct?
     
  3. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Thanks a lot! With how frequently I've seen people ask about audio effects I'm surprise that there aren't more packages of this type in asset store.

    Yeah, all you have to do is add the components to any game object with an Audio Source (or Audio Listener) and they execute in the order they appear in inspector. Basic usage is very straightforward.
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Perfect, thank you for the details. I'll add this to a sticky in our forum right now.

    By the way, I was also surprised I didn't see any plugins like this a few months ago.
     
  5. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Thanks a lot for making the info available to your users, I really appreciate it. If you hear of any specific effect requests from your users, let me know. I'm planning on developing this package further over time and would love to know what people are looking for.

    By the way, Master Audio was one of the assets that really opened my eyes to what's possible with audio in Unity, so thanks for (unintentionally) giving me a push to work on project.
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sure, they can come on this thread and ask you directly. I linked to this thread instead of the Asset Store page on my sticky. Cool to know we had some influence on you :)

    Keep up the good work. We will pick up your plugin ourselves if we ever need some extra effects. So far our sound man has it handled.
     
    Last edited: Apr 22, 2014
  7. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    I'm interested in these effects, though I do have Unity Pro. I'd like to hear the quality of the compressor. The demo, i'm guessing that the master has the compressor on it? The effects don't seem to be labeled.

    Also, is it possible to make a demo where the effect parameters can be modified?

    Thanks!
    Jacob
     
  8. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Correct, in the demo I just grouped the whole effect chain for GUI purposes. I'll put a demo together tomorrow that allows for parametric controlling of the components so you can see the impact for yourself. I'll let you know when it's up.

    Thanks for the interest!
    John
     
  9. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    Great! Thanks!

    Another question: any possibility that you could create G-Audio versions of the effects, and include them in the package too? G-Audio has an open architecture for effects, and I'm guessing it shouldn't be too difficult to adapt yours. I might end up doing it my self if you don't, if I buy your package, but I just thought I'd ask. G-Audio has some effects already, so it would mainly be for your Reverb, Compressor, Bit Crusher, Delay, Stereo Widener, Saturator, and maybe Distortion (since G-Audio has foldback only I think).

    http://www.g-audio-unity.com/

    Thanks!
    Jacob

    P.S. I have no affiliation with G-Audio.
     
    Last edited: Apr 23, 2014
  10. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    I'm actually talking with G-Audio about compatibility with their system at the moment. I'm very confident that compatibility with their system will be happening in the very near future. I'll make sure to let you know when I have any news to report.
     
  11. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Jacob,
    I just uploaded a web-player demo that gives direct control over all of the effect components. Try it out and let me know what you think! -- All Effects Demo
     
    Last edited: Apr 24, 2014
  12. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    Very nice! Thanks for making the demo. I thought all of the effects sounded decent to very good. The saturator sounded a little bit more like hard clipping than I was expecting (I was expecting a more gradual soft rounding at lower volumes). The filters are very nice. Impressive that it's all in Unity C#. I really like that the source code is included.

    Do you have any idea what kind of CPU performance you get on Mobile with these?

    Thanks!
    Jacob
     
  13. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Thanks for the feedback, glad to hear things are sounding good to you! I'm still trying to tweak the Saturator so that it's a bit less abrasive and I'm hoping to get that smoothed out in one of the first updates to the package.

    As far as mobile usage is concerned, I don't have consistent access to mobile hardware (other than my personal phone) so I haven't been able to do much testing in regard to performance, just basic confirmation that the components work.

    Unity automatically processes audio at a lower sample rate on mobile devices, and the components in this pack process in tandem with Unity's buffer. Because of this, CPU utilization is inherently reduced for any mobile devices. Given the performance testing I've done on my computer, I have a hard time imagining performance being an issue with many of the effects. The possible exceptions would be the components with extra buffers (Delay and Reverb), although I've had very smooth results with both on my Nexus 4.

    Sorry I can't answer more directly, but I hope that gives you a good feel for what to expect.

    Thanks,
    John
     
  14. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Hi,

    G-Audio dev here,

    Great work! Looking forward to collaborating on compatibility.

    A few things:

    1) On mobile, Unity defaults at 24 kHz, but you can force 44.1 kHz mixing. It requires setting AudioSettings.outputSampleRate in an init dummy scene, and then loading your real first scene. G-Audio has a script and template scene that does just that, and allows per platform settings.

    2) Relates to 1: Unity automatically resamples audio if the clip doesn't match the runtime output sample rate. This is handy, but degrades audio and messes with dspTime ( essentially breaking it - bye bye sample accurate timing ). It also creates significant overhead, as every audio source is resampled independently in realtime. For any kind of involved audio, we strongly advise matching audio clip ant target platform sample rates. G-Audio uses a Sound Bank custom asset to make this process easier.

    3) Inlining processing in filters which call a "Process" method on every single PCM sample might help reducing overhead. Not always practical, but the minute overhead of a method call quickly builds up when it's not one, but 2048 method calls per audio buffer ( default stereo buffer size ).

    All the best!

    Gregzo
     
  15. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    Sounds great, thanks! I just purchased it. :)
     
  16. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Thanks for the info, gregzo! I'm looking to improve performance as much as possible as time goes on so understanding a bit more about how audio gets processed cross-platform is incredibly helpful. I would have guessed that resampling would have been at compilation instead of runtime, but I guess that would be non-ideal in a lot of circumstances.
     
  17. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Awesome! Looking forward to seeing what you make with it. Be sure to let me know if you have any questions, comments, or criticisms.
     
  18. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Cool stuff !
    On to the wishlist :)
     
  19. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Man, I just checked out your portfolio and I'm really impressed. If you end up getting Audial Manipulators and using them in a project, definitely let me know!
     
  20. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    I just saw that a new version of your plugins is in the Asset Store, now with direct G-Audio versions of the effects too! Awesome!

    Really looking forward to trying it out. Thanks a bunch!

    Jacob
     
  21. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Hi,

    Just a quick word to say we're very happy at G-Audio to have your filters now showing up directly in our mixer! Very useful addition.

    All the best,

    Gregzo
     
  22. F.Salka

    F.Salka

    Joined:
    Dec 13, 2013
    Posts:
    43
    holy crap a compressor effect in unity...take my money
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I know, right? Everyone's been asking for it.
     
  24. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Glad to hear it! Many thanks to Gregzo for helping me get everything working smoothly.

    As you try everything out, feel free to pass along suggestions or requests. I really want to try to address whatever audio-filter needs that people might have.
     
  25. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Glad to hear you like it! ;)

    If you think of any other must-have audio filters, feel free to let me know.
     
  26. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Version 1.1 was recently released. Here are the highlights:
    1) Direct integration into the G-Audio mixer panel is now supported. The G-Audio compatible versions are included in a zip folder, simply extracting them to your project folder enables them to be found by the G-Audio mixer panel.
    2) New filter: Simple Delay - a simplified variation of the delay component. Time is set in milliseconds instead of by beat intervals and the panning functionality has been removed. A quick and simple way to get the sound you want without needing to do a lot of tweaking.

    Additionally, a free demo version of the package has been released that includes Distortion, Saturator, and Simple Delay. The free version uses a DLL (no source code provided), but it fully functional: http://bit.ly/1mWlcFx

    As always, I'm looking forward to seeing what you guys do with these!
     
  27. F.Salka

    F.Salka

    Joined:
    Dec 13, 2013
    Posts:
    43
    whenever i add one of your effects to the scene audio listener and hit "play" in editor unity freezes and i have to force stop it, i'm using the following function on awake:

    void Awake ()
    {
    AudioSettings.SetDSPBufferSize (90, 4);
    }

    when i disable this function, the effects and unity works fine, the problem is i can't disable this since i need ultra low latency for my music app

    To replicate this put the previous function in any script and set DSPBuffer size (in audio manager under project settings) to "default", this will stop unity from overriding dsp buffer size and lets you change it from a script.
     
    Last edited: May 16, 2014
  28. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Sorry about the problem, that seems like an interesting issue. I'll work on finding a solution when I get home tonight. My initial guess is that SetDSPBufferSize needs to be completely processed before Unity can append filters to its audio buffer.

    A couple questions:
    1) Is this happening with all Audial components or just certain ones?
    2) If you add Audial components to an object but disable them does the scene still freeze on startup? If the scene loads, does enabling the filters after the scene has started result in the audio working?
    3) Does audio work if you change the buffer size in a previous scene and then load a scene with the Audial filters?

    If you get a chance to try any of these ideas out, let me know what the results are. Thanks for letting me know about this issue. I'm confident that there is a good solution and I'll work to find it ASAP.
     
  29. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    In taking a look at this issue, I believe that I can confirm that it's an issue with how Unity handles the SetDSPBufferSize instead of how the Audial Manipulators are constructed (all of Unity's built-in audio functions seem to have poorly documented quirks). I've tested out the following configuration and can confirm that it resolves the issue on my system. Let me know if it makes any difference for you. Here are the steps I took:

    Create a new scene, and add it to the beginning of your build-order (in the build settings panel).
    Create an empty gameObject and attach a script containing the following:
    Code (csharp):
    1.  
    2. void Awake()
    3. {
    4.     AudioSettings.SetDSPBufferSize (90, 8);
    5.     Application.LoadLevel(1);
    6. }
    7.  
    Make sure to take out any calls to the SetDSPBufferSize function in any of your other scripts, so that it doesn't retrigger the underlying issue. Simply configuring this setting in an earlier scene seems to bypass whatever issue Unity has with handling the buffer resize. I hope this resolves your issue, but if it doesn't just let me know and I'll keep digging deeper.

    John
     
  30. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Just a quick note:

    DSP buffer sizes should be, afaik, powers of 2. Anything lower than 256 is… suicidal, or simply not applied by the system.

    256, 4 is already ultra low latency that may result in hiccups on less powerful systems. 1024 is reasonable
    latency ( 20ms ), 512 already pretty good.

    Cheers,

    Gregzo
     
  31. F.Salka

    F.Salka

    Joined:
    Dec 13, 2013
    Posts:
    43
    Actually no....for a game , 512 buffer size is totally fine and anything below that is just a wast of resources, but for a music app...absolutely not, especially in my case,my app is a virtual instrument that is controlled by a MIDI keyboard....256 introduce huge latency that is only noticeable when you control the app using a digital midi controller and play a difficult fast songs, 90 buffer size made a HUGE huge difference...maybe my app is a unique case and doesn't mean that every music app should go that low for audio latency, i could set the dsp buffer to 64...but that number is too low and you will start to notice underruns and artifacts, and yes in unity you can go for a value lower than 256 only if you set DSPbuffer size to "Default" in project settings, other wise if you set it to "Low latency" or "Good latency" it will override your DSPbuffer script and won't let you go any lower than 256...in fact it won't let you change buffer size at all (it will just override it)...unity audio API is extremely poorly documented.

    You can try my app with a midi controller and see for yourself:
    https://itunes.apple.com/us/app/the-piano-3d/id771068869?ls=1&mt=8

    the DSP buffer size is set to 90 on ipad air and ipad 4, and 200 for ipad 2 and ipad 3, ipad 2 seems to have a much lower latency with unity compared to ipad air which is weird , that's why i had to go for a 90 buffer size on the newer devices.

    @atmospherium i can confirm it works, thanks :) next step is to test it on my iPad(s).
     
    Last edited: May 18, 2014
  32. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    My bad, it seems that yes, Unity does let you set any buffer size.

    I still advise strongly against non power of 2 buffer sizes, and against crazy small buffers.

    For one, FFT algorithms work with power of 2 buffers, and need at least 1024 samples to do anything useful.

    Secondly, non power of 2 buffers are completely non-orthodox. You might run into issues sooner or later.

    Thirdly, keeping the audio thread running smoothly at such a high rate is challenging.

    Last, don't try this on Android!

    But then again, if it seems to be working for you...
     
  33. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Audial Manipulators is currently the Unity Deal of the Day! Get real-time audio effects for just $15! If you try it out and like it, please rate and review.
     
  34. F.Salka

    F.Salka

    Joined:
    Dec 13, 2013
    Posts:
    43
    I discovered one more issue : you need to rename the folder "EditorDependencies" to "Editor".... building to iOS player without renaming obviously causes build errors since AudioTesterInspector.cs script uses the UnityEditor class which is not supported at runtime.
     
  35. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Thanks for the heads up on that and sorry for any inconvenience that caused. I'm finishing up an update and have the Editor folder properly named in the hierarchy now. I'm hoping to submit it to the Asset Store tonight.

    There are several new features being added with this update, including new components (Gate, Phaser, Flanger), new utilities (Envelope, LFO), as well as some modifications to the UI. Hopefully it's worth the wait. ;)
     
  36. atmospherium

    atmospherium

    Joined:
    May 12, 2013
    Posts:
    38
    Audial Manipulators 1.5 is now live! This is a substantial update that includes numerous improvements.
    • 5 new components (Phaser, Flanger, Ring Modulator, Gate, and Tremolo)
    • New UI controls for all components (including tooltips)
    • Volume readouts, including Gain Reduction meter for the Compressor
    • New Audial Utils, including Envelope and LFO, that can control Audio and non-Audio code (documentation and demos not currently available, but will arrive shortly).
    • All around performance improvements.
    Check it out and let me know what you think!

    I've been made aware of a minor bug that can impact the Reverb in certain scenarios. I have fixed this in version 1.5.1, which is currently under review. If you need this fixed now, update the Awake function in Reverb to contain the following.

    Code (CSharp):
    1. void Awake(){
    2.   Audial.Utils.Settings.SampleRate = AudioSettings.outputSampleRate;
    3.   Initialize();
    4. }
     
    uniphonic likes this.
  37. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    hey i just got your audial manipulators for use with g-audio.
    The effects were missing the namespace GAudio, after adding it all worked fine :)
     
  38. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    iddqd, I had to do the same.

    atmospherium, I just want to say thanks for the 5 new components! Good stuff!

    -Jacob