Fourier Series
Introduction
Can circles do more for us than draw these lovely patterns? Can they give us an alphabet, a universal way of generating and representing many forms of interest? Can we treat them like a bunch of kitchen ingredients, that we throw into a recipe to conjure up new dishes that look different?
Inspiration
Take a look at these paintings:
What is the Fourier Series?
Videos
Rolling Circles and the Fourier Series
So, if we choose number of circles
But how about the other way around? What if we had a “pattern” in mind, and wanted to compute the circles, their number and amplitudes, that would generate that pattern? This is where the Fourier Series comes in.
Wait, But Why?
- Think of the Fourier Series as a set of sinewaves that are derived by decomposing an original waveform
- How are these components related? As integer multiples of a fundamental frequency.
- How are their amplitudes calculated? By taking a correlation between the original waveform and the given sinewave component (unit amplitude)
- How is this accurate? By minimizing a “least square error” between the original waveform and the sum of sinusoids.
A Sound Vocabulary
Some terms will show up repeatedly in our work and we should be clear what they mean:
- Frequency
- Amplitude
- Phase
- Sinusoid
- Oscillation: https://natureofcode.com/oscillation/
- Harmonic
- In-harmonic
- Partials
- Waveform
- Transient
- Alias
References
- Alex Miller. (2018). Fourier Series and Spinning Circles. https://alex.miller.im/posts/fourier-series-spinning-circles-visualization/
- Aatish Bhatia (November 6, 2013). The Math Trick Behind MP3s, JPEGs, and Homer Simpson’s Face. https://nautil.us/the-math-trick-behind-mp3s-jpegs-and-homer-simpsons-face-234629/
- Better Explained. An Interactive Guide to the Fourier Transform. http://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/
- Amid Fish.(May 2017). Karplus Strong String Synthesis. http://amid.fish/karplus-strong
- Karplus, K., & Strong, A. (1983). Digital Synthesis of Plucked-String and Drum Timbres. Computer Music Journal, 7(2), 43. doi:10.2307/3680062. https://sci-hub.se/https://doi.org/10.2307/3680062
Resources
- https://mathlets.org/mathlets/fourier-coefficients/
- Working with Audio in
p5.js
. https://pdm.lsupathways.org/3_audio/ - Violet Whitney. (Sep 28, 2023) Sounds: Working with sounds and speech in P5.js. https://medium.spatialpixel.com/sounds-bd05429aba38
- Mister Bomb. p5.Sound project tutorials. https://www.youtube.com/playlist?list=PLIsdHp2z9wFl7A1wWb2VmQUUojEGsKELE
- https://musiclab.chromeexperiments.com/oscillators
- https://www.electronicbeats.net/the-feed/excel-drum-machine/
- https://junshern.github.io/algorithmic-music-tutorial/
- https://blackwhiskercult.com/visual-music-in-p5-js-i/
Other tools to explore
- Strudel REPL https://strudel.cc
- Introducing Jukebox, a neural net that generates music, including rudimentary singing, as raw audio in a variety of genres and artist styles. We’re releasing a tool for everyone to explore the generated samples, as well as the model and code: https://openai.com/index/jukebox/ (OpenAI ((OpenAI?)) April 30, 2020,via Twitter https://twitter.com/OpenAI)
- https://algorithmicpattern.org/2023/05/15/strudel-live-coding-patterns-on-the-web/
- https://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/
- Freesound: Find Any Sound you Like. https://freesound.org
- WebSpeech API. https://developer.chrome.com/blog/voice-driven-web-apps-introduction-to-the-web-speech-api/
- https://dogbotic.com
R Package Citations
Citation
@online{2024,
author = {},
title = {Fourier {Series}},
date = {2024-05-02},
url = {https://av-quarto.netlify.app/content/courses/MathModelsDesign/Modules/35-Media/10-FourierSeries/},
langid = {en}
}