[chuck-users] delay times of STK delays seem to be 1 sample off?

volker böhm vboehm at gmx.ch
Fri Feb 29 13:07:00 EST 2008


hi,
i was running some simple tests to hear the difference between  
allpass vs linear interpolating delay lines when i noticed that there  
is obviously a little bug in how the delay time is calculated in the  
delay UGens from STK.

the following example feeds an impulse into a DelayA with high  
feedback and compares the tuning to a TriOsc.

can't i trust my ears or is the tuning only correct if i add 1 to  
deltime before calculating the frequency for TriOsc?

thanks,
volker.



Impulse imp => Gain out => dac;
out => DelayA delay => out;
TriOsc tri => dac;				// test oscillator

44100.0 => float sr;			// sampling rate

// delay time in samples
150.5 => float deltime;

deltime::samp => delay.delay;

// calc tri freq from delay time
// have to add 1 to deltime to get correct tuning
sr / (deltime) => tri.freq;	

// set feedback level
0.999 => delay.gain;
0.3 => tri.gain;


while(true) {
	1 => imp.next;
	6::second => now;	
}


More information about the chuck-users mailing list