function kstring(){
 var audio = new Audio(); var wave = new RIFFWAVE();
 var rate=44100;
 var freq = document.getElementById("ksf").value;
 
 var per=Math.round(rate/freq); var p1=per-1;
 wave.header.sampleRate = rate;  wave.header.numChannels = 1;
 
 var buf=new Array(per);
 var len=2*rate; var data=new Array(len);
 var i=0, j=1;
 for(i=0;i<per;i++){buf[i]=Math.round(255*Math.random());}
 var k=0;
 i=0;
 while(k<len){
  v=0.4999*(buf[i]+buf[j]); 
  data[k++] = v; buf[i]=v; i=j;
  if(j==p1){j=0;} else {j++;}
 }
 wave.Make(data);  audio.src = wave.dataURI;
 audio.play();
}