[chuck-users] demonstrating the sampling theorem in Chuck

Kassen signal.automatique at gmail.com
Sat Oct 20 07:07:59 EDT 2007

On 10/20/07, Spencer Salazar <ssalazar at cs.princeton.edu> wrote:

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:
> http://en.wikipedia.org/wiki/Whittaker%E2%80%
> 93Shannon_interpolation_formula
> for more info.

Yes, I wrote about that just a few days back when we had another discussion
about Nyquist use/abuse.

I wonder if this could be implemented in ChucK without resorting to
> 1::samp... maybe with lots of Delay ugens..

I tried and couldn't get it to work at a realistic CPU usage buit that was a
long time ago. I also went about it rather literally, using a actual sine.

What if we'd allow negative targets for Envelope.target()? that would make
linear interpolation a breeze. I still don't see what would be wrong with
negative Envelope targets and if I remember corectly that would work with
the removal of one check from the code.

. as far as C code goes,
> there is a PRC classic here for doing sinc interpolation:
> http://www.cs.princeton.edu/courses/archive/spr07/cos325/src/OLD/
> TimeStuf/srconvrt.c

There is also a implementation in SndBuf, maybe LiSa could use one too.

We could also think about a dedicated Ugen for this, I'm still very
interested in having something like SndBuf but asigning (I'd like to keep it
editable) a array of floats to it instead of a .wav file.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20071020/a552da79/attachment.htm 

More information about the chuck-users mailing list