clear; rand('uniform'); FS=8000; LEN=2000; ENVELOPE_SHAPE=0.2; C_FREQ=261.62557; toneheight=[0, 2, 4, 5, 7, 9, 11]; for scale_no=1:7 x=zeros(1:LEN); f0=(C_FREQ/32)*2^(toneheight(scale_no)/12); for i=1:16 if (100