If I'm following the logic correctly, this has the result that the gain is being multiplied the mult. fact. So the leak and gain aren't completely independent.
Could we change this to something like
// this is the goal position
mvalDMc[mi] = (mvalDMc[mi] * imgmmult.im->array.F[mi]) + dmval;
https://github.com/cacao-org/cacao/blob/14be443c19e89a8251fecab7dfdd837a27773b36/AOloopControl/modalfilter.c#L1274
If I'm following the logic correctly, this has the result that the gain is being multiplied the mult. fact. So the leak and gain aren't completely independent.
Could we change this to something like
to make it a true leaky integrator?