Author Topic: Drawing an audio waveform  (Read 461 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1897
    • zapsolution
Drawing an audio waveform
« on: December 18, 2021, 08:02:38 pm »
This 64-bit C++ project allows you to draw an audio waveform like in Audacity.

Use :
Drag & drop an audio file in mp3, ogg, wav format.
Or click on the Play button to use the default music.

The "CreateWaveform" procedure decodes the audio channel with BASS_StreamCreateFile (Bass.dll)
and uses ZI_CreateDIBSection (GDImage64.DLL) to represent the PixelArray.

The "Animate" function then takes care of visualizing the progress of the audio stream as the music is played.
The blinking cursor can be moved forward or backward, with progress being updated accordingly.


« Last Edit: December 18, 2021, 11:24:35 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1897
    • zapsolution
Re: Drawing an audio waveform
« Reply #1 on: December 20, 2021, 04:40:14 pm »
Here is the C++ skinned version, with a couple of changes.

Click on the top left icon (with the left or right mouse button) to change the skin wallpaper background.

« Last Edit: December 20, 2021, 04:43:10 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1897
    • zapsolution
Re: Drawing an audio waveform
« Reply #2 on: February 08, 2022, 02:47:27 pm »
Here is the PowerBASIC 32-bit version that is the exact transcription of the C++ version,
except for the PixelArray, because the x,y multidemensional coordinates are swapped.
Patrice
(Always working with the latest Windows version available...)