Audio input to envelope follower

Is it possible to set up an audio input (a real microphone for example) so it can be used with an envelope follower? In the same vain, is it possible to do it with the sound from a media player asset?
Thanks

The word “possible” is too broad. If you can code in C++, it should be fairly easy to setup a mic capture stream on a synth component, feed that through a source effect chain.

As for it being a done feature out of the box, not yet!

For media player, the media framework is getting overhauled. I believe the programmer working on that is planning on using a synth component for the backend. If he does it that way, it’ll be easy to add whatever source effects you want on the media source.

Thank You Kelvin! I justr wanted to know if this functionality is already part of the audio engine or if they were plans to implement live audio input to envelope follower and media framework to envelope follower.

No, this is not currently implemented out of the box. But, if you’re a coder, it’s not too hard to get access to the mic capture and feed it to a synth component… Then, once it’s in a synth component, you can do anything with it (including envelope following, etc).

I’ve been checked and it actually seems to be working with a SoundWaveProcedural as well which is being played by an Audio Component (which is irrelevant but only for the reference). Is there any advantages to go with the SynthComponent or the SWP will be supported for the new audio engine on the long run as well?

Hi Konflict. Did you write the code for sound input? can you give some hints on how to do it please, I am no coder but not afraid of changing adding things on visual studio and compiling source, I did that with the nvidia flex branch. Can you explain how do you achieve sound input to envelope follower? Thanks!

Not really, the engine does already have an implementation for voice capture that you can access.
https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Runtime/Online/Voice/Public/Interfaces/VoiceCapture.h#L65

I am filling up a USoundWaveProcedural with the captured data that is played back by an audio component, so this helps to the envelope follower to “listen” to the actual sound levels, but i’m not sure if this is the preferred way since @Minus_Kelvin proposed a slightly different idea regarding this configuration.

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