added matlab

This commit is contained in:
2025-08-21 07:27:52 +02:00
parent fd522e1b99
commit 64c6745c76
50 changed files with 2516 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
function eval_lfo()
L = 10000;
fs = 44100;
fstart = 44;
fend = 400;
df = (fend-fstart)/L;
ip = 0 % phase of the first output sample in radians
% Init
% Loop
f = fstart;
fchg = 1;
y1=sin(ip-f*pi / fs);
y2=sin(ip-2*f*pi / fs);
for n=1:L,
if fchg == 1,
b1 = 2.0 * cos(f*pi / fs);
fchg = 1000;
end;
y0 = b1*y1 - y2;
y2 = y1;
y1 = y0;
fchg = fchg - 1;
lfo(n) = y0;
f = f + df;
close all
end;
figure;
plot(1:L, lfo); grid;
wavwrite(0.5*lfo, fs, 'lfo.wav');