Saturday, March 21, 2009

The heterodyne is a lie

I knew there was something not quite right with my 'more accurate Theremin' code. 

It does work, but not for the reason that I thought it did. Here's the original code, 

var mouse =,110000,1); *, mouse - 100000, 0.2);



I should have known, 100Khz is waaaay above the maximum frequency that can be produced by a standard sampling rate of 40-some thousand hz,  according to Nyquist-Shannon sampling theorem.

Simply put, aliasing causes the code to output the sound, the rest is erm , complicated. 

A better explanation can be found on the SC user list where I asked about it.  


No comments:

Post a Comment