Author Topic: bass_fxp dsp EQ problem :-(  (Read 9987 times)

Ryzer

  • Posts: 73
bass_fxp dsp EQ problem :-(
« on: 19 Aug '03 - 21:25 »
Hi,

I'm creating a class for mu DJ studio containing functions and properties to control a channel with bass. Everything worked fine until I added DSP Equalizer from the newest bass_fx (my bass version is the newest since I downloaded today). I'm working in Visual Basic 6.

Here are the form subs I use to test:

Code: [Select]

Dim WithEvents Channel1 As clsChannel

Private Sub Form_Load()
Set Channel1 = New clsChannel
Channel1.InitBass (Me.hWnd)
Channel1.OpenFile "F:\test.mp3"
Channel1.Play
Channel1.PositionInSec = 60
Channel1.Volume = 100
Channel1.Pitch = 0
Channel1.EnableEQ = True
End Sub

Private Sub Form_Unload(Cancel As Integer)
Channel1.FreeBass
End Sub


Now the problem is: since I added "Channel1.EnableEQ = True" my musis plays for about a second and I don't hear anything anymore after that...

here are the EnableEQ propertie LET and GET:

Code: [Select]

Public Property Get EnableEQ() As Boolean
   EnableEQ = ChannelEQ
End Property

Public Property Let EnableEQ(Enabled As Boolean)
   If Enabled = True Then
       Dim EQ As BASS_FX_DSPPEAKEQ
   
       Dim F As Long
       Call BASS_ChannelGetAttributes(Handle, F, 0, 0)
       
       Call BASS_FX_DSP_Set(Handle, BASS_FX_DSPFX_PEAKEQ)
       Call BASS_FX_DSP_Set(Handle, BASS_FX_DSPFX_PEAKEQ)
       Call BASS_FX_DSP_Set(Handle, BASS_FX_DSPFX_PEAKEQ)
       
       EQ.lFreq = F
       EQ.fBandwidth = 2.5
       EQ.fQ = 0
       EQ.fGain = 0
       
       EQ.lBand = 0
       EQ.fCenter = 125
       Call BASS_FX_DSP_SetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
       
       EQ.lBand = 1
       EQ.fCenter = 1000
       Call BASS_FX_DSP_SetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
       
       EQ.lBand = 2
       EQ.fCenter = 8000
       Call BASS_FX_DSP_SetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
       
       Me.EqBass = 19
       Me.EqMid = 5
       Me.EqTrebble = 5
       
       ChannelEQ = True
   Else
       Call BASS_FX_DSP_Remove(Handle, BASS_FX_DSPFX_PEAKEQ)
       ChannelEQ = False
   End If
End Property


and finnaly the properties to set the DSP equaliser values:

Code: [Select]

Public Property Get EqBass() As Long
   Dim EQ As BASS_FX_DSPPEAKEQ
   EQ.lBand = 0
   Call BASS_FX_DSP_GetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
   EqBass = EQ.fGain
End Property

Public Property Let EqBass(EqValue As Long)
   Dim EQ As BASS_FX_DSPPEAKEQ
   EQ.lBand = 0
   Call BASS_FX_DSP_GetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
   EQ.fGain = EqValue
   Call BASS_FX_DSP_SetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
End Property

Public Property Get EqMid() As Long
   Dim EQ As BASS_FX_DSPPEAKEQ
   EQ.lBand = 1
   Call BASS_FX_DSP_GetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
   EqBass = EQ.fGain
End Property

Public Property Let EqMid(EqValue As Long)
   Dim EQ As BASS_FX_DSPPEAKEQ
   EQ.lBand = 1
   Call BASS_FX_DSP_GetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
   EQ.fGain = EqValue
   Call BASS_FX_DSP_SetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
End Property

Public Property Get EqTrebble() As Long
   Dim EQ As BASS_FX_DSPPEAKEQ
   EQ.lBand = 2
   Call BASS_FX_DSP_GetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
   EqBass = EQ.fGain
End Property

Public Property Let EqTrebble(EqValue As Long)
   Dim EQ As BASS_FX_DSPPEAKEQ
   EQ.lBand = 2
   Call BASS_FX_DSP_GetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
   EQ.fGain = EqValue
   Call BASS_FX_DSP_SetParameters(Handle, BASS_FX_DSPFX_PEAKEQ, EQ)
End Property


Can anyone see what the problem is??
Thanks!

Ryzer

  • Posts: 73
Re: bass_fxp dsp EQ problem :-(
« Reply #1 on: 21 Aug '03 - 12:46 »
I really need some help here can some plz look at it  :'(

(: JOBnik! :)

  • Posts: 1065
Re: bass_fxp dsp EQ problem :-(
« Reply #2 on: 21 Aug '03 - 13:43 »
Hi ;D

Could you please send me the whole thing and I'll take a look at it :)
Send the class and an example :)

Have fun!

8) JOBnik! 8)
« Last Edit: 21 Aug '03 - 13:47 by JOBnik »

Ryzer

  • Posts: 73
Re: bass_fxp dsp EQ problem :-(
« Reply #3 on: 21 Aug '03 - 13:50 »
Holy Crap  ;D I got it to work  :D

Thanks anyway (I don't know what the problem was however lol)

Ryzer

  • Posts: 73
Re: bass_fxp dsp EQ problem :-(
« Reply #4 on: 23 Aug '03 - 17:13 »
Ok it failed again  :(
JobNIK still interested in taking a look at it?
Thanks

(: JOBnik! :)

  • Posts: 1065
Re: bass_fxp dsp EQ problem :-(
« Reply #5 on: 23 Aug '03 - 17:47 »
Hi ;D

Yep, of course :) feel free to send me to check it out ;)

Have fun!

8) JOBnik! 8)

(: JOBnik! :)

  • Posts: 1065
Re: bass_fxp dsp EQ problem :-(
« Reply #6 on: 25 Aug '03 - 12:18 »
Hi ;D

I've found the problem in your application :)
All you have to do is to add:

ChDrive App.Path
ChDir App.Path


In your function:
Private Sub djOpen_Click(Index As Integer)
After this line:
If Err.Number = 32755 Then Exit Sub

Because the CommonDialog is actually changing the current
path of Windows itself and VB's, so what happens is the BASS_FX.DLL is not being found :)

Have fun!

8) JOBnik! 8)

CatHerder454

  • Posts: 12
Re: bass_fxp dsp EQ problem :-(
« Reply #7 on: 29 Aug '03 - 04:22 »
or put bassfx dll in your system folder

c:\windows\system or c:\windows\system32 probably  ;)

Ryzer

  • Posts: 73
Re: bass_fxp dsp EQ problem :-(
« Reply #8 on: 7 Sep '03 - 11:55 »
Thanks it works :)

PS: Sorry for the late reply but I had problems with my PC...