function eval_blit()

sinc_use_lut = 1

L = 96000;
fs = 48000;
fstart = 220;
fend = 880;
df = (fend-fstart)/L

# for saw 
rho = 1.0;

nhw = 4096;
Hw = kaiser(nhw, 8)';

max_m = fix((fs/fstart/2.0)) + 1

if sinc_use_lut == 1
    nharm = max_m
    nsin = 1024;
    xx = (0:nsin)/nsin - 0.5;
    mmm=0;
    for mm=1:nharm,
        mmm=mmm+1;
        bb(mm, :) = sin(mmm*xx*pi);
    end;
    aa = sin(xx*pi);
end;

x = 0.5;
z = -1;
f = fstart;
sqr = 0.0;
saw = 0.0;
tri = 0.0;
a = 1;
b = 1;

for n = 1:L,

	if x >= 0.5,
		x = x - 1;
		p = fs/f;
		fraq  = 1.0/p;
		m = fix((p/2.0)) + 1;
		z = -z;
	end;
    if sinc_use_lut == 1
        nn = (x+0.5)*nsin + 1;
        ni = fix(nn);
        nf = nn - ni;
        b = (bb(m, ni+1) - bb(m, ni))*nf + bb(m, ni);     % Fractional delay (linear interpolation)
        a = (aa(ni+1) - aa(ni))*nf + aa(ni);              % Fractional delay (linear interpolation)
    else
        b = sin(m*x*pi);
        a = sin(x*pi);
    end

    if (a ~= 0)
        blit = fraq * b/a * Hw(fix((x+0.5)*nhw)+1);
    else
        blit = fraq;
    end
    
	saw = rho*saw + (fraq - blit);
	sqr = sqr + z*blit;
    tri = tri + 2*(sqr-0.5)*fraq;
	vtri(n) = tri;
	vsaw(n) = saw;
	vsqr(n) = 2*(sqr - 0.5);
	vblit(n) = blit;
	x = x + fraq;
	f = f + df;
end;
		

close all

figure;
plot(1:L, vsaw, 1:L, vblit); grid;

N_UNDC = fs/100;

a, b = undcc(N_UNDC);
wavwrite(0.5*filter(b, a, vtri), fs, 'tri.wav');
wavwrite(0.5*filter(b, a, vsqr), fs, 'sqr.wav');
wavwrite(0.5*filter(b, a, vsaw), fs, 'saw.wav');
wavwrite(0.5*vblit, fs, 'blit.wav');

