- Home /
How to do custom realtime audio effects (like Unity reverb)?
I'm interested in creating some realtime audio effects for my game, so I'm wondering a few things. Mainly, I'm asking how to access the sample data inside audio files from C# scripts, but I also need to know how I can process playing sounds with audio effect algorithms that I write. i.e how do I actually route the realtime audio stream to a processing algorithm?
Normally in a script to play a sound, you'd write "audioSource.Play();", so I think possibly I want to override the Play() function in a way that the audio file data is processed by an effect before it is actually made audible?
A good example of what I'm hoping to achieve would be similar to the reverb effect already available in Unity. The reverb module exists for every audio source, and applies some processing to the sound being played when enabled. I want to create other audio effects that are essentially modeled after the reverb.
Any thoughts on how to do this?