Author Topic: BASS_ChannelSetFX priority  (Read 258 times)

Eazis - Thomas

  • Posts: 9
BASS_ChannelSetFX priority
« on: 20 May '19 - 08:10 »
Hello,

I have a question about the BASS_ChannelSetFX function.
In the BASS_FX documentation i read the following about the priority

Quote
The priority of the new DSP, which determines its position in the DSP chain. DSPs with higher priority are called before those with lower priority

Here a little piece from my code
Code: [Select]
procedure Tmainform.compressorpl1(channel: HSTREAM);
begin
  try
    if (ch[1]=0) then exit;

    // volume
    volumepl1 := BASS_ChannelSetFX(channel, BASS_FX_BFX_VOLUME, 1);
    etc....

    // compressor
    compresspl1 := BASS_ChannelSetFX(channel, BASS_FX_BFX_COMPRESSOR2, 2);
    etc....

    // limiter
    limiterpl1 := BASS_ChannelSetFX(channel, BASS_FX_BFX_DAMP, 3);
    etc....
  except
    Log(FLM(8, 'compressorpl1 error'));
  end
end;

Does this mean that volumepl1 first will be set in the DSP chain then compresspl1 as second etc...?
Or how higher the priority number how earlier it will be called?

Thanks

Ian @ un4seen

  • Administrator
  • Posts: 21986
Re: BASS_ChannelSetFX priority
« Reply #1 on: 20 May '19 - 12:54 »
The DSP/FX with a higher "priority" value will be applied first. So that's BASS_FX_BFX_DAMP then BASS_FX_BFX_COMPRESSOR2 then BASS_FX_BFX_VOLUME in your case.

Eazis - Thomas

  • Posts: 9
Re: BASS_ChannelSetFX priority
« Reply #2 on: 20 May '19 - 13:08 »
Thanks for your quick answer Ian!