Just change wavex = 1 to wavex = 2
A lot of work needed with FFT
But remember I am not a multimedia fan. Only GUI player

Code: Select all
Procedure UpdateWaveImage(PBImage, *SampleData.Sample, SampleCount)
Protected LastL, CurrentL, LastR, CurrentR
If *SampleData And SampleCount
StartDrawing(ImageOutput(PBImage))
Width = OutputWidth() : Height = OutputHeight()
If chans = 1
VOffsetL = Height >> 1
Else
VOffsetL = Height >> 2 : VOffsetR = VOffsetL + Height >> 1
EndIf
Mul = (VOffsetL * $19999) >> wavey
If chans = 1
Mul = (VOffsetL * $19999) >> wavey
EndIf
Box(0, 0, Width, Height, $0000FF)
Line(0, VOffsetL, Width, 1, wavecolor)
If chans = 2
Line(0, VOffsetR, Width, 1, wavecolor)
EndIf
SamplesPerPixel = (SampleCount + Width - 1) / Width
MinL = $7fff : MaxL = $8000 : MinR = $7fff : MaxR = $8000
MinL_ = $8000 : MaxL_ = $7fff : MinR_ = $8000 : MaxR_ = $7fff
x = - 2
While SampleCount
If *SampleData\l < MinL
MinL = *SampleData\l
CurrentL = MinL
ElseIf *SampleData\l > MaxL
MaxL = *SampleData\l
CurrentL = MaxL
EndIf
If chans = 2
If *SampleData\r < MinR
MinR = *SampleData\r
CurrentR = MinR
ElseIf *SampleData\r > MaxR
MaxR = *SampleData\r
CurrentR = MaxR
EndIf
EndIf
*SampleData + 4
Sample + 1 : SampleCount - 1
If Sample = SamplesPerPixel Or SampleCount = 0
MinL = (MinL * Mul) >> 16 : MaxL = (MaxL * Mul) >> 16
;LineXY(X, VOffsetL - MinL, X, VOffsetL - MaxL, wavecolor)
CurrentL = (CurrentL * Mul) >> 16
LineXY(X, VOffsetL - LastL, X, VOffsetL - CurrentL, wavecolor)
LastL = CurrentL
If chans = 2
MinR = (MinR * Mul) >> 16 : MaxR = (MaxR * Mul) >> 16
;LineXY(X, VOffsetR - MinR, X, VOffsetR - MaxR, wavecolor)
CurrentR = (CurrentR * Mul) >> 16
LineXY(X, VOffsetR - LastR, X, VOffsetR - CurrentR, wavecolor)
LastR = CurrentR
EndIf
X + wavex : Sample = 0
EndIf
Wend
StopDrawing()
EndIf
EndProcedure
https://www.un4seen.com/bass.html#addonschris319 wrote:Where to find
bassflac.dll
bass_ac3.dll
basswma.dll