Message Boards Message Boards

Spectrogram of a Sound Object

Posted 9 years ago

Dear all,

What are the options used to generate the spectrogram of the Sound object ? , i.e.,

 ExampleData[{"Sound", "Apollo11PhoneCall"}]

Sound Object

Although the the Spectrogram function or the SpectrogramArray allow to calculate the spectrogram of this sound I don't known the options such as ColorFunction used to generate the spectrogram of the Sound object.

Spectrogram[ExampleData[{"Sound", "Apollo11PhoneCall"}]]

enter image description here

soundApollo11 = ExampleData[{"Sound", "Apollo11PhoneCall"}, "Data"][[1]];
soundApollo11Spect = SpectrogramArray[soundApollo11];
soundApollo11SpectIm = ImageRotate[#, 90 \[Degree]] &@((Abs@soundApollo11Spect)[[All, 1 ;; 512 ;; 1]] // Image // Colorize[#] &);
ImageResize[soundApollo11SpectIm, {512, 128}]

enter image description here

Thank you!

Luis

POSTED BY: Luis Mendes

The Spectogram function is much newer than sound object. That is, the sound object isn't making it's spectogram with the Spectogram function.

I don't think we can find what options for Spectogram were used to generate the spectogram in sound object because I don't think that Spectogram is used to generate the spectogram in sound object. But we can create a color function to try and reproduce the same effect.

By sampling the color used is RGBColor[{52, 48, 207}/256]. Playing around gives a reasonable approximating ColorFunction:

Spectrogram[ExampleData[{"Sound", "Apollo11PhoneCall"}], 
 ColorFunction -> (Blend[{White, RGBColor[{52, 48, 207}/256]}, #^(1/4)] &)]
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract