Analyzing audio in C++ / Unreal Engine 5 without plugins

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 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.

Read more here: Source link