Audio input to envelope follower

The voice capture code uses DirectSound, and is a suitable solution on windows. I added general support for mic capture for a SIGGRAPH demo last year (Real Time Cinematography: Siggraph 2016 Reveal | News | Unreal Engine - YouTube) but it’s currently deeply setup to work with Sequencer only. The code is pretty generalized and should be useable elsewhere but might take a bit of messing around to get it exposed to BP or wherever you want to do things. Check out AudioRecordingManager.h/.cpp to see how I record straight from mic capture to a USoundWave which can be serialized.

SynthComponent is a convenient wrapper around a sound-wave procedural. So it’s really using the SWP object. Getting a SWP setup right is tricky and it’s not really a great solution on its own as you need a handle to it in BP or elsewhere. A synth component is basically a wrapper around an audio component with a SWP and performs the appropriate buffer conversion to PCM and allows you to simply feed float data to it in a callback. Allows you to do realtime synth in 30 seconds (i.e. you can create a procedural sound wave that generates a sine tone in 30 seconds of work). I even made a .template file for it so if you go to “create new C++ class” and inherit from USynthComponent, it’ll code generate you a sine-wave generator. I demo’d this at GDC this year live on stage. The Future of Audio in Unreal Engine | GDC 2017 | Unreal Engine - YouTube