{"id":14818,"date":"2016-05-31T09:50:24","date_gmt":"2016-05-31T08:50:24","guid":{"rendered":"http:\/\/www.recantha.co.uk\/blog\/?p=14818"},"modified":"2016-05-31T09:42:01","modified_gmt":"2016-05-31T08:42:01","slug":"raspberry-pi-music-box-my-own-project","status":"publish","type":"post","link":"https:\/\/www.recantha.co.uk\/blog\/?p=14818","title":{"rendered":"Raspberry Pi Music Box &#8211; my own project"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14819\" src=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?resize=560%2C315&#038;ssl=1\" alt=\"IMG_20160530_175921\" width=\"560\" height=\"315\" srcset=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?w=4864&amp;ssl=1 4864w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?resize=560%2C315&amp;ssl=1 560w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?resize=260%2C146&amp;ssl=1 260w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?resize=160%2C90&amp;ssl=1 160w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?w=1120&amp;ssl=1 1120w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?w=1680&amp;ssl=1 1680w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/a><\/p>\n<p>For a long time, I&#8217;ve wanted to do a project which involved two of my passions: the Raspberry Pi and music.\u00a0I&#8217;ve seen several projects which have successfully managed it, in particular the <a href=\"https:\/\/www.recantha.co.uk\/blog\/?p=9966\" target=\"_blank\">Joytone which used lots of joysticks to create music<\/a>. More recently, <a href=\"https:\/\/www.recantha.co.uk\/blog\/?p=14754\" target=\"_blank\">Calvin Cherry created a musical instrument with sensors attached to his body which produced sound based on movement and position<\/a>.<\/p>\n<p>My effort is pictured above. It&#8217;s just called <strong>The Music Box<\/strong> &#8211; I called it that for so long that, despite asking for suggestions on Twitter, the name\u00a0stuck.<\/p>\n<p><em>If you want to watch a video rather than read through my ramblings, head to the bottom of the page.<\/em><\/p>\n<h2>Hardware<\/h2>\n<p>The Music Box is a wooden box (procured from the magical place known as eBay) fitted out with buttons on top and at the back, three <a href=\"https:\/\/makersify.com\/products\/adafruit-panel-mount-10k-potentiometer-breadboard-friendly\" target=\"_blank\">10K potentiometers<\/a> (with coloured knobs which make <em>all<\/em> the difference, of course) and an obligatory (purple!) LED at the front. Inside, it is stuffed with all the wiring necessary to connect the buttons, potentiometers and LED to a Raspberry\u00a0Pi 2 via an <a href=\"https:\/\/makersify.com\/products\/adafruit-perma-proto-hat-for-pi-mini-kit-no-eeprom?variant=1027843417\" target=\"_blank\">Adafruit Proto Pi HAT<\/a>\u00a0board. I have used an <a href=\"https:\/\/makersify.com\/products\/adafruit-mcp3008-8-channel-10-bit-adc-with-spi-interface\" target=\"_blank\">MCP3008<\/a>\u00a0analog-to-digital converter chip to take the potentiometer readings.<\/p>\n<p><em><a href=\"http:\/\/www.protoboards.co.uk\/2014\/11\/ProtoPal.html\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"https:\/\/i0.wp.com\/4.bp.blogspot.com\/-s4hGMiXuPSc\/VKXVJTCWzZI\/AAAAAAAAF0c\/Sfyf2xeZvZM\/s1600\/ProtoPal350.jpg?resize=186%2C161\" width=\"186\" height=\"161\" \/><\/a>I had initially used a <a href=\"http:\/\/www.protoboards.co.uk\/2014\/11\/ProtoPal.html\" target=\"_blank\">ProtoPal from the Average Man<\/a>\u00a0but I messed it up. I just wanted to give a shout-out about the board as it would&#8217;ve done the job slightly better than the Adafruit. I will re-use it at some point but I need to get my\u00a0solder-sucker out and clean it up a bit!<\/em><\/p>\n<p>Also in the box is some <a href=\"https:\/\/makersify.com\/products\/powerboost-1000-charger-rechargeable-5v-lipo-usb-boost-1a-1000c?variant=7487237185\" target=\"_blank\">power circuitry<\/a>, <a href=\"https:\/\/makersify.com\/products\/adafruit-stereo-2-8w-class-d-audio-amplifier-i2c-control-agc-tpa2016?variant=7487354305\" target=\"_blank\">an amplifier<\/a>, <a href=\"https:\/\/makersify.com\/products\/adafruit-breadboard-friendly-pcb-mount-mini-speaker-8-ohm-0-2w?variant=7487282369\" target=\"_blank\">two speakers<\/a> and a <a href=\"https:\/\/www.coolcomponents.co.uk\/lithium-polymer-battery-2000mah.html\" target=\"_blank\">LIPO battery<\/a>\u00a0(I also got <a href=\"https:\/\/www.coolcomponents.co.uk\/lipo-charger-basic-micro-usb.html\" target=\"_blank\">a little microUSB charger for the LIPO<\/a>). The buttons on top (both <a href=\"https:\/\/makersify.com\/products\/adafruit-16mm-illuminated-pushbutton-yellow-momentary\" target=\"_blank\">yellow<\/a> and <a href=\"https:\/\/makersify.com\/products\/adafruit-16mm-illuminated-pushbutton-white-momentary\" target=\"_blank\">white<\/a>) and most of the other components (including the lovely <a href=\"https:\/\/makersify.com\/products\/chrome-bezel-for-5mm-through-hole-led-bezel-pack-of-10\" target=\"_blank\">LED bezel<\/a> on the front) came from <strong><a href=\"https:\/\/makersify.com\/\" target=\"_blank\">Makersify<\/a><\/strong>, which is a fantastic UK-based maker store that carries most of the Adafruit stock and can order in anything that isn&#8217;t\u00a0in stock.<\/p>\n<p><em>Oh, something I learned while putting The Music Box together: 1K potentiometers will\u00a0<strong>not<\/strong> do the job. The MCP3008 acts as though nothing is connected. A 10K potentiometer, however, will work very nicely.\u00a0<strong>Big thanks<\/strong> to <a href=\"http:\/\/raspi.tv\">Alex Eames<\/a> and others on Twitter who helped me to diagnose this. Once again the valuable Raspberry Pi community comes through! If anyone knows\u00a0<strong>why<\/strong> this is, by all means leave a comment!<\/em><\/p>\n<p>Here&#8217;s a photograph of the inside of the Music Box. My apologies that it isn&#8217;t more detailed &#8211; there&#8217;s only so far I can open the box without the innards falling out! You can see more in the video at the bottom.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14820\" src=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?resize=560%2C315&#038;ssl=1\" alt=\"IMG_20160530_183751\" width=\"560\" height=\"315\" srcset=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?w=4864&amp;ssl=1 4864w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?resize=560%2C315&amp;ssl=1 560w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?resize=260%2C146&amp;ssl=1 260w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?resize=160%2C90&amp;ssl=1 160w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?w=1120&amp;ssl=1 1120w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_183751.jpg?w=1680&amp;ssl=1 1680w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/a><\/p>\n<h2>Software<\/h2>\n<p>The software is a mixture of <a href=\"http:\/\/gpiozero.readthedocs.io\" target=\"_blank\">GPIO Zero<\/a>, standard Python and the <a href=\"https:\/\/pypi.python.org\/pypi\/pyFluidSynth\" target=\"_blank\">pyFluidSynth library<\/a>\u00a0which communicates with <a href=\"http:\/\/www.fluidsynth.org\/\" target=\"_blank\">FluidSynth,<\/a>\u00a0a synthesiser that plays sound fonts. I loaded <a href=\"http:\/\/johannes.roussel.free.fr\/music\/soundfonts.htm\" target=\"_blank\">thirty-two different sound fonts<\/a>\u00a0and it will be easy enough to add more as I can just drop them into the folder and the software will automatically load them.<\/p>\n<p>The program imports the necessary libraries, loads the sound font files and then uses GPIO Zero to detect when_pressed and when_released events. When these events are detected, the sound samples are started\u00a0or stopped accordingly. GPIO Zero is inherently multi-threaded which means I can press more than one button at once to form chords. The code also plays a sample and lights up the LED when the program is ready for use.<\/p>\n<p>The three potentiometers control various aspects of playback. The red pot controls the volume at which the samples are played. The green pot controls which of the thirty-two\u00a0sound fonts are used, i.e. what instrument is played back. The blue pot controls the set of notes playable on the seven buttons. By turning the pot to the left, lower notes are played whilst turning it to the right raises the pitch.<\/p>\n<p><em>Thanks to Ben Nuttall for help at the start to understand how the event handlers worked. Also, thanks to Pimoroni who wrote the code for the Pi Piano and got me going. I didn&#8217;t end up doing it that way in the end, but the Pi Piano code helped me to work out how to load unlisted files from a directory.<\/em><\/p>\n<p><a href=\"https:\/\/github.com\/recantha\/musicbox\" target=\"_blank\">All the code is available on GitHub for you to inspect<\/a>! Any questions, please leave a comment!<\/p>\n<h2>Demonstration<\/h2>\n<p>Here is a five-minute walkaround video I made of The Music Box. In it, I describe the hardware and software and also turn it on and play a few sounds.<\/p>\n<p><iframe loading=\"lazy\" title=\"Raspberry Pi Music Box\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/NZqphdmkSbE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>I hope this won&#8217;t be the last music\/tech project that I do as I&#8217;ve found it really fulfilling. It&#8217;s been great to use so many different parts and bring them together to create something which is both portable and, above all, usable.<\/p>\n<p>Any questions about the hardware or software, please feel free to leave a comment or <a href=\"https:\/\/www.recantha.co.uk\/blog\/?page_id=610\" target=\"_blank\">contact me<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a long time, I&#8217;ve wanted to do a project which involved two of my passions: the Raspberry Pi and music.\u00a0I&#8217;ve seen several projects which have successfully managed it, in particular the Joytone which used lots of joysticks to create&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[50,31,39],"tags":[],"class_list":["post-14818","post","type-post","status-publish","format-standard","hentry","category-making","category-music","category-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Raspberry Pi Music Box - my own project - Raspberry Pi Pod<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Raspberry Pi Music Box - my own project - Raspberry Pi Pod\" \/>\n<meta property=\"og:description\" content=\"For a long time, I&#8217;ve wanted to do a project which involved two of my passions: the Raspberry Pi and music.\u00a0I&#8217;ve seen several projects which have successfully managed it, in particular the Joytone which used lots of joysticks to create&hellip;Read more &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\" \/>\n<meta property=\"og:site_name\" content=\"Raspberry Pi Pod\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/recantha\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-31T08:50:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg\" \/>\n<meta name=\"author\" content=\"Michael Horne\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@recantha\" \/>\n<meta name=\"twitter:site\" content=\"@recantha\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Horne\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\"},\"author\":{\"name\":\"Michael Horne\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\"},\"headline\":\"Raspberry Pi Music Box &#8211; my own project\",\"datePublished\":\"2016-05-31T08:50:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\"},\"wordCount\":840,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg\",\"articleSection\":[\"Making\",\"Music\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\",\"name\":\"Raspberry Pi Music Box - my own project - Raspberry Pi Pod\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg\",\"datePublished\":\"2016-05-31T08:50:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=14818\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?fit=4864%2C2736&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?fit=4864%2C2736&ssl=1\",\"width\":4864,\"height\":2736},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=14818#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.recantha.co.uk\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Raspberry Pi Music Box &#8211; my own project\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"name\":\"Raspberry Pi Pod\",\"description\":\"Experiences with the Raspberry Pi micro computer and microcontroller\",\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\",\"name\":\"Raspberry Pi Pod\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"width\":800,\"height\":337,\"caption\":\"Raspberry Pi Pod\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/recantha\/\",\"https:\/\/x.com\/recantha\",\"https:\/\/www.linkedin.com\/in\/recantha\/\",\"https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\",\"name\":\"Michael Horne\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"caption\":\"Michael Horne\"},\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Raspberry Pi Music Box - my own project - Raspberry Pi Pod","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.recantha.co.uk\/blog\/?p=14818","og_locale":"en_US","og_type":"article","og_title":"Raspberry Pi Music Box - my own project - Raspberry Pi Pod","og_description":"For a long time, I&#8217;ve wanted to do a project which involved two of my passions: the Raspberry Pi and music.\u00a0I&#8217;ve seen several projects which have successfully managed it, in particular the Joytone which used lots of joysticks to create&hellip;Read more &rarr;","og_url":"https:\/\/www.recantha.co.uk\/blog\/?p=14818","og_site_name":"Raspberry Pi Pod","article_publisher":"https:\/\/www.facebook.com\/recantha\/","article_published_time":"2016-05-31T08:50:24+00:00","og_image":[{"url":"https:\/\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg","type":"","width":"","height":""}],"author":"Michael Horne","twitter_card":"summary_large_image","twitter_creator":"@recantha","twitter_site":"@recantha","twitter_misc":{"Written by":"Michael Horne","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818#article","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818"},"author":{"name":"Michael Horne","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263"},"headline":"Raspberry Pi Music Box &#8211; my own project","datePublished":"2016-05-31T08:50:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818"},"wordCount":840,"commentCount":5,"publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage"},"thumbnailUrl":"https:\/\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg","articleSection":["Making","Music","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.recantha.co.uk\/blog\/?p=14818#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818","url":"https:\/\/www.recantha.co.uk\/blog\/?p=14818","name":"Raspberry Pi Music Box - my own project - Raspberry Pi Pod","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage"},"thumbnailUrl":"https:\/\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg","datePublished":"2016-05-31T08:50:24+00:00","breadcrumb":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.recantha.co.uk\/blog\/?p=14818"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818#primaryimage","url":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?fit=4864%2C2736&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/05\/IMG_20160530_175921.jpg?fit=4864%2C2736&ssl=1","width":4864,"height":2736},{"@type":"BreadcrumbList","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=14818#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.recantha.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"Raspberry Pi Music Box &#8211; my own project"}]},{"@type":"WebSite","@id":"https:\/\/www.recantha.co.uk\/blog\/#website","url":"https:\/\/www.recantha.co.uk\/blog\/","name":"Raspberry Pi Pod","description":"Experiences with the Raspberry Pi micro computer and microcontroller","publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.recantha.co.uk\/blog\/#organization","name":"Raspberry Pi Pod","url":"https:\/\/www.recantha.co.uk\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","width":800,"height":337,"caption":"Raspberry Pi Pod"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/recantha\/","https:\/\/x.com\/recantha","https:\/\/www.linkedin.com\/in\/recantha\/","https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg"]},{"@type":"Person","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263","name":"Michael Horne","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","caption":"Michael Horne"},"url":"https:\/\/www.recantha.co.uk\/blog\/?author=1"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2RsaV-3R0","jetpack-related-posts":[{"id":15482,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=15482","url_meta":{"origin":14818,"position":0},"title":"Pack up your troubles in your old (gig) bag with a Raspberry Pi and Arduino","author":"Michael Horne","date":"15 September 2016","format":false,"excerpt":"Martin Hertig took a guitar bag, hooked up\u00a0an Arduino to the zips via conductive thread to make a MIDI controller and then added a Raspberry Pi into the mix to create his project, called Zippy. The Pi runs FluidSynth synthesizer software (as my Music Box does!) to play the sounds.\u2026","rel":"","context":"In &quot;Arduino&quot;","block_context":{"text":"Arduino","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=55"},"img":{"alt_text":"","src":"http:\/\/i0.wp.com\/martinhertig.ch\/wp-content\/uploads\/2015\/03\/ZippyWeb.jpg?fit=778%2C1037&resize=350%2C200","width":350,"height":200,"srcset":"http:\/\/i0.wp.com\/martinhertig.ch\/wp-content\/uploads\/2015\/03\/ZippyWeb.jpg?fit=778%2C1037&resize=350%2C200 1x, http:\/\/i0.wp.com\/martinhertig.ch\/wp-content\/uploads\/2015\/03\/ZippyWeb.jpg?fit=778%2C1037&resize=525%2C300 1.5x, http:\/\/i0.wp.com\/martinhertig.ch\/wp-content\/uploads\/2015\/03\/ZippyWeb.jpg?fit=778%2C1037&resize=700%2C400 2x"},"classes":[]},{"id":20581,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=20581","url_meta":{"origin":14818,"position":1},"title":"World Alzheimer&#8217;s Day &#8211; a project helping dementia\/Alzheimer&#8217;s sufferers explore their memories, prototyped using the Raspberry Pi","author":"Michael Horne","date":"21 September 2020","format":false,"excerpt":"21st September is World Alzheimer's Day. A few years ago, my Nan passed away. By the end, she didn't recognise anybody and couldn't communicate. It is not an illness or a condition I would wish on\u00a0anyone. Back in 2010, Chloe Meineck began creating the first Music Memory Box. The idea\u2026","rel":"","context":"In &quot;Making&quot;","block_context":{"text":"Making","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=50"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2020\/09\/mmb-music-notes-uai-1032x688-1.jpg?fit=1032%2C688&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2020\/09\/mmb-music-notes-uai-1032x688-1.jpg?fit=1032%2C688&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2020\/09\/mmb-music-notes-uai-1032x688-1.jpg?fit=1032%2C688&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2020\/09\/mmb-music-notes-uai-1032x688-1.jpg?fit=1032%2C688&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":19182,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=19182","url_meta":{"origin":14818,"position":2},"title":"Make a MIDI piano with the Raspberry Pi and a PiCap","author":"Michael Horne","date":"19 September 2018","format":false,"excerpt":"The PiCap from Bare Conductive uses conductive ink to transfer touch impulses to the Raspberry Pi. They've written a lovely little tutorial on how to do it yourself and have put the code on GitHub. If you want to do it \"properly\", you'll need to follow their screen printing tutorial\u00a0but\u2026","rel":"","context":"In &quot;Accessories&quot;","block_context":{"text":"Accessories","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=54"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/09\/pi_cap_midi.jpg?fit=720%2C415&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/09\/pi_cap_midi.jpg?fit=720%2C415&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/09\/pi_cap_midi.jpg?fit=720%2C415&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/09\/pi_cap_midi.jpg?fit=720%2C415&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":18617,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=18617","url_meta":{"origin":14818,"position":3},"title":"Nsynth, the Raspberry Pi touch-interface music synthesizer","author":"Michael Horne","date":"22 March 2018","format":false,"excerpt":"I do like a nice music-and-tech project and this one is pretty special. Called the Nsynth, this tablet-with-controls device is powered by a Raspberry Pi and accepts MIDI inputs which it then feeds through an openFrameworks app. The MIDI samples are then processed using the app according to whatever the\u2026","rel":"","context":"In &quot;3D printing&quot;","block_context":{"text":"3D printing","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=2"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/nsynth.jpg?fit=1200%2C661&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/nsynth.jpg?fit=1200%2C661&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/nsynth.jpg?fit=1200%2C661&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/nsynth.jpg?fit=1200%2C661&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2018\/03\/nsynth.jpg?fit=1200%2C661&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":16835,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=16835","url_meta":{"origin":14818,"position":4},"title":"Play YouTube tracks from your Google AIY \/ Raspberry Pi box","author":"Michael Horne","date":"8 May 2017","format":false,"excerpt":"Those of us who were lucky enough to get hold of the new issue of The MagPi, with the AIY project give-away, have been beavering away over the weekend trying to get our cardboard boxes to understand a word we're saying, with differing levels of success. I, myself, had great\u2026","rel":"","context":"In &quot;AIY&quot;","block_context":{"text":"AIY","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=368"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/05\/Google_AIY.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/05\/Google_AIY.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/05\/Google_AIY.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/05\/Google_AIY.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/05\/Google_AIY.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":16658,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=16658","url_meta":{"origin":14818,"position":5},"title":"Ultrasonic sensors and FluidSynth used together to create a Raspberry Pi-powered synthesizer","author":"Michael Horne","date":"29 March 2017","format":false,"excerpt":"Andy Grove has created a musical instrument by adding 8 ultrasonic distance sensors to a Raspberry Pi, via an Octasonic breakout board. The software, which is available on GitHub, is written in the Rust programming language and the synthesizer is based on FluidSynth, a piece of software I used myself\u2026","rel":"","context":"In &quot;Accessories&quot;","block_context":{"text":"Accessories","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=54"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/03\/ultrasonic_fluidsynth.jpg?fit=1200%2C670&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/03\/ultrasonic_fluidsynth.jpg?fit=1200%2C670&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/03\/ultrasonic_fluidsynth.jpg?fit=1200%2C670&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/03\/ultrasonic_fluidsynth.jpg?fit=1200%2C670&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2017\/03\/ultrasonic_fluidsynth.jpg?fit=1200%2C670&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14818"}],"version-history":[{"count":5,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14818\/revisions"}],"predecessor-version":[{"id":14827,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14818\/revisions\/14827"}],"wp:attachment":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}