[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FFT - Spectrum Analyzer
From: |
Markus Bergholz |
Subject: |
Re: FFT - Spectrum Analyzer |
Date: |
Sun, 10 Jun 2012 22:49:39 +0200 |
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
- FFT - Spectrum Analyzer, Renato S. Yamane, 2012/06/09
- Re: FFT - Spectrum Analyzer, Sergei Steshenko, 2012/06/10
- Re: FFT - Spectrum Analyzer, Thomas D. Dean, 2012/06/10
- Re: FFT - Spectrum Analyzer,
Markus Bergholz <=
- RE: FFT - Spectrum Analyzer, Damian Harty, 2012/06/11
- Re: FFT - Spectrum Analyzer, Juan Pablo Carbajal, 2012/06/11
- Re: FFT - Spectrum Analyzer, Sergei Steshenko, 2012/06/11
- RE: FFT - Spectrum Analyzer, Damian Harty, 2012/06/11
- Re: FFT - Spectrum Analyzer, Francesco Potortì, 2012/06/11
- Re: FFT - Spectrum Analyzer, Robert T. Short, 2012/06/11
- Re: FFT - Spectrum Analyzer, Sergei Steshenko, 2012/06/11
Re: FFT - Spectrum Analyzer, Peter, 2012/06/11