{"id":17447,"date":"2016-11-07T10:00:47","date_gmt":"2016-11-07T18:00:47","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=17447"},"modified":"2021-06-11T11:04:27","modified_gmt":"2021-06-11T18:04:27","slug":"creating-a-touche-sensative-piano-with-beaglebone-black-and-labview","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/creating-a-touche-sensative-piano-with-beaglebone-black-and-labview\/","title":{"rendered":"Creating a Touch Sensitive Piano with BeagleBone Black and LabVIEW"},"content":{"rendered":"<p>I always wished that I could play the piano, without (of course) having to try too hard or having to undergo all those tedious lessons. A few years ago I decided to act on it and try to learn, mostly to impress the opposite gender. I had never played an instrument before, but I was fairly confident that I would be able to figure it out. I played a few times on my friends keyboard and decided that I needed to buy my own. I\u00a0went with one of the best rated beginner keyboards out at the time&#8230; which is the same thing as saying\u00a0that it was way too expensive.<\/p>\n<p>After a few weeks of trying and failing to teach myself the piano I accepted my failure and returned it. I recently saw a few piano projects online and I realized that this was my chance to redeem myself. So it seemed the choice was clear, it was time to break out the BeagleBone Black and D.I.Y. up my own piano at\u00a0home!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-17535 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-10-27-at-11.13.28-AM-600x376.png\" alt=\"screen-shot-2016-10-27-at-11-13-28-am\" width=\"600\" height=\"376\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-10-27-at-11.13.28-AM-600x376.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-10-27-at-11.13.28-AM-768x482.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-10-27-at-11.13.28-AM-1024x642.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-10-27-at-11.13.28-AM-343x215.png 343w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-10-27-at-11.13.28-AM-800x502.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-10-27-at-11.13.28-AM.png 1285w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong><u>Materials<\/u><\/strong><\/p>\n<p><em>Hardware<\/em><\/p>\n<ol>\n<li><a href=\"https:\/\/digilent.com\/shop\/beaglebone-black\/\">BeagleBone Black<\/a><\/li>\n<li><a href=\"https:\/\/digilent.com\/shop\/wi-pi-usb-wifi-module\/\">Wi-Pi WiFi dongle<\/a><\/li>\n<li>7 &#8211; 1 M\u03a9 resistors<\/li>\n<li><a href=\"http:\/\/shop.makeymakey.com\/products\/makey-makey-alligator-clips?variant=7577994052\">Gator Clips<\/a><\/li>\n<li>Copper tape<\/li>\n<\/ol>\n<p>(Everything except the chipKIT WF32 is included in the <a href=\"https:\/\/digilent.com\/shop\/labview-interaction-parts-kit\/\">LabVIEW Interactions Part Kit<\/a>)<\/p>\n<p><em>Software<\/em><\/p>\n<ol>\n<li><a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\" rel=\"nofollow\">LabVIEW<\/a><\/li>\n<li><a href=\"https:\/\/www.labviewmakerhub.com\/doku.php?id=blog:users:makerhub:2016-04-07-linx-3\">LINX 3.0<\/a><\/li>\n<\/ol>\n<p><strong><u>Building the piano<\/u><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-17384 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8420-2-600x450.jpg\" alt=\"img_8420\" width=\"600\" height=\"450\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8420-2-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8420-2-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8420-2-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8420-2-800x600.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8420-2-1200x900-cropped.jpg 1200w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>I made two versions of this piano.\u00a0In the first version, I used a pencil to draw in the keys. To do this, draw seven evenly spaced keys and then fill them in, providing\u00a0a thick layer of graphite. At the end, make a square at the top where the gator clips can attach.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-17388 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8418-1-600x450.jpg\" alt=\"img_8418\" width=\"600\" height=\"450\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8418-1-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8418-1-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8418-1-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8418-1-800x600.jpg 800w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>While this first method worked, it had a few drawbacks. I\u00a0got graphite all over my fingers when I used it, and I had to constantly fill it in when it starts to fade. A better\u00a0method is using copper tape, you just have to cut out seven identical pieces of copper tape and place them on a piece of cardboard.<\/p>\n<p><strong><u>LabVIEW Code<\/u><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-17581 alignnone\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-11-07-at-11.37.37-AM-600x351.png\" alt=\"screen-shot-2016-11-07-at-11-37-37-am\" width=\"600\" height=\"351\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-11-07-at-11.37.37-AM-600x351.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-11-07-at-11.37.37-AM-768x449.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-11-07-at-11.37.37-AM-1024x599.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-11-07-at-11.37.37-AM-800x468.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/Screen-Shot-2016-11-07-at-11.37.37-AM.png 1591w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>This code is split into two VI&#8217;s, the VI on the right runs on your computer and the one on the left runs on the BeagleBone Black. The VI on the left monitors the voltage change associated with one of the keys being touched, it is constantly sending the status of each of the keys to your computer over Wi-Fi using UDP.\u00a0The VI running on your computer uses this information to determine whether or not it should play a sound. The front panel of the VI running on your computer allows\u00a0you to enter a different wav file for each of the piano keys.\u00a0This makes it easy to customize the code and create any type of instrument you want.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-17539 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/BBB__Pianop-1-600x488.png\" alt=\"bbb__pianop\" width=\"600\" height=\"488\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/BBB__Pianop-1-600x488.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/BBB__Pianop-1-168x137.png 168w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/BBB__Pianop-1.png 755w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Thank you for reading my blog post, check out my <a href=\"https:\/\/www.instructables.com\/id\/Creating-Your-Own-DJ-Soundboard-With-the-BeagleBon\/\">Instructable<\/a> where I give step by step instructions.\u00a0if you are interested in making this project yourself but don&#8217;t have the right supplies you can purchase the LabVIEW computing kit for the <a href=\"https:\/\/digilent.com\/shop\/labview-physical-computing-kit-for-beaglebone-black\/\">BeagleBone Black<\/a>. This kit includes a copy of <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW 2014 home edition<\/a> and everything you will need to run <a href=\"https:\/\/www.labviewmakerhub.com\/doku.php?id=learn:tutorials:libraries:linx:3-0:beaglebone-black-setup\">LINX 3.0<\/a> and start making projects. Please comment with any questions or comments you may have.<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-17447 jlk' data-task='like' data-post_id='17447' data-nonce='e18fa772db' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-17447 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-17447 jlk' data-task='unlike' data-post_id='17447' data-nonce='e18fa772db' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-17447 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-17447 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Austin showcases his latest project, a homemade touch sensitive piano!<\/p>\n","protected":false},"author":42,"featured_media":17384,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4327,1561],"tags":[],"ppma_author":[4493],"class_list":["post-17447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","category-applications"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/10\/IMG_8420-2.jpg","authors":[{"term_id":4493,"user_id":42,"is_guest":0,"slug":"astanton","display_name":"Austin Stanton","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/056fddaefc60a1f99c226ea5757a8c41?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Stanton","last_name_2":"","first_name":"Austin","first_name_2":"","job_title":"","description":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/17447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=17447"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/17447\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/17384"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=17447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=17447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=17447"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=17447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}