# MATH310S26 - Day 17: Energy in Frequency Space, Sound Synthesis, and Spectrograms
**Date**: February 25, 2026
**Topics**: Parseval's theorem, energy spectral density, waveform synthesis, time-frequency analysis via spectrograms
**Previous Classes**: [[MATH310S26-Day16-WorkdayMaterials (FFT and frequency discovery)]], [[MATH310S26-Day15-Notes]], [[MATH310S26-Day14-Notes]]
## Administrative Notes
- Guest presentation today: Former students (now seniors) presenting on "Whale Songs and Targeted Movement"
- Low-stakes feedback will be a form + PDF with spectrogram interpretation questions
- Canvas project updates returned to all but two students
- Next Monday (March 2): Another work day planned
## Part 1: Fourier Transform Pairs and Energy
### Recall: The Fourier Transform Pair
Starting with our fundamental transform relationships:
$\hat{f}(\omega) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(t) e^{-i\omega t} dt$
$f(t) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \hat{f}(\omega) e^{i\omega t} d\omega$
Note the conjugate relationship: one uses $e^{-i\omega t}$ and the other uses $e^{i\omega t}$.
### Inner Product Interpretation
The Fourier transform can be understood as an inner product in function space:
$\hat{f}(\omega) \propto \langle f(t), e^{-i\omega t} \rangle$
This connects to the abstract notion of [Hilbert space](https://en.wikipedia.org/wiki/Hilbert_space), where functions behave like vectors in infinite-dimensional space, maintaining familiar properties from $\mathbb{R}^n$.
## Part 2: Physical Interpretation - Simple Harmonic Oscillators
### Key Points
1. **For each $\omega$**: We have a [simple harmonic oscillator](https://en.wikipedia.org/wiki/Harmonic_oscillator)
2. **Each oscillator has energy**: $E \propto$ amplitude²
3. **Complex amplitudes**: Energy is $E \propto |\hat{f}(\omega)|^2 = \hat{f}(\omega) \cdot \hat{f}^*(\omega)$
### Total Energy and Parseval's Theorem
To get the total energy across all frequencies:
$E_{total} \propto \int_{-\infty}^{\infty} |\hat{f}(\omega)|^2 d\omega = ||\hat{f}||^2_{\mathbb{R}}$
This integral represents the **norm** of $\hat{f}$ on $\mathbb{R}$, connecting to [Parseval's theorem](https://en.wikipedia.org/wiki/Parseval%27s_theorem).
**Physical contexts**:
- **Sound**: Loudness per frequency
- **Light**: Intensity per color (photon energies based on frequency)
- **Data**: Energy per frequency component
## Part 3: Sinc Function and Energy Spectral Density
### Rectangular Pulse Transform (Review)
Recall from [[MATH310S26-Day15-Notes]] that the rectangular pulse has Fourier transform:
$\hat{f}(\omega) = \frac{1}{\sqrt{2\pi}} \cdot \frac{\sin(\omega L)}{\omega L}$
This is the [sinc function](https://en.wikipedia.org/wiki/Sinc_function), graphically appearing as:

### From Amplitude to Energy: The Squaring Effect
When we square $\hat{f}(\omega)$ to get energy spectral density $|\hat{f}(\omega)|^2$:
- Values between 0 and 1 → get smaller
- Values greater than 1 → get larger
- Negative regions → become positive
- Overall effect: Enhanced peak, suppressed sidelobes
**Diffraction pattern connection**: Looking at $|\hat{f}(\omega)|^2$ from above (bright = high energy, dark = low energy) gives the classic diffraction pattern observed with lasers - bright central maximum with alternating bright/dark fringes.
## Part 4: Sound Synthesis and Waveforms
Remember the flute video. 
### Classic Video Game Sound Synthesis
Early video game systems (NES ~50KB storage) used simple waveforms for efficient sound generation. Thinking about these sounds we look at the following "simple sounds" whose original video can be found at [https://www.youtube.com/watch?v=TlzXxkftxvk](https://www.youtube.com/watch?v=TlzXxkftxvk)
#### Pure Sine Wave

- Single frequency spike in spectrum
- "Clinical" or "artificial" sound quality
- Minimal storage requirements
#### Square Wave

- Strong harmonics at odd multiples of fundamental
- Harsh, "8-bit" sound character
- Used for aggressive game sounds (death sequences shown from Super Mario)
- Energy distributed significantly into harmonics
#### Triangle Wave

- Harmonics present but decay more rapidly than square wave
- Softer, less harsh than square wave
- More "musical" while still computationally simple
- Better approximation to natural instruments
### Harmonic Content and Timbre
The distribution of energy across harmonics determines the [timbre](https://en.wikipedia.org/wiki/Timbre) or "color" of a sound:
- **More harmonic energy** → Harsher, brighter sound
- **Rapid harmonic decay** → Softer, mellower sound
- **Pure fundamental only** → Artificial, sine-like quality
Someone repurposed an organ to make these chipsounds.

## Part 5: Spectrograms - Time-Frequency Analysis
### What is a Spectrogram?
A [spectrogram](https://en.wikipedia.org/wiki/Spectrogram) represents how frequency content changes over time:

- **Horizontal axis**: Time
- **Vertical axis**: Frequency
- **Color/Brightness**: Energy/amplitude at that time-frequency point
- Created by taking Fourier transforms of small time windows ([Short-time Fourier transform](https://en.wikipedia.org/wiki/Short-time_Fourier_transform))
### Visualizing Musical Structures
#### Example: Violin

Shows fundamental frequency and harmonic series characteristic of bowed string instruments.
### Applications: Music Recognition (Shazam)
The app [Shazam](https://en.wikipedia.org/wiki/Shazam_(application)) works by:
1. Recording audio snippet
2. Computing spectrogram via FFT
3. Identifying peak patterns ("fingerprint")
4. Database lookup against known song fingerprints
## Part 6: Advanced Vocal Techniques
### Singer Examples Analyzed
#### 1. Pure Sine (Synthesized)

Single horizontal line - one pure frequency maintained over time.
#### 2. Square Wave (Synthesized)

Multiple horizontal lines showing fundamental and odd harmonics.
#### 3. Triangle Wave (Synthesized)

Harmonics present but with decreasing intensity.
#### 4. Polyphonic/Overtone Singing

- One person singing two notes simultaneously
- Constant fundamental (drone) plus moving overtone melody
- Achieved through precise control of vocal tract resonances
- Demonstrated by Ana Maria (overtone singer) in class video
#### 5. Deep Bass Singing

Singer attempting extremely low frequencies - fundamental and harmonics all descending together.
#### 6. Yodeling

- Characteristic rapid jumps between frequencies
- Abrupt transitions visible as discontinuous horizontal lines
- Energy rapidly shifting between different frequency bands
Original source of the last three videos.

- The following is a video I made showing the polyphonic singer with the spectrogram visualization.

- Lastly, here are the two spectrograms of our mario sounds. Can you spot the one that is from the 8-bit days?
![[Teaching/MATH310/MATH310S26/Lecture Notes/Media/Day17 Media/NES.png]]
![[Teaching/MATH310/MATH310S26/Lecture Notes/Media/Day17 Media/Wonder.png]]
## Part 7: Introduction to Signal Processing - RC Circuits
### The RC Circuit Differential Equation
Consider a resistor-capacitor circuit with input signal $E(t)$:
$R\dot{q} + \frac{1}{C}q = E(t)$
Where:
- $R$ = resistance
- $C$ = capacitance
- $q$ = charge
- $E(t)$ = external signal (forcing function)
### Low-Pass Filtering
This [RC circuit](https://en.wikipedia.org/wiki/RC_circuit) acts as a **[low-pass filter](https://en.wikipedia.org/wiki/Low-pass_filter)**:
- Attenuates high-frequency components
- Allows low frequencies to "pass through"
- In audio: Reduces treble, emphasizes bass
- Makes piccolos quieter, tubas remain loud
This connects our Fourier analysis to practical signal processing applications.
## Check Your Understanding
Based on the quiz shown in the lecture materials:
1. **Fourier Transform Practice**: Calculate the Fourier transform of $f(t) = t$ on $(-1, 1)$ and zero otherwise.
2. **Spectrogram Interpretation**: Given spectrograms, describe:
- What type of sound/signal created it
- Key features (harmonics, frequency changes, energy distribution)
- Whether the sound would be harsh/soft, simple/complex
3. **Energy and Squaring**: Explain why $|\hat{f}(\omega)|^2$ represents energy per frequency and how squaring affects the visual representation.
## Key Takeaways
1. **Energy in frequency space** is given by $|\hat{f}(\omega)|^2$, connecting to physical quantities like loudness and intensity
2. **Spectrograms** provide time-frequency analysis, revealing how frequency content evolves - crucial for music analysis, speech processing, and signal identification
3. **Simple waveforms** (sine, square, triangle) have characteristic harmonic signatures that determine their timbre and applications
4. **Signal processing** operations like filtering can be understood through their effect on frequency components
5. **Mathematical abstraction meets physical reality**: Fourier analysis provides a bridge between abstract function spaces and measurable physical phenomena
## Mathematical Connections
- **Previous**: Built on [[MATH310S26-Day15-Notes]] (sinc function) and [[MATH310S26-Day16-WorkdayMaterials (FFT and frequency discovery)]] (FFT applications)
- **Upcoming**: RC circuit analysis, convolution theorem, filtering applications
- **Foundational**: Continues our progression from [[MATH310S26-Day7-Notes]] (Fourier series) through continuous transforms
- **Applications**: Connects to signal processing, audio engineering, and pattern recognition