0
0

Hi,

Will there be functionality for changing the playback rate without changing the pitch in FMOD Ex ?

David

  • You must to post comments
0
0

Hi,

Since I’m a VB programmer I can only guess that the &dsp is the address of a function ?

And how do I set the pitchshift in that function ?

Anyone who can give me a VB eample ?

David

  • You must to post comments
0
0

[code:2k60vko2]
Dim dsp as Long
...

FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_PITCHSHIFT, dsp)

FMOD_Channel_AddDSP(channel, dsp)
[/code:2k60vko2]

  • You must to post comments
0
0

Hi again,

What is this dsp variable ?

And how do I set the actual pitch shift ?

David

  • You must to post comments
0
0

[quote="ddebono":1pa92kr6]Hi again,

What is this dsp variable ?

And how do I set the actual pitch shift ?

David[/quote:1pa92kr6]dsp is a variable that contains the handle of the pitch shift DSP unit. Kind of like how hDCs and hWnds work in VB.

I’m pretty sure you would set the pitch shift by using the DSP property APIs.

  • You must to post comments
0
0

Hi,

I understand now (I think), but my code gives an error:

[code:3dxkefia]
Dim sound2 As Long
Dim channel As Long
Dim dspPitch As Long
Dim sgPitchVal As Single
Dim exinfo As FMOD_CREATESOUNDEXINFO

Private Sub Form_Load()
Dim result As FMOD_RESULT
Dim version As Long

' Global settings
result = FMOD_System_Create(System)
ERRCHECK (result)

result = FMOD_System_GetVersion(System, version)
ERRCHECK (result)

If version <> FMOD_VERSION Then
    MsgBox "Error!  You are using an old version of FMOD " & version & ". " & _
           "This program requires " & FMOD_VERSION
End If

result = FMOD_System_Init(System, 32, 16, FMOD_INIT_NORMAL, 0)
ERRCHECK (result)

result = FMOD_System_CreateSound(System, "../../examples/media/jaguar.wav", FMOD_SOFTWARE, exinfo, sound2)
ERRCHECK (result)

result = FMOD_System_CreateDSPByType(System, FMOD_DSP_TYPE_PITCHSHIFT, dspPitch)

sgPitchVal = 1.5

result = FMOD_DSP_SetParameter(dspPitch, FMOD_DSP_PITCHSHIFT_PITCH, sgPitchVal)

result = FMOD_System_PlaySound(System, FMOD_CHANNEL_FREE, sound2, 0, channel)

result = FMOD_Channel_AddDSP(channel, dspPitch)

ERRCHECK (result)

End Sub[/code:3dxkefia]

When I try to set the paramter dor the DSP it gives an division by zero message. I have also tried to move the setparameter to after the adddsp with the same result.

David

  • You must to post comments
0
0

When using the GetParameterInfo on the dsp (result = FMOD_DSP_GetParameterInfo(dspPitch, FMOD_DSP_PITCHSHIFT_PITCH, stmp1(0), stmp2(0), stmp3(0), 255, sg1, sg2)) it returns:

Center freq
hz
Frequency center. 20.0 to 22000.0. Default = 8000.0.
20
22000

  • You must to post comments
0
0

Goodie….

I found the bug. The bug is in the bas file with the enumerations.

You have forgotten to include the HIGHPASS enum so that the PITH enum gets the wrong enum.

A word of advise….Always number the enums with a value then this things are less likely

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.