Fork me on GitHub

This gets the error cannot be cast to
. How can I fix it? I don’t want n to be a ControlProxy, just a normal argument.


@rudiwillalwaysloveyou you cant pass clojure number like that. You will need to pass it as buffer and use index:kr to get the number. You could write defn wrapper around your synth to do that.

😃 4
👍 4

There are other ways too, but defsynth is a compile time macro and the parameters are supercollider proxy types. So it corrolates to SynthDef in sc.


@rudiwillalwaysloveyou reading this again, the problem is not the number. You can of course pass number. I felt like you were trying to pass pre-calculated values. But the problem is ‘repeat’. The error message is misleading and needs to be improved. You need to find sc ugen that does repeat.


Thanks! No, your first answer is exactly what I’m looking for.