[chuck-users] demonstrating the sampling theorem in Chuck

Spencer Salazar ssalazar at CS.Princeton.EDU
Sat Oct 20 05:18:50 EDT 2007

On Oct 18, 2007, at 9:04 PM, Kassen wrote:

> You can try various techniques to approximate one, I'd start by  
> simply chucking my Step into a lowpass filter ( LPF ) and seeing  
> how that affects matters. That's not going to cure all of your woes  
> but it will greatly decrease them. From there on it's diminishing  
> returns. I don't think you will realize true mathematical  
> perfection but with some reading up on DSP you could get close to  
> what most ears stop finding objectionable... Or you might find  
> cases in which you like the artifacts better then the perfection.

Ideally when you upsample your low sample rate signal back to  
44100Hz, you convolve it with the sinc function, which is an ideal  
low pass filter with a cutoff at Nyquist.  See:
for more info.

I wonder if this could be implemented in ChucK without resorting to  
1::samp... maybe with lots of Delay ugens... as far as C code goes,  
there is a PRC classic here for doing sinc interpolation:


More information about the chuck-users mailing list