Hello,

I'd like to use the Endless loop algorithm (ADI Algorithms/Envelopes/One Sweep w/Reset/Endless Loop,

I'd like to configure the slope and the timing in my fw.

In the include file I find and I immagine

1. MOD_ENVCH1_ALG0_GAINTIMING0 --> time in ticks where the gain start to change

2. MOD_ENVCH1_ALG0_GAINS0_VALUE --> the gain descrement ????? HOW TO COMPUTE THIS VALUE???

3. MOD_ENVCH1_ALG0_STARTINGGAIN_VALUE --> the initial GAIN

4. MOD_ENVCH1_ALG0_LOWESTALLOWEDGAIN_VALUE ---> the lowest gain ..

I need to create a gain evelope starting from 0db and after a number of ms (a parameter) I need to reach -20dB

Anyone know how to calculate the parameter gain step ?

For your reference

I found the formula for the GAIN PARAMETER:

Starting from the dB domain the relation is:

dB(t) = (deltaDB / DeltaTicks) * t (where (t) is the current ticks from 0 to DeltaTicks)

10 ^ (dB(t) / 20) = 10 ^ (DeltaDB/DeltaTicks/20) * 10 ^ t

------------------------------

The coefficent used in the algorithm is : (DeltaDB / 20 / DeltaTicsk)

Example:

Start 0dB end 22dB in 1000 ticks ( for a 48K sampling rate ~20ms)

GAINCOEFF = (0 - 22) / 20 / 1000