hi adam_s, did you found the way to get the waveform ?
Hey Uriel, unfortunately not.
What I do at the moment, is play the sample, get the bus peak volume and append it to an array.
Then I use this array with the draw_line() function to draw something like a waveform.
However, the result is not as accurate as I would like.
Hi!
Unfortunately, I don’t have the answer to your question
However, here are some clues. I need a waveform too in my project, and I’m using ffmpeg for that, with OS.execute()
OS.execute("./ffmpeg/ffmpeg.exe", ["-i", audio.ogg, "-filter_complex", "compand=gain=-6,showwavespic=s=1280x240:colors=blue,drawbox=x=(iw-w)/2:y=(ih-h)/2:w=iw:h=1:replace=1:color=blue-frames:v", "1", waveform.png, "-y"], true)
It might seem obscure, but here is the doc for that
It generates a png image that I scale afterward.Not the best solution, but it fits my needs.
If you want to know how they did it in Godot, here are useful links in the source code: