Рет қаралды 276,841
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: thecodingtrain.com/tracks/sou...
🕹️ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/s...
🎥 Previous: • 17.10: Sound Visualiza...
References:
🔗 p5.sound library: p5js.org/reference/#/librarie...
🔗 p5.FFT: p5js.org/reference/#/p5.FFT
🔗 this.dot song: / this-dot-feat-daniel-s...
Related Coding Challenges:
🚂 • Coding Challenge 11: 3...
🚂 • Coding Challenge 125: ...
🚂 • Coding Challenge #136....
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: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: thecodingtrain.com/discord
💖 Membership: kzfaq.infojoin
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 • Coding Challenges
🎥 • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
#soundvisualization #frequencyanalysis #fft #p5js