|
Re: input error(?) on plugin: msg#00196audio.supercollider.devel
On Aug 22, 2004, at 12:04 PM, adam overton wrote: hello there. If the input is a scalar there will be only one value at the input, there will be no 5th sample or 17th sample. You're lucky you didn't just crash. // A Ctor usually does 3 things. You need to have a separate calculation function for whether the input is a buffer (audio rate) or a scalar (control rate, scalar rate). Look to see how other ugens test the input rates and select a calculation function this. For example: if (unit->mCalcRate == calc_FullRate && INRATE(0) != calc_FullRate) { SETCALC(Trig_next_k); } else { SETCALC(Trig_next); } Or alternately you can implement a checkInputs method in your SC class to disallow scalar inputs if the ugen is audio rate. For example: checkInputs { if (rate == 'audio' and: {inputs.at(1).rate != 'audio'}, { ^("phase input is not audio rate: " + inputs.at(1) + inputs.at(1).rate); }); ^nil } -- --- james mccartney james-M9HdPQXNfxq9Zq0HfjR8jw@xxxxxxxxxxxxxxxx <http://www.audiosynth.com> SuperCollider - a real time audio synthesis programming language |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: input error(?) on plugin: 00196, adam overton |
|---|---|
| Next by Date: | Re: n_free crash: 00196, James McCartney |
| Previous by Thread: | Re: input error(?) on plugini: 00196, Lance Putnam |
| Next by Thread: | Re: input error(?) on plugin: 00196, adam overton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |