[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Audio signal
From: |
polmc |
Subject: |
Audio signal |
Date: |
Sat, 17 Nov 2007 09:05:35 -0800 (PST) |
Ok, I have to synthetize an audio signal. I must do this by suming up the
harmonics of the sound.
So long I've got this:
function sinte(f)
t=0:0.0001:0.0854;
Fs = 44100;
tau6 = 0.018;
A6 = 25.1;
f6 = f*7;
x6 = A6*exp(-t/tau6).*sin(2*pi*f6*t/Fs);
tau7 = 0.016;
A7 = 15.8;
f7 = f*8;
x7 = A7*exp(-t/tau7).*sin(2*pi*f7*t/Fs);
tau8 = 0.017;
A8 = 19.9;
f8 = f*9;
x8 = A8*exp(-t/tau8).*sin(2*pi*f8*t/Fs);
tau9 = 0.038;
A9 = 12.5;
f9 = f*10;
x9 = A9*exp(-t/tau9).*sin(2*pi*f9*t/Fs);
tau10 = 0.017;
A10 = 10;
f10 = f*11;
x10 = A10*exp(-t/tau10).*sin(2*pi*f10*t/Fs);
x = x6 + x7 + x8 + x9 + x9 + x10;
wavwrite(x,Fs,16,"so.wav");
endfunction
When I play the sound, I just hear a short 'puff'.
The thing is that if I take away the '/Fs', It then sounds like a normal
'beep', which is what I want (I guess). Does anyone know what exactly does
the Fs mean?
--
View this message in context:
http://www.nabble.com/Audio-signal-tf4827178.html#a13811009
Sent from the Octave - General mailing list archive at Nabble.com.