Sound and Signal Analysis

Developing Understanding of Sound through Python

Recently, I have been exploring the use of Python to analyze and interpret sounds and signals. This is useful in identifying harmonics, deeper sonic analysis, and recreating sounds through synthesis and filtering.

The code above, written in Jupyter Notebook, uses FFT windowing to identify the frequency, resolution, amplitude, and phase in degrees of the first five harmonics of a sound file. This is executed by finding the index of the loudest harmonic, and then finding the frequency, resolution, amplitude, and phase at this index value. The, this index is set to zero and the process is repeated to find the next harmonic.

This can be useful in analyzing a signal, but could be further utilized and developed by means to recreating a sound through synthesis and filtering. This may seem like a simple process, but could be further expanded upon to analyze, form conclusions about, and recreate sounds from the real world.

Waterfall Sample Images

The code to the left uses FFT windowing and STFT images to compare and contrast real-world sounds in order to find meaningful insights about their differences. This particular code is comparing a sample of a waterfall— calming, natural, and serene— against a sample of rainfall— harsh, jarring, and sonically similar to white noise— in order to investigate why they invoke such different reactions and emotional responses.

Rain Sample Images

Analysis and Conclusions

Looking at the waterfall FFT plot this sound is made up of many harmonic frequencies that are symmetrically and evenly distributed to create a calming, natural sound. The STFT image also shows that the amplitude and frequencies are evenly distributed and consistent through the sample.

In contrast, the rain FFT plot shows many more harmonic frequencies, all with relatively high amplitudes, resulting in a much more sharp and jarring sound which is far less relaxing. Additionally, the STFT image is far less consistent in frequency and amplitude when compared to that of the waterfall.

Previous
Previous

Generative Composition

Next
Next

Songwriting