%mary had a little lamb:

clear;
notes;   %load note frequencies

%getexcitesignal;

e = wavread('../html/dsp/excite-plucked-soft.wav');
e = .5*e';

fs = 44100;

%loop filter:
B = [0.8995 0.1087];
A = [1 0.0136];

o = 4;   %octave
nd = .3; %note duration
pl = .9;  %pluck position
pi = .9;  %pickup position

L = [ wav(E(o), nd, pl, pi) wav(D(o), nd, pl, pi) wav(C(o), nd, pl, pi) wav(D(o), nd, pl, pi) wav(E(o), nd, pl, pi) wav(E(o), nd, pl, pi) wav(E(o), 2*nd, pl, pi) wav(D(o), nd, pl, pi) wav(D(o), nd, pl, pi) wav(D(o), 2*nd, pl, pi) wav(E(o), nd, pl, pi) wav(G(o), nd, pl, pi) wav(G(o), 2*nd, pl, pi) wav(E(o), nd, pl, pi) wav(D(o), nd, pl, pi) wav(C(o), nd, pl, pi) wav(D(o), nd, pl, pi) wav(E(o), nd, pl, pi) wav(E(o), nd, pl, pi) wav(E(o), nd, pl, pi) wav(C(o), nd, pl, pi) wav(D(o), nd, pl, pi) wav(D(o), nd, pl, pi) wav(E(o), nd, pl, pi)  wav(D(o), nd, pl, pi) wav(C(o), 4*nd, pl, pi) ];

wavwrite(L,fs,16,'mary.wav');
