help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ok, new problem


From: polmc
Subject: Re: Ok, new problem
Date: Mon, 19 Nov 2007 10:03:09 -0800 (PST)

Ok thanks guys I got it and it worked!  I  later did a whole musical scale :D


polmc wrote:
> 
> Ok, thanks for all your help!
> 
> I have a new problem though:
> 
> When I try to write the wav (with wavwrite), 2 things can happen:
> 
> 1. It writes, but when I try playing the sound, it says that the format is
> damaged or that it doesn't have propper codec.
> 
> or
> 
> 2.Octave sends an error saying that it has too many colums...
> 
> This is my script: 
> 
> 
> function sinte(f)
>   
> Fs = 44100;
> 
> t = 0:1/Fs:2;
> 
>   
>   tau1 = 0.044;
>   A1 = 28184;
>   f1 = f;
>   x1 = A1*exp(-t/tau1).*sin(2*pi*f1*t/Fs);
>   
>     tau2 = 0.036;
>   A2 = 7943.3;
>   f2 = f*2;
>   x2 = A2*exp(-t/tau2).*sin(2*pi*f2*t/Fs);
>   
>     tau3    = 0.048;
>   A3 = 2818.4;
>   f3 = f*6;
>   x3 = A3*exp(-t/tau3).*sin(2*pi*f3*t/Fs);
>   
>     tau4 = 0.015;
>   A4 = 7943.3;
>   f4 = f*4;
>   x4 = A4*exp(-t/tau4).*sin(2*pi*f4*t/Fs);
>   
>     tau5 = 0.021;
>   A5 = 1778.3;
>   f5 = f*5;
>   x5 = A5*exp(-t/tau5).*sin(2*pi*f5*t/Fs);
> 
>   tau6 = 0.018;
>   A6 = 2818.4;
>   f6 = f*6;
>   x6 = A6*exp(-t/tau6).*sin(2*pi*f6*t/Fs);
>   
>   
>   tau7 = 0.016;
>   A7 = 1258.9;
>   f7 = f*7;
>   x7 = A7*exp(-t/tau7).*sin(2*pi*f7*t/Fs);
>   
>   tau8 = 0.017;
>   A8 = 794.3;
>   f8 = f*8;
>   x8 = A8*exp(-t/tau8).*sin(2*pi*f8*t/Fs);
>   
>   tau9 = 0.038;
>   A9 = 100.0;
>   f9 = f*9;
>   x9 = A9*exp(-t/tau9).*sin(2*pi*f9*t/Fs);
>   
>   tau10 = 0.017;
>   A10 = 562.3;
>   f10 = f*10;
>   x10 = A10*exp(-t/tau10).*sin(2*pi*f10*t/Fs);
>   
>   x = x1+ x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10;
> 
>   wavwrite(x,Fs,16,"senyal.wav")
>   
>   endfunction
> 
> What can I do?
> 

-- 
View this message in context: 
http://www.nabble.com/Audio-signal-tf4827178.html#a13841670
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]