overtone

2018-08-02T06:22:28.000170Z

This gets the error

overtone.sc.machinery.ugen.sc_ugen.ControlProxy cannot be cast to
   java.lang.Number
. How can I fix it? I don’t want n to be a ControlProxy, just a normal argument.

2018-08-02T09:29:24.000077Z

@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.

👍 1
😃 1
2018-08-02T09:30:07.000187Z

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.

2018-08-02T15:40:45.000174Z

@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.

2018-08-03T09:23:46.000238Z

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