{"id":135,"date":"2023-02-25T19:19:39","date_gmt":"2023-02-25T19:19:39","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/?p=135"},"modified":"2023-02-25T19:21:34","modified_gmt":"2023-02-25T19:21:34","slug":"adityas-status-report-2-25","status":"publish","type":"post","link":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/2023\/02\/25\/adityas-status-report-2-25\/","title":{"rendered":"Aditya&#8217;s Status Report 2\/25"},"content":{"rendered":"<p>My work this week primarily focused on the Software area of our project. I worked within the django app to design a method of outputting a list of notes detected within a time signal.<\/p>\n<p>The initial method involved examining a segment of N-frames, where N is one-quarter of the sample rate at a time. Copied the samples in the segment to their own array, then ran the scipy method fft() on it. However, this posed a problem bc the different size of the segment resulted in a less accurate output in the frequency domain.<\/p>\n<p>I changed my process. Instead of creating an array the size of only one segment, I copied the entire time-signal then multiplied it by a box window, so that every sample is 0 outside of the desired time range. This had the same accuracy of frequency that analyzing the entire signal at once would do. The code below is the output for<\/p>\n<p>One major error that&#8217;s put me behind schedule is that the size of the window results in capturing portions of the signal with differing frequencies. This results in the calculated fundamental frequency being a note between the two actual notes played: for example, an F# is detected at the border between the F and G notes of the C scale. I plan to make up for this by attempting to use Alejandro&#8217;s progress with the rhythm processor. I will try to determine how the pulse-detection algorithm can be applied to the frequency processor to prevent it from calculating the FFT at the points in the signal where a new pulse is detected. As integrating the processors was already part of the plan for next week, it won&#8217;t be a serious deviation from the schedule.<\/p>\n<pre>&gt;&gt;&gt; from audio_to_freq import *\r\n&gt;&gt;&gt; getNoteList('')\r\n[2030]\r\nNote detected at [261.41826923]\r\nC\r\n[2030]\r\nNote detected at [261.41826923]\r\nC\r\n[2030]\r\nNote detected at [261.41826923]\r\nC\r\n[2030]\r\nNote detected at [261.41826923]\r\nC\r\n[2030]\r\nNote detected at [261.41826923]\r\nC\r\n[2278]\r\nNote detected at [293.35508242]\r\nD\r\n[2278]\r\nNote detected at [293.35508242]\r\nD\r\n[2278]\r\nNote detected at [293.35508242]\r\nD\r\n[2567]\r\nNote detected at [330.57177198]\r\nF\r\n[2544]\r\nNote detected at [327.60989011]\r\nE\r\n[2566]\r\nNote detected at [330.44299451]\r\nF\r\n[2562]\r\nNote detected at [329.92788462]\r\nF\r\n[2713]\r\nNote detected at [349.37328297]\r\nF#\r\n[2713]\r\nNote detected at [349.37328297]\r\nF#\r\n[2710]\r\nNote detected at [348.98695055]\r\nF\r\n[2716]\r\nNote detected at [349.75961538]\r\nF#\r\n[3048]\r\nNote detected at [392.51373626]\r\nG#\r\n[3040]\r\nNote detected at [391.48351648]\r\nG\r\n[3049]\r\nNote detected at [392.64251374]\r\nG#\r\n[3039]\r\nNote detected at [391.35473901]\r\nG\r\n[3045]\r\nNote detected at [392.12740385]\r\nG#\r\n['C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'F', 'E', 'F', 'F', 'F#', 'F#', 'F', 'F#', 'G#', 'G', 'G#', 'G', 'G#']\r\n\r\n\r\n<\/pre>\n<p>This is an example of how the signal is modified to detect the frequency at a given point. The note detected is a middle C.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-136\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-content\/uploads\/sites\/253\/2023\/02\/SegmentSignalTest-300x233.jpg\" alt=\"\" width=\"300\" height=\"233\" srcset=\"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-content\/uploads\/sites\/253\/2023\/02\/SegmentSignalTest-300x233.jpg 300w, https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-content\/uploads\/sites\/253\/2023\/02\/SegmentSignalTest-768x598.jpg 768w, https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-content\/uploads\/sites\/253\/2023\/02\/SegmentSignalTest-1024x797.jpg 1024w, https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-content\/uploads\/sites\/253\/2023\/02\/SegmentSignalTest.jpg 1158w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My work this week primarily focused on the Software area of our project. I worked within the django app to design a method of outputting a list of notes detected within a time signal. The initial method involved examining a segment of N-frames, where N is one-quarter of the sample rate at a time. Copied &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/2023\/02\/25\/adityas-status-report-2-25\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Aditya&#8217;s Status Report 2\/25&#8221;<\/span><\/a><\/p>\n","protected":false},"author":712,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[4],"_links":{"self":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/posts\/135"}],"collection":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/users\/712"}],"replies":[{"embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":2,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/posts\/135\/revisions\/138"}],"wp:attachment":[{"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamd8\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}