byulparan / cl-collider

A SuperCollider client for CommonLisp
Other
218 stars 23 forks source link

num-output-buses.ir isn't working. #137

Closed cianoc closed 5 months ago

cianoc commented 5 months ago
(defsynth safety (in)
  (out.ar 0 (limiter.ar
             (sanitize.ar
              (in.ar in (num-output-buses.ir))))))

This won't compile and I get the following error:

1 compiler notes:

Unknown location:
  error: 
    The value
      #<CL-COLLIDER::UGEN NumOutputBuses.ir>
    is not of type
      REAL

Compilation failed.

Any ideas?

cianoc commented 5 months ago

The above does work obviously if I replace NumOutputBuses.ir with 2.

byulparan commented 5 months ago

In seems can't applyUGens for numChannels arguments. Your safety synth can't define in sclang too.

(
SynthDef(\safety, {|in|
    Out.ar(0, Limiter.ar(Sanitize.ar(In.ar(in, NumOutputBuses.ir)) ))
}).add;
)
cianoc commented 5 months ago

Ah that makes sense. Sorry for the noise. Looking at it again it's obvious that it could never work.