[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] checkInputs



{ LPF.ar(Impulse.ar(2), "hello") }.asSynthDef

this does not throw an error.

I'd suggest to change in UGen.sc:


	checkInputs { ^this.checkValidInputs }

	checkValidInputs {
		inputs.do({arg in,i;
			var argName;
			if(in.isValidUGenInput.not,{
				argName = this.argNameForInputAt(i) ? i;
				inputs.dump;
^"arg: '" ++ argName ++ "' has bad input:" + in;
			})
		});
		^nil

	}
	checkSameRateAsFirstInput {
 		if (rate !== inputs.at(0).rate) {
^("first input is not" + rate + "rate: " + inputs.at(0) + inputs.at(0).rate);
 		};
 		^this.checkValidInputs
 	}


--








.