Audio Engine thread

So will this allow more fine control over Doppler effects then? The current Doppler is kinda rubbish in that you can only tweak a few numbers but I am looking for something far more advanced like a sample graph for Doppler.

I finally got round to enabling the required setting tonight and had some fun making a quick random music generator…it’s no Mozart yet but I knocked it up in around 30 minutes…I’m going to have some serious fun with these new audio tools!!

Big love to the audio team :slight_smile:

The new audio engine doesn’t deal with “leafy” features like Doppler. As I detail in my GDC talk, it’s a new low-level audio renderer. Since it’s a new audio renderer, we were finally able to implement less-leafy features like realtime synthesis, a submix graph, and source and submix DSP effects. You don’t need any of this to do Doppler.

Doppler shift is actually a pretty leafy feature and not too bad to implement in BP, so it’ll always end up as lower-priority thing to support. The issue is compounded with the fact that most games don’t actually need a procedural Doppler shift feature as it can easily sound cheesy since pure pitch shifting is almost always not that cool.

In the less-cheesy cases, “baked” Doppler shift is usually more effective from a sound design perspective since you can incorporate other aspects to the situation. E.g. air pressure modulation/noise/wind, etc. Although Doppler Shift in real life is a pitch-shift phenomenon, in reality, there’s a lot more involved.

To do a “baked” implementation, you’d usually implement some sort of game logic to differentiate states (i.e. is the sound moving toward me). Most cases of quickly moving sound sources in games involve projectiles or vehicles. Projectiles can almost always be faked and it sounds good. Non-trivial vehicle audio almost always uses some sort of state-machine-like implementation anyway, and if Doppler is important, you can always add in a “state” for “the vehicle is moving toward the listener at high velocity” and play a sound that has baked Doppler shift. At that point though, might as well just do a custom Doppler implementation (in BP) so you can have precise control of it.

However, in terms of hand-rolling your own in BP if you must do procedural Doppler shift, it’s pretty straightforward. First, realize that you can set the pitch of sounds directly with audio components. So all you need to do is compute the relative velocity and map that to a pitch-shift scale on an audio component. You could also just use the relative velocity directly with the Doppler shift equation (http://formulas.tutorvista.com/physics/doppler-shift-formula.html) but I find “fudging” it by doing a mapping almost always sounds better than making it physically accurate.

All that said, no idea what you mean by “a sample graph for Doppler”. What’s a sample graph? You mean a state-machine-like system? Best done with BP.

This is AWESOME. I’m going to tweet this out!

I’d like to see you’re progress. Check out the source effects/Source effect chain stuff! It should be easy to figure out.

I actually spent some proper time on this yesterday and managed to play around with the source effect chain stuff…I got some incredible sounds out of it too. I’ll try to record a new video tonight and upload.

I’ve not had any success with the granular synth yet though. I think there may be a memory leak going on as Windows crashes out with an out of memory error.

I’ll try to figure out what is causing it and let you guys know.

:slight_smile:

Regards,

ULLS

I’ve started a separate thread for the random music generator which can be found here

Nice work so far! Were you able to manipulate the source effects from within blueprints? I can’t seem to find a way to reference them directly to change e.g. distortion or filter cutoff based on game input.

On a related note, I can’t seem to get reverb to affect the synth, using either global reverb in World Settings, or an Audio Volume with reverb in the level, or even an Activate Reverb node in the blueprint…

But I’m having so much fun regardless… I’m planning to generate sound effects and atmospheric soundscape audio, but I got sidetracked and caught myself just playing a 3-osc synth like it was a guitar + delay pedal:

Haven’t tried granular synth yet, and only had one fatal crash on my promoted branch build from Apr 5th after a lot of playing, but otherwise everything works so well, no noticeable latency, and only extremely rare audio glitches (sounds like buffer underrun, which may just be my soundcard/PC vs a problem with the engine).

Looking forward to digging deeper and seeing other people’s work!

Unfortunately, there doesn’t appear to be a way of modifying the source effect parameters via blueprint yet, however you can set send levels so you could in theory set-up a bunch of different effect chains and send the synth output to them when desired.

There are a few patchable effects for the synth module though and these can be controlled via blueprint…I was going to take a look at writing a few of my own at some point, I’m a bit of a filter freak and would love to see a comb filter and few more LPF variants.

I’ve not tried the reverb stuff yet but I’ll try and have a go tonight and let you know what I find…

I really wanna play your vid but my boss is sitting directly in front of me so can’t really make noise haha!! :wink: (I’ll check it when I’m home)

Edit: cool vid :slight_smile:

Great idea :wink: Not ideal but a workable hack until we understand more and further functionality is made accessible in final code.

I like the flexibility this provides, and currently have an LFO slowly sweeping open the LPF when the accelerator is held down for a while… but I’m crazy and like to mash multiple instruments into an effects chain, add overdrive, then filter, then brickwall compression, maybe even with a sidechain to add some further modulation. And control all that from blueprints in-game :wink: Can’t have too many options, but I understand these are early days and I can be patient…

I’m no good at code, but I’ve come this far, might be worth digging into the code further to better grok the plumbing and see if I’m missing something.

The more the better – I don’t think we’ll reach the breadth of the community-made synths & effects available for dedicated audio software (e.g. Reaktor User Library, just wow) any time soon, but I love what Epic is doing here to open the door to us.

Appreciate the input, thanks!

Hey Audio Cats, you most certainly can set Source Effect Settings in BP. You just need a reference to the Source Effect itself to change it. This could be a reference to an asset in your project, or a reference to a procedurally created/defined Source Effect in BP.

Here’s a BP where I map my distance from a synth actor to the player to the BitCrusher parameters causing the Source Effect to crush more the closer I get:

Awsome!! I didn’t realise this was possible…This is a game changer :smiley:

Will the new audio engine be able to handle mutlichannel DSP? I’m looking forward to doing some ambisonic processing and this would require to handle signal flows of at least 4 channels for first order ambisonics.

Submix effects are multi-channel (in fact they have to support up to 7.1 audio even if the game is connected to stereo). Source effects are currently only mono and stereo! Eventually, I might come up with a way to open up source effects to multi-channel sources, but it’ll probably be when we tackle general/better multi-channel source support (e.g. not requiring splitting multi-channel source into separate files with a naming convention, etc).

These little experiments are great! Keep them coming!

Thanks Minus_Kelvin for your reply. I’ve been doing some VR art projects that have been using Max/MSP for the realtime audio synthesis and spatialization (using ambisonics) but with the new UE4 audio engine I’m looking forward to doing all the DSP in engine instead. Also in general VR seems to be adopting ambisonics as spatial audio technology so it would be great to have it working in UE4, maybe even including encoders and decoders by default?

So, right now (4.16 branch), and using stereo sources, would it be possible then to open two stereo files (four ambisonic channels split in 2 stereo) and play them in complete sync for further ambisonic processing and decoding (I guess this DSP done using submix effects for this)?

Now that the beast is out to the public in the preview form! Anyone mind doing a basic set-up of getting this going? I’ve been able to get sounds coming out from the MySynth CPP solution as showcased in the GDC talk ( Which was amazing by the way )
But I am completely unable to get any sound out of the modular synth what-so-ever.

This is what worked for me to get the modular synth working with blueprints:

It was a couple weeks ago but I think I pared it down to the bare minimum and included all the key steps :wink:

That got me rolling, thanks a billion!

So is it just me or does the attack not work as expected? As I enable attack on the synth it begins rising and about halfway through the rising there is a very clear snap to full play instead of the complete gradual rize.

A lot of quality information about different aspects of the new audio engine has been posted to the 4.16 preview release thread. Including some stuff about the state of it on android, quick synth setup guide, some Steam audio stuff and most recently as I write this a great guide on getting started using an envelope follower.

By my reckoning the fun starts around the following post onwards on the thread. Lots of helpful screenshots, great stuff :slight_smile:

Shouldn’t be abrupt, however it’s definitely not linear. It uses a RC-Circuit (resistance/capacitor) based envelope generation technique to make it sound more analog-y. Similar technique is used my envelope follower, which is used in the compressor.

http://www.earlevel.com/main/2013/06/02/envelope-generators-adsr-part-2/

So won’t sound like a linear ADSR.

That said, there could be a bug, but we haven’t run into any envelope issues per-voice. I did recently run into an issue with re-using an envelope with a single voice (working on an idea for a new mono-synth) and retriggering it, but that shouldn’t be an issue with the sub-synth.

it works!
thank you :slight_smile:
heres a super quick test of a drum machine using the synth plugin