JOBnik's Forum
BASS_FX => BASS_FX => Topic started by: Bckspc on January 14, 2009, 04:58:29 AM
-
Hi :)
Is it possible to use this with VB2008?
Sorry if it is a simple question am only young and just learning VB :)
Thanks
Bckspc :)
-
Hi ;D
Of course you can use it in VB2008 or any other programming language as well, even in OSX and Linux :)
To use it with .Net, please take a look on BASS page for BASS.NET API:
http://www.un4seen.com/bass.html#apis
-
Thanks for the reply :)
I am only new to VB so still working my way through it.
Backspc :)
-
Hi JOBnik, :D
I am having a bit of trouble understanding how to use this, the samples I have tried are for VB06 and don't convert correctly (and I don't know enough to fix them :(). I have posted a question on Un4seen Developments Forum > Developments > BASS > Topic: Help with VB 2008. but am still having trouble. Could you please point me in the right direction, if you could?
All I want is to get the bpm of a mp3 or mpeg and display the results in a text box. It all sound so simple, but I am struggling with this.
Thanks
Bckspc :)
-
Hi ;D
Get BPM from decoded stream:
Dim bpmHandle As Long, bpmDecode As Single
' create decode stream
bpmHandle = BASS_StreamCreateFile(BASSFALSE, StrPtr(filename), 0, 0, BASS_STREAM_DECODE)
' get bpm value from position 0 to position 30 (in seconds)
bpmDecode = BASS_FX_BPM_DecodeGet(bpmHandle, 0, 30, 0, BASS_FX_BPM_BKGRND Or BASS_FX_FREESOURCE, 0)
' free decode bpm and stream handles
Call BASS_FX_BPM_Free(bpmHandle)
Get BPM in real-time after chosen period of seconds:
' set bpm callback to trigger after 10 seconds
Call BASS_FX_BPM_CallbackSet(chan, AddressOf GetBPM_Callback, 10, 0, 0, 0)
' remove bpm callback from stream handle
Call BASS_FX_BPM_Free(chan)
' callback function to get the bpm after period of time
Public Sub GetBPM_Callback(ByVal handle As Long, ByVal bpm As Single, ByVal user As Long)
textbox.text = bpm
End Sub