Audio Cue with wind-up, looping, and release sections?

I have a wave file. It has a wind-up part, a looping part, and a release part.
I’d like to start playing from the beginning, and loop only the looping part, and then when I get to “stop,” keep playing the file until it reaches the end (the release part.)
is much like how a sample player music instrument treats samples.

I can’t find a good way to do in the UE audio editor. All the “looping” bits just loop the entire sample, and it doesn’t seem to import the markers at all (I make them in Adobe Audition.)

How can I achieve effect?

Is audio, once again, getting short shrift?
Is there no way of doing ?

We’ve discussed the idea of making SoundCues have a behavior like you’re describing, but it is a fairly involved change at that level and we believe there is a good alternative using blueprints. You do have to structure it as 3 different cues (or waves as they are interchangeable for the most part) but by setting up a blueprint you can control the exact behavior you want including cross-fading between the loop and release.

Thanks for the answer. However, I have not been able to get sample-accurate splicing in a blueprint. How would I go about doing that?

You can splice the audio by downloading “Audacity” or another similar program, then open the sound file, and you can choose where and what to split into 3 smaller tracks, then re-import those tracks into UE4. That’s probably the simplest way…

You can get Audacity for free (its open source) from sourceforge here: http://audacity.sourceforge.net/

, thanks for the advice. It doesn’t solve my problem as described in the first post at all, but someone else may benefit.

Sample-accurate splicing is not something that I think you can hope to get in system. Because what we are doing when we start and stop sounds is communicating with the hardware sound thread there is always going to be latency of one sort or another be it at the sound thread level or the game thread due to a frame rate that is not perfectly timed to meet the sample desires.

As I’ve discussed a bit elsewhere (Audio roadmap and APIs - Feedback & Requests - Epic Developer Community Forums) anything that could come close to sample accurate splicing (and even then the tools needed to specify the start/stop times at that level of precision would be more than I can imagine us building in editor in the foreseeable future) requires a software mixer among other things.

Perhaps you could use an external dsp library for ?

Thanks, Marc!

On PC, hardware sound threads are largely a thing of the past, so I assume that you mean the various console targets.

If you support streaming audio sources, then sample-accurate splicing is a simple thing to build, at the cost of a memcpy() of the data. Given the low data rate of audio compared to RAM these days, and the almost perfect streaming/pre-fetching properties of sound data, you could do a hundred of them and it wouldn’t show up on a profile.

So, the way I’d imagine to work would be a new kind of wave source that takes a wave with loop point markers, and has a runtime-settable “looping” flag per instance. Whenever “looping” is set true, the source keeps generating the looped data between the markers. When “looping” is set false, it plays out to the end rater than looping back once it hits the loop point. would hopefully be simple to implement as a variant of a streaming wave source, although it wouldn’t need to “stream” from disk.

Sorry for necroing such an old thread, but I’ve been facing the same for quite a while. UE4’s “Enveloper” node seems to be the intended solution, but isn’t sample-accurate, and hasn’t worked at all for the purpose of looping a specific section of an audio track. I’d love to hear if anyone’s had success with seamless, sample-accurate audio looping with UE4.

I find it hard to believe that such a basic function wouldn’t ever be added to a modern game engine after 7 years, but I’m really struggling to find it.