0
0

Hi

I have a sound file of about 5 seconds that loops perfectly, seamlessly without any clicks. I need to be able to change the pitch of this file, but without changing the speed of the sound sequence, and in addition sustain the perfect looping. Do anyone know a way to do this? Suggestions would be greatly appreciated.

Thanks in advance.

Keitel

  • You must to post comments
0
0

I can try it out. Thank you.

Best regards

Keitel

  • You must to post comments
0
0

Have you tried increasing the FFT size to improve quality?
FMOD_DSP_PITCHSHIFT_FFTSIZE.

  • You must to post comments
0
0

The FMOD_System_CreateDSPByType function will create an FMOD::DSP for you, you need to give it the address of your FMOD::DSP pointer not an uninitialized pointer-to-pointer, like this:

[code:2u7mof9c]FMOD_DSP *dsp;
FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_PITCHSHIFT, &dsp);[/code:2u7mof9c]

and hence your add DSP call should be like this:

[code:2u7mof9c]FMOD_Channel_AddDSP(channel[1], dsp, 0); [/code:2u7mof9c]

  • You must to post comments
0
0

Thank you, now it works. However, I am sorry to say that the sound quality of the changed pitch is a little poor, so I believe I have to find another solution.

Best regards

Keitel

  • You must to post comments
0
0

Hi,

Could you please check this code. Something is wrong as the program won’t start. I am working in C for Windows.

[code:2gh8p6oc]
FMOD_DSP ** dsp;

result = FMOD_System_Create(&system);

FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_DSOUND);

result = FMOD_System_GetVersion(system, &version);
result = FMOD_System_Init(system, 1024, FMOD_INIT_NORMAL, NULL);

result = FMOD_System_CreateSound(system, "tampura4.aiff", FMOD_CREATESAMPLE | FMOD_HARDWARE | FMOD_LOOP_NORMAL | FMOD_2D, 0, &sound[0]);

FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_PITCHSHIFT, dsp);

result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound[0], 1, &channel[1]);

FMOD_Channel_SetFrequency(channel[1], keyfrequency);

FMOD_Channel_AddDSP(channel[1], *dsp, 0);

FMOD_Channel_SetPaused(channel[1], 0);

[/code:2gh8p6oc]

Thanks in advance.

Keitel

  • You must to post comments
0
0

Thank you very much. I will try it out.

Best regards

Keitel

  • You must to post comments
0
0

To change the pitch of a sound without altering the speed try our pitch shifter DSP.

System::createDSPByType with FMOD_DSP_TYPE_PITCHSHIFT
DSP::setParameter FMOD_DSP_PITCHSHIFT_PITCH
System::playSound Your looping file
Channel::addDSP Pitch shift

Be aware that the pitch shifter DSP is quite CPU intensive, so avoid on low powered devices.

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.