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

[sc-users] octave transposition method



This method freezes sclang (beach-ball) if the while loops evaluate as true. Any suggestions to put me on the right track?


+ Number {	
	checkOct { | minFreq=30, maxFreq=16745 |
		while ({ this < minFreq }, { this = this * 2});
		while ({ this > maxFreq }, { this = this * 0.5});
		^this
	}
}

/* Test

32.checkOct 	// OK
3. checkOct	// Very un-OK

*/