{"id":38,"date":"2018-05-09T23:05:11","date_gmt":"2018-05-10T03:05:11","guid":{"rendered":"https:\/\/blogs.harvard.edu\/wavepainter\/?p=38"},"modified":"2018-05-09T23:05:11","modified_gmt":"2018-05-10T03:05:11","slug":"update-592018","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/2018\/05\/09\/update-592018\/","title":{"rendered":"Update 5\/9\/2018"},"content":{"rendered":"<p>Today was the first chance I&#8217;ve had to work on this project for a while, but I made a fair amount of progress.<\/p>\n<p>Up to this point I had just been experimenting with JACK applications on my desktop computer, but today I installed an OS on my Raspberry Pi and got my development environment set up. After a little bit of configuration, I had a JACK server running and producing sound. To my surprise, MIDI input worked out of the box, and I was able to run my <code>wavetable.c<\/code> test program. I was also happy to find that input latency is definitely acceptable, and much better than I expected. The MIDI keyboard feels responsive enough to play comfortably, although the Pi sometimes has trouble processing MIDI events fast enough, resulting in events being dropped.<\/p>\n<p>I modified my <code>wavetable.c<\/code> test program to change its wavetable based on input from standard in. I then wrote <code>sendwaves.c<\/code>, which allows the user to select one of five waveforms, which it then calculates a table for and writes to standard out. I can then run these programs with <code>.\/sendwaves | .\/synth<\/code>, which allows real-time waveform selection for the synth. These programs are in the code repository on <a href=\"https:\/\/github.com\/davjgardner\/wavepainter\">Github.<\/a><\/p>\n<p>I then switched over to the GUI side, and wrote up a quick Java program to accept wave drawings. It has a canvas which reads mouse input, and a button to write the data to standard out. I piped its output to the synth in the same way as the <code>sendwaves<\/code> program. This works pretty well &#8211; the basic concept is there, but there is still room for improvement in sound quality. I plan to add some smoothing and interpolation to the user input to make more pure waveforms possible.<\/p>\n<p>At this point I have a working prototype of the project running on my desktop computer. My next step will be to set up the Raspberry Pi touchscreen and get the application running there. Finally, I will work to improve sound quality by adding a smoothing function to the input. I could also improve quality by increasing the number of samples and the size of samples &#8211; currently each sample is 1 byte, but I could bump this up to 4 bytes without much trouble.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today was the first chance I&#8217;ve had to work on this project for a while, but I made a fair amount of progress. Up to this point I had just been experimenting with JACK applications on my desktop computer, but today I installed an OS on my Raspberry Pi and got my development environment set <a class=\"read-more\" href=\"https:\/\/archive.blogs.harvard.edu\/wavepainter\/2018\/05\/09\/update-592018\/\">Read More<\/a><\/p>\n","protected":false},"author":9581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[909],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-updates"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p9QzGt-C","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/users\/9581"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":1,"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/posts\/38\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/wavepainter\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}