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

Re: [sc-dev] checkInputs




On Dec 27, 2004, at 11:21 AM, Julian Rohrhuber wrote:

	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
 	}


OK. Other ugen implementations checkInputs still would need to have ^this.checkValidInputs added as well.