37:4417.11: Sound Visualization: Frequency Analysis with FFT - p5.js Sound Tutorial
From the creator
In this video, I use the p5.FFT object to analyze the frequencies (spectrum array) of a sound file. I create a "graphic equalizer" like visualization. Code: https://thecodingtrain.com/tracks/sound/sound/11-sound-visualization-frequency-analysis 🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/IYB_UgWab 🎥 Previous: https://youtu.be/h_aTgOl9J5I References: 🔗 p5.sound library: https://p5js.org/reference/#/libraries/p5.sound 🔗 p5.FFT: https://p5js.org/reference/#/p5.FFT 🔗 this.dot song: https://soundcloud.com/kristianpedersen/this-dot-feat-daniel-shiffman Related Coding Challenges: 🚂 https://youtu.be/IKB1hWWedMk 🚂 https://youtu.be/Mm2eYfj0SgA 🚂 https://youtu.be/ZI1dmHv3MeM Timestamps: 0:00 Introduction 0:43 p5.FFT object 1:27 Wikipedia page about FFT 1:59 Explain the algorithm 2:34 Amplitude at different frequency levels 2:57 Bins must be a power of 2 3:23 Add a p5.FFT object to sketch 4:16 Use analyze() to get the amplitude values along the frequency domain. 4:56 Default length of array is 1024 bins 6:16 Loop through the array 7:23 Values range between 0 and 255 8:50 Reduce the number of bins to 64 9:24 Space out the lines 9:59 Change the lines to rectangles 11:02 Add the smoothing - default is 0.8 12:59 Change to a circle 14:47 Adjust mapping to get full circle 16:19 Draw lines from the center 16:52 Suggestions for possible variations Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound 🚂 Website: https://thecodingt
Published 2016-10-19 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





