I am trying to build a simple additive synthesis oscillator inside gen. My code relies around the presence of a for loop that loops around for the number of the harmonics of the oscillator to output the final result. I am trying to control the amplitude of each partial from outside gen by using a buffer whose length in sample is equal to the number of harmonics . The amplitude values are recorded with a multislider + poke combo. This way I can just access the amplitude of each partial by peeking it inside the for loop. The only problem that I am having right now is that when I move the multislider, and therefore updating the amplitude values, I hear clicks. This happens because I would need some kind of interpolation between successive values of the same amplitude, but I can't seem to solve this problem inside the for loop. Does anyone know how could I solve this? I attach two patches: the first one is the one with the problem, while the second one is a not so efficient solution using the data object and storing the values of all the partials at any time, regardless the number of harmonics of the oscillator.