Author Topic: BASS_SLIDE_LOG : Can I set the logarithmic curve ?  (Read 472 times)

Couin

  • Posts: 124
Hi :)

A minor question, is it possible to set the curve of logarithmic fade out ?

I mean, for who would have a smoother logarithmic fade put without setting it linear.

Thanks :)
Couin

jpf

  • Posts: 196
Do something like this. Example taken from the documentation:
"Fadeout a channel's volume logarithmically over a period of 2 seconds. "
Code: [Select]
Call BASS_ChannelSlideAttribute(channel, BASS_ATTRIB_VOL Or BASS_SLIDE_LOG, 0, 2000)

Couin

  • Posts: 124
Hi Jpf :)

This is the command I did, yes.

But what I mean by setting the curve is setting the "acceleration" of fading out (not the duration). 

I created a small draw of what I mean : with BASS_SLIDE_LOG, for example having a curve type "Curve A" or a "Curbe B".


Ian @ un4seen

  • Administrator
  • Posts: 26102
It isn't possible to set a custom curve in a single BASS_ChannelSlideAttribute call, but you could implement one by breaking the curve down into multiple steps and using a BASS_SYNC_SLIDE sync to trigger each new step, ie. call BASS_ChannelSlideAttribute in the SYNCPROC (except at the end of the final step). Note the timing of the step changes won't be sample-precise, but should be good enough unless the fade-out is short. A BASS_FX_VOLUME effect and mixtime BASS_SYNC_POS syncs could be used instead for more precise timing. If you happen to be using a mixer then BASS_Mixer_ChannelSetEnvelope would be another option. The BASS_FX add-on also has a BASS_FX_BFX_VOLUME_ENV effect that can be used outside of a mixer.

Couin

  • Posts: 124
Hi Ian,

thanks for answer :)
I will try to see if not too complicated to implent, otherwise, I will leave like I already did : a checkbox to choose between linear or log fade out :)