help-octave
[Top][All Lists]
Advanced

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

RE: FFT - Spectrum Analyzer


From: Damian Harty
Subject: RE: FFT - Spectrum Analyzer
Date: Mon, 11 Jun 2012 08:36:47 +0000

Why would one perform a Fourier-based analysis on something so clearly 
non-stationary as music? I think wavelets are the tool of choice.

Damian Harty 
Senior Research Fellow
Coventry University
+44(0)24 7688 8924
+44(0)7799 414832


-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Markus Bergholz
Sent: 10 June 2012 21:50
To: Thomas D. Dean
Cc: address@hidden
Subject: Re: FFT - Spectrum Analyzer

On Sun, Jun 10, 2012 at 5:18 PM, Thomas D. Dean <address@hidden> wrote:
> On 06/09/12 15:27, Renato S. Yamane wrote:
>>
>>
>> Hi,
>>
>> Anyone knows an way to analyze, with Octave, the Spectrum Frequency of a
>> digital media file (like an MP3)?
>> Something like this:
>> http://img268.imageshack.us/img268/6345/bassiloveyou.jpg
>>
>> Thanks and best regards,
>> Renato S. Yamane
>> _______________________________________________
>> Help-octave mailing list
>> address@hidden
>> https://mailman.cae.wisc.edu/listinfo/help-octave
>>
>>
>
> http://labrosa.ee.columbia.edu/matlab/mp3read.html
>

i guess this is not what he want.
he want a frequency analysis.


%Fourier Transform of Sound File

%Load File
file = 'e-neu.wav';
[y,Fs,bits] = wavread(file);

Nsamps = length(y);
t = (1/Fs)*(1:Nsamps);          %Prepare time data for plot

%Do Fourier Transform
y_fft = abs(fft(y));            %Retain Magnitude
y_fft = y_fft(1:Nsamps/2);      %Discard Half of Points
f = Fs*(0:Nsamps/2-1)/Nsamps;   %Prepare freq data for plot

%Plot Sound File in Time Domain
figure
plot(t, y);
xlabel('Time (s)')
ylabel('Amplitude')
title('fft action')

%Plot Sound File in Frequency Domain
figure
plot(f, y_fft);
xlim([0 1000])
xlabel('Frequency (Hz)')
ylabel('Amplitude')
title('Frequency Response of Tuning Fork A4')


but this is not my own code. i've grabbed it somewhere while building
an arduino guitar tuner and played with this code.



> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave



-- 
icq: 167498924
XMPP|Jabber: address@hidden
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave



reply via email to

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