function ft_nonSineW(buffer, freqMin = 0, freqMax = 200000, freqReso = 1024) {
	const bufferLengthH = buffer.length;
	
	var 
	freqTable = [],
	combinedBuffer = [];
	
	for (var i = 0 ; i < bufferLengthH ; i++) {
		combinedBuffer.push((buffer[i] + buffer[i+bufferLengthH])/2);
	}
	
	for (var currentBand = 0; currentBand < freqReso ; currentBand++) {
		const 
		bandFreq = (currentBand/freqReso)*(freqMax-freqMin) + freqMin,
		revolutions = bandFreq*pi2;
		
		var
		weight = 0;
				
		for (var sample = 0 ; sample < bufferLengthH ; sample += 2) {
			weight += trianglew(revolutions*(sample/bufferLengthH))*combinedBuffer[sample];
		}
		//weight /= bufferLength;
		
		freqTable.push(weight);
	}
	
	return freqTable;
}
// ft but with diferent wave functions.
ft but with diferent wave functions.
ft but with diferent wave functions .
function ft_nonSineW(buffer, freqMin = 0, freqMax = 200000, freqReso = 1024) {
	const bufferLengthH = buffer.length;
	var 
	freqTable = [],
	combinedBuffer = [];
	for (var i = 0 ; i < bufferLengthH ; i++) {
		combinedBuffer.push((buffer[i] + buffer[i+bufferLengthH])/2);
	}
	for (var currentBand = 0; currentBand < freqReso ; currentBand++) {
		const 
		bandFreq = (currentBand/freqReso)*(freqMax-freqMin) + freqMin,
		revolutions = bandFreq*pi2;
		var
		weight = 0;
		for (var sample = 0 ; sample < bufferLengthH ; sample += 2) {
			weight += trianglew(revolutions*(sample/bufferLengthH))*combinedBuffer[sample];
		}
		freqTable.push(weight);
	}
	return freqTable;
}
function ft_nonSineW ( buffer , freqMin = 0 , freqMax = 200000 , freqReso = 1024 ) { const bufferLengthH = buffer . length ; var freqTable = [ ] , combinedBuffer = [ ] ; for ( var i = 0 ; i < bufferLengthH ; i ++ ) { combinedBuffer . push ( ( buffer [ i ] + buffer [ i + bufferLengthH ] ) / 2 ) ; } for ( var currentBand = 0 ; currentBand < freqReso ; currentBand ++ ) { const bandFreq = ( currentBand / freqReso ) * ( freqMax - freqMin ) + freqMin , revolutions = bandFreq * pi2 ; var weight = 0 ; for ( var sample = 0 ; sample < bufferLengthH ; sample += 2 ) { weight += trianglew ( revolutions * ( sample / bufferLengthH ) ) * combinedBuffer [ sample ] ; } freqTable . push ( weight ) ; } return freqTable ; }
ft but with diferent wave functions.
ft but with diferent wave functions .
//weight /= bufferLength;