-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCOMP371ProjectReport.html
1 lines (1 loc) · 11.5 KB
/
COMP371ProjectReport.html
1
<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><style type="text/css">.lst-kix_s3yc9s9wxerz-0>li:before{content:"\0025cf "}.lst-kix_rnj2gybwmon8-8>li:before{content:"- "}.lst-kix_rnj2gybwmon8-7>li:before{content:"- "}.lst-kix_s3yc9s9wxerz-5>li:before{content:"\0025a0 "}ul.lst-kix_s3yc9s9wxerz-8{list-style-type:none}.lst-kix_s3yc9s9wxerz-4>li:before{content:"\0025cb "}.lst-kix_s3yc9s9wxerz-6>li:before{content:"\0025cf "}ul.lst-kix_s3yc9s9wxerz-7{list-style-type:none}ul.lst-kix_s3yc9s9wxerz-6{list-style-type:none}ul.lst-kix_s3yc9s9wxerz-5{list-style-type:none}ul.lst-kix_s3yc9s9wxerz-4{list-style-type:none}ul.lst-kix_s3yc9s9wxerz-3{list-style-type:none}ul.lst-kix_s3yc9s9wxerz-2{list-style-type:none}.lst-kix_s3yc9s9wxerz-1>li:before{content:"\0025cb "}ul.lst-kix_s3yc9s9wxerz-1{list-style-type:none}ul.lst-kix_s3yc9s9wxerz-0{list-style-type:none}.lst-kix_s3yc9s9wxerz-2>li:before{content:"\0025a0 "}.lst-kix_s3yc9s9wxerz-3>li:before{content:"\0025cf "}ul.lst-kix_rbtph3albyle-8{list-style-type:none}ul.lst-kix_rbtph3albyle-7{list-style-type:none}ul.lst-kix_rbtph3albyle-2{list-style-type:none}ul.lst-kix_rbtph3albyle-1{list-style-type:none}ul.lst-kix_rbtph3albyle-0{list-style-type:none}.lst-kix_s3yc9s9wxerz-8>li:before{content:"\0025a0 "}.lst-kix_rnj2gybwmon8-0>li:before{content:"- "}ul.lst-kix_rbtph3albyle-6{list-style-type:none}.lst-kix_s3yc9s9wxerz-7>li:before{content:"\0025cb "}ul.lst-kix_1znba4153i5g-6{list-style-type:none}ul.lst-kix_rbtph3albyle-5{list-style-type:none}ul.lst-kix_1znba4153i5g-5{list-style-type:none}ul.lst-kix_rbtph3albyle-4{list-style-type:none}ul.lst-kix_1znba4153i5g-8{list-style-type:none}ul.lst-kix_rbtph3albyle-3{list-style-type:none}ul.lst-kix_1znba4153i5g-7{list-style-type:none}.lst-kix_rnj2gybwmon8-5>li:before{content:"- "}.lst-kix_rnj2gybwmon8-4>li:before{content:"- "}.lst-kix_rnj2gybwmon8-6>li:before{content:"- "}.lst-kix_1znba4153i5g-2>li:before{content:"\0025a0 "}.lst-kix_1znba4153i5g-1>li:before{content:"\0025cb "}.lst-kix_rnj2gybwmon8-1>li:before{content:"- "}.lst-kix_rnj2gybwmon8-2>li:before{content:"- "}.lst-kix_1znba4153i5g-0>li:before{content:"\0025cf "}.lst-kix_rnj2gybwmon8-3>li:before{content:"- "}.lst-kix_1znba4153i5g-8>li:before{content:"\0025a0 "}.lst-kix_rbtph3albyle-0>li:before{content:"- "}.lst-kix_rbtph3albyle-1>li:before{content:"- "}.lst-kix_rbtph3albyle-2>li:before{content:"- "}.lst-kix_1znba4153i5g-3>li:before{content:"\0025cf "}ul.lst-kix_1znba4153i5g-2{list-style-type:none}.lst-kix_rbtph3albyle-5>li:before{content:"- "}.lst-kix_rbtph3albyle-6>li:before{content:"- "}ul.lst-kix_1znba4153i5g-1{list-style-type:none}ul.lst-kix_1znba4153i5g-4{list-style-type:none}ul.lst-kix_1znba4153i5g-3{list-style-type:none}.lst-kix_1znba4153i5g-4>li:before{content:"\0025cb "}.lst-kix_rbtph3albyle-3>li:before{content:"- "}.lst-kix_rbtph3albyle-4>li:before{content:"- "}.lst-kix_rbtph3albyle-7>li:before{content:"- "}.lst-kix_rbtph3albyle-8>li:before{content:"- "}ul.lst-kix_1znba4153i5g-0{list-style-type:none}.lst-kix_1znba4153i5g-5>li:before{content:"\0025a0 "}.lst-kix_1znba4153i5g-6>li:before{content:"\0025cf "}.lst-kix_1znba4153i5g-7>li:before{content:"\0025cb "}ul.lst-kix_rnj2gybwmon8-1{list-style-type:none}ul.lst-kix_rnj2gybwmon8-0{list-style-type:none}ul.lst-kix_rnj2gybwmon8-8{list-style-type:none}ul.lst-kix_rnj2gybwmon8-7{list-style-type:none}ul.lst-kix_rnj2gybwmon8-6{list-style-type:none}ul.lst-kix_rnj2gybwmon8-5{list-style-type:none}ul.lst-kix_rnj2gybwmon8-4{list-style-type:none}li.li-bullet-0:before{margin-left:-18pt;white-space:nowrap;display:inline-block;min-width:18pt}ul.lst-kix_rnj2gybwmon8-3{list-style-type:none}ul.lst-kix_rnj2gybwmon8-2{list-style-type:none}ol{margin:0;padding:0}table td,table th{padding:0}.c9{padding-top:20pt;padding-bottom:6pt;line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}.c6{padding-top:0pt;padding-bottom:3pt;line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}.c0{padding-top:0pt;padding-bottom:0pt;line-height:1.15;orphans:2;widows:2;text-align:left}.c13{color:#000000;text-decoration:none;vertical-align:baseline;font-size:26pt;font-style:normal}.c11{color:#000000;text-decoration:none;vertical-align:baseline;font-size:20pt;font-style:normal}.c3{color:#000000;text-decoration:none;vertical-align:baseline;font-size:11pt;font-style:normal}.c1{font-family:"Arial";font-style:italic;font-weight:400}.c12{background-color:#ffffff;max-width:451.4pt;padding:72pt 72pt 72pt 72pt}.c10{font-weight:400;font-family:"Times New Roman"}.c2{font-weight:400;font-family:"Arial"}.c4{margin-left:36pt;padding-left:0pt}.c7{padding:0;margin:0}.c5{text-indent:36pt}.c8{height:11pt}.c14{margin-left:36pt}.title{padding-top:0pt;color:#000000;font-size:26pt;padding-bottom:3pt;font-family:"Times New Roman";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}.subtitle{padding-top:0pt;color:#666666;font-size:15pt;padding-bottom:16pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}li{color:#000000;font-size:11pt;font-family:"Times New Roman"}p{margin:0;color:#000000;font-size:11pt;font-family:"Times New Roman"}h1{padding-top:20pt;color:#000000;font-size:20pt;padding-bottom:6pt;font-family:"Times New Roman";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h2{padding-top:18pt;color:#000000;font-size:16pt;padding-bottom:6pt;font-family:"Times New Roman";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h3{padding-top:0pt;color:#000000;font-size:11pt;padding-bottom:0pt;font-family:"Courier New";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h4{padding-top:14pt;color:#666666;font-size:12pt;padding-bottom:4pt;font-family:"Times New Roman";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h5{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"Times New Roman";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h6{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"Times New Roman";line-height:1.15;page-break-after:avoid;font-style:italic;orphans:2;widows:2;text-align:left}</style></head><body class="c12 doc-content"><div><p class="c0"><span class="c3 c10">COMP371 - Winter 2023</span></p><p class="c0"><span class="c3 c10">Adrien Tremblay - 40108982</span></p></div><p class="c6 title" id="h.grs0lzfc72kh"><span class="c2 c13">Project Report - 3D OpenGL Audio Visualizer</span></p><h1 class="c9" id="h.kd9u7vqld7m8"><span class="c11 c2">Description</span></h1><p class="c0 c5"><span class="c3 c2">The project I chose to undertake this class was to create an “Audio Spectrum Visualizer”. The application reads the data from an audio source and then generates a visualization in OpenGL. The raw data is not used to directly drive the graphic visualization. Instead, the audio data is analyzed/processed in order to extract the amplitude (loudness) of the individual frequencies (notes) that make up the audio.</span></p><p class="c0"><span class="c3 c2"> Once the frequency data is extracted, there are an infinite ways to visualize this information. The typical visualization is as a series of bars, where each bar represents a range of different frequencies, and the height of the bar indicates the combined amplitude of the frequencies in the range. This type of 2D visualization is one of the three different types of visualizations I wanted to implement.</span></p><p class="c0"><span class="c3 c2"> The second visualization is exactly the same as the first one but three dimensional. Instead of rendering flat bars, I wanted to render cuboids.</span></p><p class="c0"><span class="c3 c2"> The third visualization was to render an imported model, and to move the vertices around depending on the frequency amplitudes.</span></p><p class="c0"><span class="c3 c2"> To meet the requirement of the application being interactive, I planned to add in GUI controls to different application variables that would affect the render.</span></p><h1 class="c9" id="h.kd3cpg88saai"><span class="c11 c2">Objectives</span></h1><ul class="c7 lst-kix_s3yc9s9wxerz-0 start"><li class="c0 c4 li-bullet-0"><span class="c2 c3">Audio Capture</span></li><li class="c0 c4 li-bullet-0"><span class="c3 c2">Audio Processing / Analysis</span></li><li class="c0 c4 li-bullet-0"><span class="c3 c2">2D Visualization - Frequency Graph / Wave</span></li><li class="c0 c4 li-bullet-0"><span class="c3 c2">3D Visualization - Frequency Soundscape</span></li><li class="c0 c4 li-bullet-0"><span class="c3 c2">3D Model Visualization</span></li></ul><p class="c0 c8 c14"><span class="c3 c2"></span></p><p class="c0"><span class="c1">See the Project Proposal for more detail on the objectives</span></p><h1 class="c9" id="h.c9dzslun3lbp"><span class="c2 c11">Results</span></h1><p class="c0 c5"><span class="c3 c10">The final result was great. I managed to complete all five objects and all three different types of visualization. The only thing I was not able to do which I wanted was to have my application visualize audio from the computer’s line-out. It was a lot simpler to have the application read an audio file, because the entire audio recording data can be loaded in memory.</span></p><p class="c0 c5"><span>The visualization looks very cool in my opinion. It looks better than I expected. I was additionally also able to implement basic Phong shading which was not part of my intended project requirements. Additionally beside the functionality to change the number of bars rendered and switch between visualization types, I also added controls to spin the visualization, rotate the camera, and change the spin and rotate angles. Another thing I implemented was a circular bar layout which looks very nice; Instead of positioning the bars in a straight line, they are positioned in a circle.</span></p><h1 class="c9" id="h.du4ln61j7oiv"><span class="c11 c2">Discussion</span></h1><p class="c0 c8"><span class="c3 c2"></span></p><p class="c0 c5"><span class="c3 c2">Overall, the project went extremely well. I feel like my code’s architecture is not the best (a lot of the code is directly in the main function of the main.cpp file). However, I wrote my code to be quite optimal performance wise. What surprised me was how hard it was to do the signal processing part. I had to spend a lot of time doing research into the theory of signal processing and playing around with the FFTW library to finally get the result I wanted. Another big time suck was playing around with different libraries. For example, my first choice of a GUI library was ImGui, but after a lot of work I was not able to get it to function with my project because of unresolved bugs with the library to integrate it with SFML.</span></p><p class="c0 c5"><span class="c2">I think the result I produced for the scope of a class project is amazing, but If I had more time I would do the following; Firstly, I would improve the code that does the signal processing to get the frequency amplitudes to give more conservative values so that the height of the bars didn’t vary so much. Secondly I would add more controls in the GUI, a lot of variables are hard coded constants that can’t change. I would also add an option for the user to select different audio files in the application. A final touch that would have been cool would be to add particle or lighting effects.</span></p><p class="c0 c8"><span class="c3 c2"></span></p></body></html>