On Saturday 07 January 2006 23:44, Steven Yi wrote: > (The lpf2 is a direct translation of lpf2 in Music4C.) If I either > set ksmps=1 in the project or use setksmps 1 as in the above, things > sound correctly. If I don't use setksmps or ksmps=1, the sound is > wrong. However, looking at the code, all of the calculations in lpf2 > *should* run at arate and calculate correctly without having to set > ksmps. > > Is there something wrong with my assumption or is there a bug either > in my code or in UDO's? Having a quick look at the code, it seems that there is a-rate feedback which requires ksmps=1 (as the feedback has a delay of ksmps samples); see lines quoted below: > afstate0 init 0 > afstate1 init 0 > > /* LPF2 CODE */ > > av1 = ain + ifparms3 * afstate0 + ifparms4* afstate1; > av2 = afstate1 + 2.0 * afstate0; > > afstate1 = afstate0 > afstate0 = av1