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 = MouseX.kr(100000,110000,1);

BPF.ar((SinOsc.ar(100000) * SinOsc.ar(mouse)), mouse - 100000, 0.2);


}.scope

)

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.  

Qapla!

No comments:

Post a Comment