{"id":500,"date":"2016-11-07T21:53:27","date_gmt":"2016-11-08T02:53:27","guid":{"rendered":"https:\/\/portfolios.cs.earlham.edu\/?p=500"},"modified":"2016-11-07T21:53:27","modified_gmt":"2016-11-08T02:53:27","slug":"fun-with-portaudio-and-next-steps","status":"publish","type":"post","link":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/","title":{"rendered":"Fun with PortAudio and Next Steps"},"content":{"rendered":"<p>Today, I added the ability to change the volume of the sound based on the acceleration value, or how quickly the hand is moved, as well as change the frequency of the sound and thus change the note being played using a simple beat counter. I also noticed that the beat detection works almost flawlessly while I make the conductor&#8217;s motions repeatedly, which is a good sign that my threshold value is close to the ideal value, if there is one.<\/p>\n<p>Now that the beat detection is working for the most part, the next thing I need to do is to figure out how to take these beats and either: a) convert them to MIDI messages, or b) route them through JACK to another application. Whichever library I find and use, it has to be one that doesn&#8217;t involve a sleep function that causes the entire program to freeze for the duration of the sleep.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, I added the ability to change the volume of the sound based on the acceleration value, or how quickly the hand is moved, as well as change the frequency of the sound and thus change the note being played &hellip; <a href=\"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/\">Read More<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-500","post","type-post","status-publish","format-standard","hentry","category-edward"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Fun with PortAudio and Next Steps - CS\/DS Student Portfolios<\/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:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fun with PortAudio and Next Steps - CS\/DS Student Portfolios\" \/>\n<meta property=\"og:description\" content=\"Today, I added the ability to change the volume of the sound based on the acceleration value, or how quickly the hand is moved, as well as change the frequency of the sound and thus change the note being played &hellip; Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/\" \/>\n<meta property=\"og:site_name\" content=\"CS\/DS Student Portfolios\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-08T02:53:27+00:00\" \/>\n<meta name=\"author\" content=\"Edward Ly\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Edward Ly\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/\"},\"author\":{\"name\":\"Edward Ly\",\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/89af3998f351d29a0ccc69f7311c2aa9\"},\"headline\":\"Fun with PortAudio and Next Steps\",\"datePublished\":\"2016-11-08T02:53:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/\"},\"wordCount\":163,\"commentCount\":0,\"articleSection\":[\"Edward\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/\",\"url\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/\",\"name\":\"Fun with PortAudio and Next Steps - CS\\\/DS Student Portfolios\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/#website\"},\"datePublished\":\"2016-11-08T02:53:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/89af3998f351d29a0ccc69f7311c2aa9\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/2016\\\/11\\\/07\\\/fun-with-portaudio-and-next-steps\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fun with PortAudio and Next Steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/#website\",\"url\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/\",\"name\":\"CS\\\/DS Student Portfolios\",\"description\":\"AI and ML, Image Classification, Arduino\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/89af3998f351d29a0ccc69f7311c2aa9\",\"name\":\"Edward Ly\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2633fa74216d093a8642a5432c44963fd10f677e4cbcc6d935069f9859630ee?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2633fa74216d093a8642a5432c44963fd10f677e4cbcc6d935069f9859630ee?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2633fa74216d093a8642a5432c44963fd10f677e4cbcc6d935069f9859630ee?s=96&d=mm&r=g\",\"caption\":\"Edward Ly\"},\"url\":\"https:\\\/\\\/portfolios.cs.earlham.edu\\\/index.php\\\/author\\\/esly14\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fun with PortAudio and Next Steps - CS\/DS Student Portfolios","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:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/","og_locale":"en_US","og_type":"article","og_title":"Fun with PortAudio and Next Steps - CS\/DS Student Portfolios","og_description":"Today, I added the ability to change the volume of the sound based on the acceleration value, or how quickly the hand is moved, as well as change the frequency of the sound and thus change the note being played &hellip; Read More","og_url":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/","og_site_name":"CS\/DS Student Portfolios","article_published_time":"2016-11-08T02:53:27+00:00","author":"Edward Ly","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Edward Ly","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/#article","isPartOf":{"@id":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/"},"author":{"name":"Edward Ly","@id":"https:\/\/portfolios.cs.earlham.edu\/#\/schema\/person\/89af3998f351d29a0ccc69f7311c2aa9"},"headline":"Fun with PortAudio and Next Steps","datePublished":"2016-11-08T02:53:27+00:00","mainEntityOfPage":{"@id":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/"},"wordCount":163,"commentCount":0,"articleSection":["Edward"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/","url":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/","name":"Fun with PortAudio and Next Steps - CS\/DS Student Portfolios","isPartOf":{"@id":"https:\/\/portfolios.cs.earlham.edu\/#website"},"datePublished":"2016-11-08T02:53:27+00:00","author":{"@id":"https:\/\/portfolios.cs.earlham.edu\/#\/schema\/person\/89af3998f351d29a0ccc69f7311c2aa9"},"breadcrumb":{"@id":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/portfolios.cs.earlham.edu\/index.php\/2016\/11\/07\/fun-with-portaudio-and-next-steps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/portfolios.cs.earlham.edu\/"},{"@type":"ListItem","position":2,"name":"Fun with PortAudio and Next Steps"}]},{"@type":"WebSite","@id":"https:\/\/portfolios.cs.earlham.edu\/#website","url":"https:\/\/portfolios.cs.earlham.edu\/","name":"CS\/DS Student Portfolios","description":"AI and ML, Image Classification, Arduino","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/portfolios.cs.earlham.edu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/portfolios.cs.earlham.edu\/#\/schema\/person\/89af3998f351d29a0ccc69f7311c2aa9","name":"Edward Ly","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d2633fa74216d093a8642a5432c44963fd10f677e4cbcc6d935069f9859630ee?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d2633fa74216d093a8642a5432c44963fd10f677e4cbcc6d935069f9859630ee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d2633fa74216d093a8642a5432c44963fd10f677e4cbcc6d935069f9859630ee?s=96&d=mm&r=g","caption":"Edward Ly"},"url":"https:\/\/portfolios.cs.earlham.edu\/index.php\/author\/esly14\/"}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"Edward Ly","author_link":"https:\/\/portfolios.cs.earlham.edu\/index.php\/author\/esly14\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/portfolios.cs.earlham.edu\/index.php\/category\/student\/2016\/edward\/\" rel=\"category tag\">Edward<\/a>","rttpg_excerpt":"Today, I added the ability to change the volume of the sound based on the acceleration value, or how quickly the hand is moved, as well as change the frequency of the sound and thus change the note being played &hellip; Read More","_links":{"self":[{"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/comments?post=500"}],"version-history":[{"count":1,"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/500\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/500\/revisions\/501"}],"wp:attachment":[{"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/media?parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/categories?post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/portfolios.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/tags?post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}