rem: if((f=parseInt(freq))!=0) 
add: if(isNaN(f=parseInt(freq.charAt(0)))) 
context: function play(freq, dur){	var	notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b'];	var	sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' '];	var	i,n,o,d;	var len;	var	f;//	writeln("play " + freq + ", " + dur);	if(dur==undefined)		dur="0";	d=parseInt(dur);	if((f=parseInt(freq))!=0)		switch(freq.charAt(0).toUpperCase()) {			case 'O':               /* default octave */				if(parseInt(dur))					octave=d;				else					octave+=d;				return;			case 'P':               /* pitch variation */				if(parseInt(dur))					pitch=atof(dur)/32.0;				else					pitch+=atof(dur);				return;			case 'Q':               /* quit */				exit(0);			case 'R':               /* rest */				f=0;				break;			case 'S':               /* stacato */				if(parseInt(dur))					s=d;				else					s+=d;				return;			case 'T':               /* time adjust */				t=d;				return;			case 'V':				if(mode&NO_VISUAL)					return;				truncsp(dur);				if(dur.charAt(dur.length-1)=='\\')					write(dur);				else					writeln(dur);				return;			case 'X':               /* exit */				exit(1);			default:				for(n=0;notes[n];n++)					if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n])						break;				if(parseInt(freq.charAt(1)))					o=(freq.charAt(1)&0xf);				else					o=octave;				f=pitch*Math.pow(2,o+n/12);				break; 	}	if(f && mode&SHOW_FREQ) {		for(i=0;freq[i]>' ';i++)			;		freq[i]=0;		printf("%-4.4s",freq); 	}	if(mode&SHOW_DOT)		printf(".");	if(t>10)		len=(d*t)-(d*s);	else		len=d*t;	if(isNaN(len))		return;	if(f)		beep(f,len);	else		sleep(len);	if(s) {		if(t>10)			sleep(d*s);		else			sleep(s);	}}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/fe340c67cc9826cf09f529e5e6917e86506d6e19/playtone.js/clean/playtone.js