{"id":90,"date":"2023-02-19T03:37:56","date_gmt":"2023-02-19T03:37:56","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/?p=90"},"modified":"2023-02-19T05:17:02","modified_gmt":"2023-02-19T05:17:02","slug":"oscars-status-report-for-2-18","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/2023\/02\/19\/oscars-status-report-for-2-18\/","title":{"rendered":"Oscar&#8217;s Status Report for Feb 18"},"content":{"rendered":"<ul>\n<li>What did you personally accomplish this week on the project? Give files or<br \/>\nphotos that demonstrate your progress.<\/li>\n<\/ul>\n<p>This week I continued to improve on the <a href=\"https:\/\/codefile.io\/f\/jVZGTTBQmTRBCEwffBg2\">oscillator program<\/a> I wrote last week so that it supports mouse-controlled real-time playing. When run, pyautogui will first get the cursor position. If the cursor is on the left side of the screen, the program plays a C4 indefinitely. If the cursor is on the right, the program plays a E4 indefinitely. Here is a short <a href=\"https:\/\/youtu.be\/GxFPV0mgCcU\">demonstration video<\/a> of it working.<\/p>\n<p>I spent quite a lot of time fixing the &#8220;snaps&#8221; when looping clips of a frequency. First I thought it can be fixed by trimming the generated frequency array so that the difference between the first element and the last is relatively small. However, the snap only got a little bit better. I then realized I have to reduce the software overhead (actual gap in time) of repeating a frequency array, so I tried to find a python library that supports looping with the lowest overhead. I have tried packages like pyaudio, simpleaudio, and pymusiclooper. However, since most of these libraries loop a wavfile on an infinite loop, the gap between each repeat is still noticeable. In the end, I used a library called sounddevice that implements looping using callbacks, and since there is virtually no gap between repeats, looping is now unnoticeable.<\/p>\n<ul>\n<li>Is your progress on schedule or behind? If you are behind, what actions will be<br \/>\ntaken to catch up to the project schedule.<\/li>\n<\/ul>\n<p>I think my progress is on schedule. However, using an existing synthesizer software is always a back up plan. In that case, I only need to figure out how to change parameters through my own program instead of its GUI.<\/p>\n<ul>\n<li>What deliverables do you hope to complete in the next week?<\/li>\n<\/ul>\n<p>I plan to add two more functionality to my oscillator program: real-time cursor-based volume control, and real-time vibrato. I plan to implement the vibrato using a envelope that performs amplitude modulation on the generated frequency array.<\/p>\n<ul>\n<li>Particular ECE courses that covered the &#8220;keep it simple&#8221; principle<\/li>\n<\/ul>\n<p>The most important thing I learned last week was to keep everything simple. After experimenting with looping frequency arrays, I found that the library that works the best are the ones that have the fewest lines of code to write. I don&#8217;t remember classes that explicitly covered this principle, but it is a theme in most programming courses like 18-213(i.e. keep your code short and simple).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. This week I continued to improve on the oscillator program I wrote last week so that it supports mouse-controlled real-time playing. When run, pyautogui will first get the cursor position. If the cursor is on the left &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/2023\/02\/19\/oscars-status-report-for-2-18\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Oscar&#8217;s Status Report for Feb 18&#8221;<\/span><\/a><\/p>\n","protected":false},"author":669,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[7],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/posts\/90"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/users\/669"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":8,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":117,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/posts\/90\/revisions\/117"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd1\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}