How to edit Mp3 Audio raw data in vb6?

Started by Creadig,

Creadig

Good afternoon, everyone! I need someone to please explain or help me achieve something similar to the attached image. I need to add an mp3 audio editing feature to my program very similar to the one in the image in Visual Basic 6 using the Bass.dll library. I can't find an example of how to do this in the Bass documentation. I would be eternally grateful for any help.

jpf

I believe there's no way to display that waveform without first decoding the mp3 raw data into pcm.

Also mp3 raw data isn't easy to edit without adding artifacts. If you don't mind the artifacts you could probably just cut out or move whole frames.

I don't think Bass would be of much help doing this.

The easiest and more usual way to edit mp3 audio is to first decode it into pcm data, then edit the pcm data, then recode again into mp3.

If you'd like to take this approach, the pcm data can be plotted into a PictureBox using the Line and PSet methods. For zooming and scrolling through the graph you'll probably need to redraw it for each offset and zoom desired. Then cutting and inserting segments of the waveform would be done entirely in the array holding the pcm data.