0
\$\begingroup\$

This project is done in Unreal Engine 5. I would prefer doing this in C++ instead of Blueprints, but I'm open to any ideas.

I am trying to take an audio file and create the data needed to make an audio waveform (sample image of audio waveform below).

enter image description here

I would like to go "frame by frame" (Sorry I don't know the audio equivalent to video) and try to find the information needed for this, such as the peaks and troughs of the audio file. For example:

frame 0: audio level 0
frame 1: audio level 1
frame 2: audio level 0
frame 3: audio level 2
frame 4: audio level 0

and using this data, a visual waveform can be created.

I have been looking at resources to get this but they all involve plugins that already do this, but I need to create this feature myself and I don't know where to start. If anyone has any sources or tips to get started that would be much appreciated, thank you.

\$\endgroup\$
3
  • \$\begingroup\$ The audio equivalent of a "frame" is usually called a "sample", leading to the "sample rate" which tells you how densely those samples are packed in each unit of time. \$\endgroup\$
    – DMGregory
    Feb 12 at 12:30
  • \$\begingroup\$ You only need to process peaks, the troughs are a mirror image about 0. \$\endgroup\$
    – user122973
    Feb 13 at 23:11
  • \$\begingroup\$ Efficiently rendering that number of lines real-time wold be a challenge. Consider using an fft to bin a window of the audio,EQ display, and render 5-10 rectangles instead of 1000s of lines. Depending on threading, fft or lines may be a toss up. \$\endgroup\$
    – user122973
    Feb 13 at 23:58

0

You must log in to answer this question.

Browse other questions tagged .