Author Topic: BASS_BFX_PITCHSHIFT gives BASS_ERROR_ILLPARAM error when using BassAsioHandler  (Read 155 times)

Fr_bp

  • Posts: 9
Hello,

I connected my guitar to an audio interface and I'm trying to create a pitchshifter pedal effect. To playback my guitar I use the BassAsioHandler (Bass.Net.dll). When I apply the BASS_BFX_PITCHSHIFT effect on the input channel of the BassAsioHandler it gives me a BASS_ERROR_ILLPARAM error. All the other effects work perfectly. I use the following code:

Code: [Select]
Handler = new BassAsioHandler(true, 0, 0, 2, BASSASIOFormat.BASS_ASIO_FORMAT_FLOAT, 88200);
Handler.SetFullDuplex(0, 0);

BASS_BFX_PITCHSHIFT pitch = new BASS_BFX_PITCHSHIFT();
pitch.fSemitones = 12.0f;
int pitchHandle = Bass.BASS_ChannelSetFX(Handler.InputChannel, BASSFXType.BASS_FX_BFX_PITCHSHIFT, 1);

if(!Bass.BASS_FXSetParameters(pitchHandle, pitch))
         Console.WriteLine(Bass.BASS_ErrorGetCode().ToString()); //Writes BASS_ERROR_ILLPARAM!

Handler.Start(BassAsio.BASS_ASIO_GetInfo().bufmax, 0);
Bass.BASS_ChannelPlay(Handler.InputChannel, false);

Can anybody help me out?

Ian @ un4seen

  • Administrator
  • Posts: 20396
The other BASS_BFX_PITCHSHIFT parameters (not only fSemitones) should be set too. If you only want to change a single parameter, then you can use BASS_FXGetParameters to get the current parameters before changing the one you want and calling BASS_FXSetParameters.

Fr_bp

  • Posts: 9
That worked! Thanks for your help!