Coding Challenge #151: Ukulele Tuner with Machine Learning Pitch Detection Model
In this challenge, I attempt to create a Ukulele tuner in JavaScript using p5.js, ml5.js and the pre-trained machine learning model CREPE: A Convolutional REpresentation for Pitch Estimation. Can you make one with a more elegant and creative interface? Code: https://thecodingtrain.com/challenges/151-ukulele-tuner-with-machine-learning
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/8io2zvT03
π₯ Previous video: https://youtu.be/vEetoBuHj8g?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/nSYw9GrakjY?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
π ml5.js: https://ml5js.org/
π§ CREPE: A Convolutional REpresentation for Pitch Estimation: https://github.com/marl/crepe
π¨ Hannah Davis: http://www.hannahishere.com/
π How to turn any GitHub repo into a CDN: https://gomakethings.com/how-to-turn-any-github-repo-into-a-cdn/
π Online Tone Generator: https://www.szynalski.com/tone-generator/
π΄ Coding Train Live 183: https://youtu.be/1b9-O7pnUcg?t=5911s
Related Coding Challenges:
π #41 Clappy Bird: https://youtu.be/aKiyCeIuwn4
π #147 Chrome Dinosaur Game: https://youtu.be/l0HoJHc-63Q
π #153 Interactive Drawing with SketchRNN: https://youtu.be/ZCXkvwLxBrA
Timestamps:
00:00 Introduction
01:04 Import the ml5 library
01:34 Pitch detection using ml5
02:24 The CREPE model
05:07 Using the CREPE model in the web editor
07:19 Create a pitch detector with ml5
11:57 The new keyword: constructors vs functions
13:26 Get a frequency value from the microphone
14:48 Make sure the microphone is ready first
15:33 ml5 callbacks are error-first
17:12 Checking the frequency continuously
18:05 Drawing the frequency in the canvas
19:46 Tuning the A string of the ukulele
25:08 Improving the graphical interface
27:06 Tuning the other strings of the ukulele
28:44 Figure out which note is the closest one
31:51 Debugging and fixing the code
34:51 Wrapping up this coding challenge
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: http://thecodingtrain.com/
πΎ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
π‘ GitHub: https://github.com/CodingTrain
π¬ Discord: https://thecodingtrain.com/discord
π Membership: http://youtube.com/thecodingtrain/join
π Store: https://standard.tv/codingtrain
ποΈ Twitter: https://twitter.com/thecodingtrain
πΈ Instagram: https://www.instagram.com/the.coding.train/
π₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: https://p5js.org
π p5.js Web Editor: https://editor.p5js.org/
π Processing: https://processing.org
π Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#machinelearning #pitchdetection #sound #tuner #p5js #ml5js #javascript