Tuesday, April 18, 2017
Assertion: our perception of a ("stationary") sound is determined by its spectrum (the frequencies and the amplitudes).
This code plots the spectrum of a sound in a wav file: plot_spectrum.py
Example wav files: guitar low E, piano low F, brass bar
Here is the spectrum of the brass bar:
And here is the spectrum of the low piano note:
(Notice that the "fundamental" (the lowest frequency) is almost not present.)
This code produces a sound with components we specify: replicate_sound.py
Let us see if we can synthesize the recorded brass bar sound above using frequencies and amplitudes read from the spectrum of the recording:
Let's record the sound a drum, and analyze and synthesize it.
Let's solve this problem, find the spectrum, and see if it matches the recording of the real drum.
Online tone generator in case it's useful