24 May '13 - 14:57 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Prob with code: Pitch  (Read 1537 times)
Ryzer
Posts: 73


« on: 20 Jul '02 - 19:09 »
Reply with quoteQuote

What is wrong with this code:


Dim statFreq1 as Long



Private Sub ch1Pitch_Change()
On Error Resume Next

If Check1.Value = 0 Then
Call BASS_ChannelSetAttributes(STRM, statFreq1, vbNull, vbNull)
Exit Sub
End If

Dim fre As Long
fre = statFreq1 + (statFreq1 * (ch1Pitch.Value / 100) / 100)
ch1LBLpitch.Caption = ch1Pitch.Value / 100
Call BASS_ChannelSetAttributes(STRM, fre, -1, -101)
End Sub





Private Sub ch1Pitch_Scroll()
ch1Pitch_Change
End Sub


ch1Pitch is max 200 and min -200

I tested the fre before it goes in to
Call BASS_ChannelSetAttributes(STRM, fre, -1, -101)
So the awnser is right like it needs to be.
But I just don't hear anything different...  Huh
Logged
(: JOBnik! :)
Posts: 984


« Reply #1 on: 20 Jul '02 - 22:05 »
Reply with quoteQuote

Hi Grin

You can check the DSP example in BASS_FX package,
and you'll see how to use a DirectX Pitch Smiley

NOTE: You don't have to use BASS_FX to use this code in your program Grin

Have fun!

Cool JOBnik! Cool
Logged
Ryzer
Posts: 73


« Reply #2 on: 21 Jul '02 - 11:53 »
Reply with quoteQuote

I tried, but then my EQ's don't work anymore. So I need to use Bass_FX for them to...
Isn't there a way to change pitch with just Bass.dll only?
How?
Logged
Ian @ un4seen
Administrator
Posts: 15270


« Reply #3 on: 21 Jul '02 - 12:09 »
Reply with quoteQuote

It sounds like you're using DX8/DMO FX (BASS_SAMPLE_FX flag)? In which case, DirectSound doesn't allow the sample rate to be changed. But there are 2 ways you can combine EQ and sample rate control...
  • Use DX8 FX for the EQ, and use resampling for the sample rate control (eg. BASS_FX).

  • Use DSP for the EQ (eg. BASS_FX), and use normal sample rate control (BASS_ChannelSetAttributes).
I believe both of these methods are shown in the BASS_FX examples Smiley
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines