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

volker böhm vboehm at gmx.ch
Sun Mar 2 11:43:10 EST 2008

On 02 Mar 2008, at 01:54, Kassen wrote:
> So, if I get this right, you made sure the delay now works at it's  
> set length for both feedback and straight output?

yes, that's right. the feedback path is provided in the ugen itself.
one drawback is that it's not possible anymore to have a delay of 0  
samples (which for a feedback delay makes no sense anyway).
> That would be quite a valuable  addition if you'd submit it (not  
> sure if there's a official process for this). At any rate this  
> phenomenon could stand some attention in the manual because any  
> system using feedback will run into this. Often the Z-1 function  
> inherent in the feedback is actually beneficial and useful but we  
> should probably document that it's there, where it is exactly and  
> how it will affect things.
> Glad to have been of help. I hope you'll share your fix, sounds  
> like a solution that would be good for everyone.

i don't know about submitting. the delay ugens are part of the STK  
which also exists as a library independent from chuck.
so changing something in there is not so easy. also i think e.g.  
DelayA is used by other STK ugens as well.
might be better to have dedicated (interpolating) delay ugens with  
integrated feedback path - maybe there is already something like  
that. coulnd't find any in the ugen list, though.

but of course i am happy to share what i have done, it's simple  
this is from ugen_stk.cpp:

MY_FLOAT DelayA :: tick(MY_FLOAT sample)
	MY_FLOAT next = nextOut();				// READ from delay line (compute  
output sample)
	inputs[inPoint++] = sample + next * fb;		// WRITE input to delay  
line (last output value added with feedback gain)

	// Increment input pointer modulo length.
	if (inPoint == length)
	inPoint -= length;

	outputs[0] = next;
	doNextOut = true;

	// Save the allpass input and increment modulo length.
	apInput = inputs[outPoint++];
	if (outPoint == length)
	outPoint -= length;

	return outputs[0];

and then there is the whole CK_DLL glibber to add the "fb" parameter  
and method.


More information about the chuck-users mailing list