Page 2 of 2
Re: Ver #2 :Simple sound Player using BASS [Stereo & Mono Fi
Posted: Thu Jun 21, 2018 9:47 am
by RASHAD
Yes you are right
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

Re: Ver #2 :Simple sound Player using BASS [Stereo & Mono Fi
Posted: Thu Jun 21, 2018 10:16 am
by infratec
Hi,
this looks more real (quick hack)
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
More like AudaCity
Bernd
Re: Ver #2 :Simple sound Player using BASS [Stereo & Mono Fi
Posted: Thu Jun 21, 2018 10:37 am
by RASHAD
No way
Previous post updated to treat wav mono files
Re: Ver #2 :Simple sound Player using BASS [Stereo & Mono Fi
Posted: Thu Jun 21, 2018 9:47 pm
by RASHAD
Previous post updated
Added new feature
Improved FFT implementation by CELTIC88
Speed optimized (For now

)
Re: Ver #2 :Simple sound Player using BASS [Stereo & Mono Fi
Posted: Sat Dec 19, 2020 10:29 pm
by chris319
Where to find
bassflac.dll
bass_ac3.dll
basswma.dll
They are not in bass24.
13 POLINK errors.
FAIL.
Re: Ver #2 :Simple sound Player using BASS [Stereo & Mono Fi
Posted: Sun Dec 20, 2020 12:14 am
by ozzie
chris319 wrote:Where to find
bassflac.dll
bass_ac3.dll
basswma.dll
https://www.un4seen.com/bass.html#addons