Copyright © 2005-2019 MultiMedia Soft

Waveform class

Previous pageReturn to chapter overviewNext page

The Waveform class, accessible through the control's DisplayWaveform property, contains information needed to render the embedded Waveform visual feedback or, in alternative, to generate the full sound's waveform bitmap before starting the sound's playback..

 

It can be used at Run-time in order to create the embedded Waveform and to change its graphic settings.

 

For details about using Visual Feedbacks refer to the How to use the embedded Visual Feedbacks section.

For further details about generating a waveform bitmap of the loaded sound, before starting its playback, refer to the How to obtain the sound's waveform tutorial.

 

The Waveform class is implemented through the following methods and properties:

 

Methods

 

Create

CreateNew

Resize

Show

SetHwnd

AnalyzeFullSound

AnalyzeAbort

BitmapViewDrawToHdc

BitmapViewGetWidth

BitmapViewSaveToFile

BitmapViewSaveToMemory

BitmapViewVerticalLineAdd

BitmapViewVerticalLineRemove

PeaksBufferGet

PeaksBufferLengthGet

PeaksLoad

PeaksLoadFromMemory

PeaksSave

SetBackPictureFromFile

SetBackPictureFromHandle

 

Properties

 

ColorBackground

ColorLine

UpdateResolution

UseHalfColorForPeaks

ZoomPerc

 

The following code snippets show how to create and change this object in your code. These examples assume that you have placed a control named audioDjStudio1 on a form or dialog and that you want to change a couple of graphic settings (Line and Background colors).

 

Visual Basic.NET

 

Here follows the code needed to perform the requested operations

 

' create the Waveform on player 0 over an existing control

AudioDjStudio1.DisplayWaveform.Create(0, PictureBox1.Handle)

 

' set the blue color for Waveform line of player 0

AudioDjStudio1.DisplayWaveform.set_ColorLine(0, Color.Blue)

 

' set the white color for Waveform background of player 0

AudioDjStudio1.DisplayWaveform.set_ColorBackground(0, Color.White)

 

Visual C#.NET

 

Here follows the code needed to perform the requested operations

 

// create the Waveform on player 0 over an existing control

audioDjStudio1.DisplayWaveform.Create(0, pictureBox1.Handle);

 

// set the blue color for Waveform line of player 0

audioDjStudio1.DisplayWaveform.set_ColorLine (0, Color.Blue);

 

// set the white color for Waveform background of player 0

audioDjStudio1.DisplayWaveform.set_ColorBackground(0, Color.White);