1

began using supercollider, read through the tutorials and practiced a bit but i can't seem to make this work. how can i process an input N times in a row ?

basically, i want build a synth to crush a sound source by running it through a distortion N times. i've tried many things, but what i want to do is basically:

// distortion function
dfunc = {
    arg inp; // input
    AnalogVintageDistortion.ar(
        inp, 1, 2.5, 20.dbamp, 10.dbamp, 200, 10
)};

// taking an input and running a 1st distortion
in = In.ar(input, 1);
dout = dfunc.value(in);

// rerunning the distorsion 10 times
10.do({
    dout = dfunc.value(dout);
});

basically, it would be a quick equivalent of doing:

dout = AnalogVintageDistorsion.ar(
  AnalogVintageDistorsion.ar(
    AnalogVintageDistorsion.ar(
      dout
    )
  )
);

i'm coming from python, where this result would be achieved by:

for i in range(10):
  dout = dfunc(dout)

thanks in advance !!

paulhector
  • 85
  • 7
  • The code you posted is exactly what you would want to do. Are you not getting what you expect from running this? – scztt Jun 08 '22 at 17:00
  • hm. that's weird. i can't really tell the difference between running the distortion 1 and 100 times. i'm already using blown out crackle as an input so maybe that's why i can't get any visible results. – paulhector Jun 08 '22 at 17:06

0 Answers0