An introduction to Sound

Will Styler - CSS Bootcamp


Today’s Plan


Why do CSS people give a damn about sound?


Sound is compression and rarefaction in a medium


… but we need to talk about it more concretely!


The Key Properties of Sound


Key Properties Continued


Duration



Amplitude





Conceptualizing Amplitude



Period






Frequency


f = 1/t






Greater period = Lower Frequency!



Wavelength


Calculating Wavelength requires two pieces of information…


It makes sense that frequency is involved


Wavelength is…


λ = c/f




Lower Frequencies have longer wavelengths


Conceptualizing Wavelength




We can find these things out for any sound!



Interim Summary


Amplitude


Sound Amplitude is pressure


Measuring Sound Pressure


Where do we measure on the wave?




We use Root-Mean-Square Amplitude


How far away do I measure from?


Distance matters!


There’s a bit more to it than this!


We know this to be true!


Amplitude measures without distances are meaningless


Amplitude measures without distances are meaningless


OK, so what units should we use?


Let’s start with a simple unit


What’s zero sound pressure?


What’s the maximum pressure?


So our range as humans is…



That’s kind of awful


Enter the Decibel!


dB SPL can be calculated from Pascal


So our range as humans is…


Yes, dB can be negative!


Aside: Decibels and Damage


High Amplitude sounds cause hearing damage!


What are the ‘safe’ levels?


What are ‘safe’ levels?


Instant Damage Sounds


Gradually damaging sounds


Amplitude is complex


Let’s think about more complex sounds


We’ve been looking at sine waves


… and our ears (almost) never just hear one frequency


So, we should probably talk about…


Complex Sounds


Complex Sounds


We’re going to work with simplified complex sounds today


How do we create complex sounds?





Let’s look at this process in a bit more detail!



You can add very different frequencies!


Why would sounds be combined together using addition?


The sum of two waves is the sum of their pressures at any given point


Interference


Interference


Constructive Interference


Destructive Interference


Constructive Interference


Destructive Interference


… but wait


Phase


Phase



Phase is important for adding sounds together!


Constructive Interference


Destructive Interference/Phase Cancellation


Complete cancellation is relatively rare!


Phase effects aren’t all-or-nothing



Aside: Applied Phase Cancellation



Humans can’t detect phase


Subtle Phase differences matter!




Complex Sounds are everywhere!



How do we understand their components?


Here’s a nice video on Fourier Transforms

https://www.youtube.com/watch?v=spUNpyF58BY

“But what is the Fourier Transform? A visual introduction” by 3Blue1Brown


We’ve been looking at waveforms!





Spectra show frequencies and their powers




FFTs give us the component frequencies


Spectrograms show frequency and power over time!



Fourier analysis works for any complex sound!





Our cochleas are doing something like fourier analysis!





Now let’s look at some other sounds!