spectrogram

python, matplotlib: specgram data array values does not match specgram plot

半世苍凉 提交于 2019-11-29 23:20:49
问题 I am using matplotlib.pyplot.specgram and matplotlib.pyplot.pcolormesh to make spectrogram plots of a seismic signal. Background information -The reason for using pcolormesh is that I need to do arithmitic on the spectragram data array and then replot the resulting spectrogram (for a three-component seismogram - east, north and vertical - I need to work out the horizontal spectral magnitude and divide the vertical spectra by the horizontal spectra). It is easier to do this using the

How to generate the spectrogram of a wav file in Matlab with frequency on the x-axis

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 11:59:28
As part of a research project, I would like to analyze a sound file by generating it's spectrogram. I have been able to successfully generate the spectrogram of the wave file in matlab with frequency on the y-axis and the time on the x-axis. I would however, like to generate the spectrogram with the frequency on the x-axis and the time on the y-axis. How can this be done? I have searched through stack and have not found any accepted answers. My code which generates the spectrogram with the frequency on the y-axis and the time on the x-axis (Matlab code): [song, fs] = wavread('filename.wav');

Spectrogram C++ library

只谈情不闲聊 提交于 2019-11-28 04:43:43
For my current project in C++ / Qt I need a library (LGPL is preferred) which can calculate a spectrogram from a signal ( basically an array of doubles ). I already use Qwt for the GUI part. Any suggestions? Thanks. It would be fairly easy to put together your own spectrogram. The steps are: window function (fairly trivial, e.g. Hanning) FFT (FFTW would be a good choice but if licensing is an issue then go for Kiss FFT or similar) calculate log magnitude of frequency domain components (trivial: log(sqrt(re * re + im * im)) David Cary "How do I create a frequency vs time plot?" lists several

Converting an FFT to a spectogram

妖精的绣舞 提交于 2019-11-27 20:25:01
问题 I have an audio file and I am iterating through the file and taking 512 samples at each step and then passing them through an FFT. I have the data out as a block 514 floats long (Using IPP's ippsFFTFwd_RToCCS_32f_I) with real and imaginary components interleaved. My problem is what do I do with these complex numbers once i have them? At the moment I'm doing for each value const float realValue = buffer[(y * 2) + 0]; const float imagValue = buffer[(y * 2) + 1]; const float value = sqrt(

How to convert a .wav file to a spectrogram in python3

二次信任 提交于 2019-11-27 07:53:14
I am trying to create a spectrogram from a .wav file in python3. I want the final saved image to look similar to this image: I have tried the following: This stack overflow post: Spectrogram of a wave file This post worked, somewhat. After running it, I got However, This graph does not contain the colors that I need. I need a spectrogram that has colors. I tried to tinker with this code to try and add the colors however after spending significant time and effort on this, I couldn't figure it out! I then tried this tutorial. This code crashed(on line 17) when I tried to run it with the error

Spectrogram C++ library

江枫思渺然 提交于 2019-11-27 00:37:12
问题 For my current project in C++ / Qt I need a library (LGPL is preferred) which can calculate a spectrogram from a signal ( basically an array of doubles ). I already use Qwt for the GUI part. Any suggestions? Thanks. 回答1: It would be fairly easy to put together your own spectrogram. The steps are: window function (fairly trivial, e.g. Hanning) FFT (FFTW would be a good choice but if licensing is an issue then go for Kiss FFT or similar) calculate log magnitude of frequency domain components

What is a spectrogram and how do I set its parameters?

白昼怎懂夜的黑 提交于 2019-11-26 22:30:17
I am trying to plot the spectrogram of my time domain signal given: N=5000; phi = (rand(1,N)-0.5)*pi; a = tan((0.5.*phi)); i = 2.*a./(1-a.^2); plot(i); spectrogram(i,100,1,100,1e3); The problem is I don't understand the parameters and what values should be given. These values that I am using, I referred to MATLAB's online documentation of spectrogram . I am new to MATLAB, and I am just not getting the idea. Any help will be greatly appreciated! rayryeng Before we actually go into what that MATLAB command does, you probably want to know what a spectrogram is. That way you'll get more meaning

How to convert a .wav file to a spectrogram in python3

Deadly 提交于 2019-11-26 13:19:23
问题 I am trying to create a spectrogram from a .wav file in python3. I want the final saved image to look similar to this image: I have tried the following: This stack overflow post: Spectrogram of a wave file This post worked, somewhat. After running it, I got However, This graph does not contain the colors that I need. I need a spectrogram that has colors. I tried to tinker with this code to try and add the colors however after spending significant time and effort on this, I couldn't figure it

What is a spectrogram and how do I set its parameters?

别来无恙 提交于 2019-11-26 12:19:54
问题 I am trying to plot the spectrogram of my time domain signal given: N=5000; phi = (rand(1,N)-0.5)*pi; a = tan((0.5.*phi)); i = 2.*a./(1-a.^2); plot(i); spectrogram(i,100,1,100,1e3); The problem is I don\'t understand the parameters and what values should be given. These values that I am using, I referred to MATLAB\'s online documentation of spectrogram . I am new to MATLAB, and I am just not getting the idea. Any help will be greatly appreciated! 回答1: Before we actually go into what that