{"id":5837,"date":"2020-06-07T19:57:06","date_gmt":"2020-06-07T19:57:06","guid":{"rendered":"https:\/\/clydelettsome.com\/blog\/?p=5837"},"modified":"2020-08-29T21:23:24","modified_gmt":"2020-08-29T21:23:24","slug":"my-weekend-project-musical-note-detector-using-an-arduino","status":"publish","type":"post","link":"https:\/\/clydelettsome.com\/blog\/2020\/06\/07\/my-weekend-project-musical-note-detector-using-an-arduino\/","title":{"rendered":"My Weekend Project: Musical Note Detector Using An Arduino"},"content":{"rendered":"<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/2n_JiXvBwsw\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><strong>Description:<\/strong> This project shows an Arduino project that displays the approximate frequency as well as the musical note played on an electronic keyboard or piano app. For this project, the analog output from the sound module detector is sent to the A0 analog input of the Arduino Uno. The analog signal is sampled and quantized (digitized). Auto-correlation, weighting and tuning code is used to find fundamental frequency using the first 3 periods. The approximate fundamental frequency is then compared to frequencies in octaves 3, 4, and 5 range to determine the closest musical note frequency. Finally the guessed note for the closest frequency is printed to the screen.<\/p>\n<p><strong>Parts List:<\/strong><\/p>\n<ul>\n<li>Arduino Uno<\/li>\n<li><a href=\"https:\/\/www.amazon.com\/gp\/product\/B07R452F6J\/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&amp;psc=1\">DEVMO High Sensitivity Sound Detection Module for Arduino<\/a><\/li>\n<li>Solderless Breadboard<\/li>\n<li>USB-A to B Cable<\/li>\n<li>Computer with Arduino IDE installed<\/li>\n<li>Jumper Wires<\/li>\n<li>PC Speakers (if you are using a piano or keyboard app like <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=umito.android.minipiano&amp;hl=en_US\" target=\"_blank\" rel=\"nofollow noopener\">Mini Piano LT<\/a>)<\/li>\n<\/ul>\n<p><strong>Fritzing Diagram:<\/strong> Below is a Fritzing Diagram of the circuit constructed for this project. To see this circuit being constructed, please see this video: <a href=\"https:\/\/clydelettsome.com\/blog\/2019\/12\/18\/my-weekend-project-audio-frequency-detector-using-an-arduino\/\">My Weekend Project: Audio Frequency Detector Using An Arduino<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5847\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Fritzing-Musical-Note-Detector.png\" alt=\"Fritzing-Musical-Note-Detector\" width=\"624\" height=\"460\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Fritzing-Musical-Note-Detector.png 624w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Fritzing-Musical-Note-Detector-500x369.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Fritzing-Musical-Note-Detector-300x221.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>The Code (aka Sketch):<\/strong> You may get the code by going to this page, <a href=\"https:\/\/clydelettsome.com\/blog\/product\/musical-note-detector-using-an-arduino\/\">Musical Note Detector Arduino Code (Sketch)<\/a><\/p>\n<p style=\"padding-left: 30px;\"><strong>Code Flowchart:<\/strong> Below is the flow chart for the code.<\/p>\n<p style=\"padding-left: 30px;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5850\" src=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Musical-Note-FlowChart.png\" alt=\"Musical-Note-FlowChart\" width=\"589\" height=\"1015\" srcset=\"https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Musical-Note-FlowChart.png 589w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Musical-Note-FlowChart-500x862.png 500w, https:\/\/clydelettsome.com\/blog\/wp-content\/uploads\/2020\/06\/Musical-Note-FlowChart-174x300.png 174w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/p>\n<p><strong>Apps Used On Tablet:<\/strong> <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=umito.android.minipiano&amp;hl=en_US\">Mini Piano LT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: This project shows an Arduino project that displays the approximate frequency as well as the musical note played on an electronic keyboard or piano app. For this project, the analog output from the sound module detector is sent to the A0 analog input of the Arduino Uno. The analog signal is sampled and quantized &hellip; <\/p>\n<div class=\"more-link-wrapper\"><a href=\"https:\/\/clydelettsome.com\/blog\/2020\/06\/07\/my-weekend-project-musical-note-detector-using-an-arduino\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;My Weekend Project: Musical Note Detector Using An Arduino&#8221;<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,433,13],"tags":[],"class_list":{"0":"post-5837","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-projects","7":"category-tutorials","8":"category-videos","9":"h-entry","10":"hentry"},"_links":{"self":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts\/5837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/comments?post=5837"}],"version-history":[{"count":10,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts\/5837\/revisions"}],"predecessor-version":[{"id":6013,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/posts\/5837\/revisions\/6013"}],"wp:attachment":[{"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/media?parent=5837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/categories?post=5837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clydelettsome.com\/blog\/wp-json\/wp\/v2\/tags?post=5837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}