{"id":214,"date":"2019-04-16T22:10:07","date_gmt":"2019-04-16T22:10:07","guid":{"rendered":"http:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/?p=214"},"modified":"2019-04-23T15:27:50","modified_gmt":"2019-04-23T15:27:50","slug":"debugging-and-clean-up","status":"publish","type":"post","link":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/2019\/04\/16\/debugging-and-clean-up\/","title":{"rendered":"Debugging and clean-up"},"content":{"rendered":"\n<p style=\"font-size:15px\">In this final phase of the project, my first port of call is to ensure all the abstractions work when samples of differing lengths are loaded. There is an issue in the main window and its pfft~ &#8216;stftmatrix_fill&#8217; where the &#8216;play~&#8217; object which plays the sample does not start at the same time as the matrix was being filled with DSTFT data. This meant that there would be a blank gap at the beginning of matrix (which was a slightly different size every time the matrix fill operation would be repeated). I found the solution to this to be to delay the initialising of the matrix record by 100 milliseconds after the &#8216;play~&#8217; object plays the audio sample.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"512\" src=\"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-11-1024x512.png\" alt=\"\" class=\"wp-image-216\" srcset=\"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-11-1024x512.png 1024w, https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-11-300x150.png 300w, https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-11-768x384.png 768w, https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-11-1568x784.png 1568w, https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-11.png 1764w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Logarithmic spectrogram of the matrix where horizontal sync was not matched (notice the blank spot to the left of each image)<\/figcaption><\/figure>\n\n\n\n<p style=\"font-size:15px\">Blur_water with custom masks is running very slowly.<br>Time_scramble custom masks also running very slowly. I have fixed these solutions by decreasing the rate at which the spectral effects refresh.<br><\/p>\n\n\n\n<p style=\"font-size:15px\">Due to extremely variable loading times for Max\u2019s MSP to initialise, I am going to give the user the option to manually loadbang in each patch. Going through every patch ensuring the @windowposition on the jit.world\/ jit.window object is correct.<\/p>\n\n\n\n<p style=\"font-size:15px\">&#8216;logarithmic_spectrogram&#8217; and mask_draw were not working on other computers, I realised this is because connecting the two \u2018uzi\u2019 objects in tandem means the system has to perform millions of operations in a fraction of a second, I am investigating whether filling a 1&#215;1024 matrix with logarithmically scaled data, and then stretching that to frame number is an option. This doesn\u2019t work as the matrix ends up horizontally stretched. Below is the structured that I have implemented as a solution to this. A &#8216;counter&#8217; object is much less intense on the CPU than the previous &#8216;uzi&#8217; object.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"937\" src=\"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-13-1024x937.png\" alt=\"\" class=\"wp-image-434\" srcset=\"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-13-1024x937.png 1024w, https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-13-300x275.png 300w, https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-13-768x703.png 768w, https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/files\/2019\/04\/image-13.png 1230w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>New &#8216;logarithmic_mapping&#8217; abstraction where a &#8216;counter&#8217; object is used at the top instead of an &#8216;uzi&#8217;<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this final phase of the project, my first port of call is to ensure all the abstractions work when samples of differing lengths are loaded. There is an issue in the main window and its pfft~ &#8216;stftmatrix_fill&#8217; where the &#8216;play~&#8217; object which plays the sample does not start at the same time as the [&hellip;]<\/p>\n","protected":false},"author":225,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/posts\/214"}],"collection":[{"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/users\/225"}],"replies":[{"embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":18,"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/posts\/214\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digital.eca.ed.ac.uk\/spectral-manipulation\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}