The result of Spectrogram()
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hey all, I've a sound and a spectrogram of it.
But I honestly do not know what it means, shows and do.
Here's what I've got
load handel; % 'handel' is a MAT-file which is shipped with MATLAB as an example
x = y/10; % Decrease volume
player = audioplayer(x, Fs);
play(player,[1 (get(player, 'SampleRate')*10)]);
spectrogram(x);
Spectrogram(x) prints this:
Is there anyone that can tell me what the spectrogram function does and shows? What does the yellow and green color mean?
0 comentarios
Respuestas (1)
Cris LaPierre
el 5 de Dic. de 2020
You might find this previous Answers post helpful as well: How to understand spectrogram function
2 comentarios
Cris LaPierre
el 5 de Dic. de 2020
Note that the limits of your colorbar have changed, so be careful about making broad statements based solely on color. Amplitude of a sound is related to volume, so while the density of the lines does not impact volume, the more a frequency tends towards yellow, the louder it will be.
Each "row" of your spectrogram represents a snapshot in time of your signal. The x-axis shows the range of frequencies contained in the entire signal, and each row of colors indicates the amplitude of the corresponding frequency at that time instance. As you move from the bottom to the top of the spectrogram, you are moving from the start to the end of the song.
You may be able to see this better if you take advantage of some of the other inputs. Note the 3 bands.
load handel; % 'handel' is a MAT-file which is shipped with MATLAB as an example
y(25000:end)=y(25000:end)./10; % y/10
y(50000:end)=y(50000:end)./10; % y/100
spectrogram(y,128,120,128,Fs)
% to listen to it
handelObj = audioplayer(y,Fs);
play(handelObj)
Ver también
Categorías
Más información sobre Audio and Video Data en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!