[sdiy] CEM3328 seems to only have buffers at the end
Antti Huovilainen
ajhuovil at cc.hut.fi
Tue Feb 21 12:13:04 CET 2006
On Mon, 20 Feb 2006, Aaron Lanterman wrote:
> On Tue, 21 Feb 2006, Antti Huovilainen wrote:
>> They say a picture says more than a thousand words:
>> http://www.acoustics.hut.fi/~ajhuovil/selfosc.png
>> [...]
>
> Antti - is this result in your P_061 paper? I don't remember it in there...
> maybe I should go back and read more carefully...
The picture? no
Here's the matlab code. fc should be << fs since I haven't added any
resonance amount compensation. Input signal is there just to give
kickstart to selfosc (digital has no inherent selfnoise). First loop is
Moog, second is OTA.
---
signal = sin(2*pi*[1:100000]*440/44100)*0.01;
y1 = 0;
y2 = 0;
y3 = 0;
y4 = 0;
fc = 100;
g = 1-exp(-2*pi*fc/44100);
output = zeros(1, length(signal)*2);
fb = 4.2;
for n = 1:100000
x = signal(n) - fb*y4;
y1 = y1 + g*(tanh(x) - tanh(y1));
y2 = y2 + g*(tanh(y1) - tanh(y2));
y3 = y3 + g*(tanh(y2) - tanh(y3));
y4 = y4 + g*(tanh(y3) - tanh(y4));
output(n) = y4;
end
for n = 1:100000
x = signal(n) - fb*y4;
y1 = y1 + g*(tanh(x - y1));
y2 = y2 + g*(tanh(y1 - y2));
y3 = y3 + g*(tanh(y2 - y3));
y4 = y4 + g*(tanh(y3 - y4));
output(n+100000) = y4;
end
---
Antti
"No boom today. Boom tomorrow. There's always a boom tomorrow"
-- Lt. Cmdr. Ivanova
More information about the Synth-diy
mailing list