Procedural Audio in UE4

Looking through documentation, I can see how one could create procedural audio, but once an audio file is created, I want it to play on an object, but from I can tell, I believe I need it to play using PlayEventAtLocation, which means I need to get the sound into an event. The sound isn’t going to be an event, its just going a procedurally generated wav file, so how can I get this file to play attached to an object in UE4?

[Edit]
I want to take some time and explain what I need to do. Previous things I’ve done in Unity 4.x. I want to dynamically construct a wav file in game and play it back.

The idea is that you have wav file that plays in game and at any given time I start grabbing data from where the buffer is at until I decide to stop. I take all the data that and place it in a new wav file.

Example like a 20 second file, but I grab the a 7 second audio clip of the data from second 5 through second 12. So my new file is just that. I know you can do similar things in FMOD because I’ve looked at the recording examples and gapless playback examples, etc.

But now I need to migrate this new file that will made in game to UE4. All the plugin files I see accept events only. What is the sound that createSound makes? is it a wav? and fsb? It looks as if all the low level plugin calls in UE4 all require an event to attach to an UObject. I don’t have an event, I just have a sound.

I can’t use designer to make this sound because its dependent on the player at any given time during play.

In Unity, I was able to access the buffer of an audio file, pull data from the buffer for any given time, and create a new file. While pulling data, I would check buffer size and frequency of sound files to make sure I had a gapless playback. (Not perfect, pretty darn close), I’d use the audio functions in Unity to convert my wav file to an audioclip and run it through a sound emitter. It was pretty nice. Because I would keep the original wav file muted, but looping. So the player never knew what they captured.

Since UE4 doesn’t allow access to uncompressed PCM data, I had to use FMOD, but its proving to be just as difficult because either its not documented, or lacks the functionality I want. I need help please.

Hi Tim,
The best way to do that is with an event that has a programmer sound.

To make it easier to use programmer sounds with our UE4 integration, I’ve added extra code and documentation to our integration. The next release will have additional functions in the FMOD audio component to assign programmer sounds either via Blueprint or directly with C++. It will also have extra documentation for how to create a FMOD::Sound and assign it into an audio component, which should be very similar to what you want to do.

We’ll be releasing that version within the next two weeks. If you can wait until then, please read through the new documentation and let me know if you have any questions about it.

Oh, that would be great. As far as waiting, I’ve been researching various methods on how to achieve what I’m looking to do for weeks now anyway, so within the next two weeks should be perfect. I do have some extra questions though if you don’t mind answering them.

What exactly is a programmer sound? From what I’m understanding, it looks like an event that you set up with temporary banks, that get overwritten during run time with your own media. Is that correct?

Has the new documentation been added online already? I can’t seem to find additional information from what I’ve seen already.

A programmer sound is a module that can be placed on a timeline or parameter of an event. When the module needs to play, it will invoke a callback so the runtime code can decide what sound to play:

http://www.fmod.org/documentation/#content/generated/FMOD_STUDIO_EVENT_CALLBACK_TYPE.html

For the UE4 integration, I’ve implemented that callback and exposed the sound to play via blueprint or C++.

I see the new version is out as of a few days ago. Thats awesome. I’d love to start working on this.