User Tools

Site Tools


digital_sound_project
A PCRE internal error occured. This might be caused by a faulty plugin

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

digital_sound_project [2014/05/27 04:41]
wikimanager [Questions about data]
digital_sound_project [2014/06/04 03:53] (current)
wikimanager [Questions about data]
Line 1: Line 1:
 ======Digitizing the sound====== ======Digitizing the sound======
-==By Alisha Harrington, Christopher Hernandez, ​and Aaron Heston==+==By Alisha Harrington, Christopher Hernandez, Aaron Heston, and Samia Maurice==
 ==in collaboration with Prof. Nicholas Kuzma== ==in collaboration with Prof. Nicholas Kuzma==
  
Line 266: Line 266:
   - Okay,I did record a sound. I would like to post it so we can hear it and you can give me suggestions for experimenting with it or with additional sounds. However, when I tried to upload the file I received this message " Upload denied. This file extension is forbidden!"​   - Okay,I did record a sound. I would like to post it so we can hear it and you can give me suggestions for experimenting with it or with additional sounds. However, when I tried to upload the file I received this message " Upload denied. This file extension is forbidden!"​
     * **Answer**: Good job! Sorry I didn't realize you cannot upload igor files to the wiki.  One workaround is to change the extension from pxp to txt, that might work - I am not sure. You can also email me the pxp file as an attachment.     * **Answer**: Good job! Sorry I didn't realize you cannot upload igor files to the wiki.  One workaround is to change the extension from pxp to txt, that might work - I am not sure. You can also email me the pxp file as an attachment.
 +      * I think you are on the right track. You should learn how to zoom in and out on the plot in Igor (by dragging a box with the left button of a mouse and then clicking inside the box) - do it repeatedly until you see the individual oscillations (See figure below). ​ You can zoom all the way out by pressing ''​Ctrl-A''​. Look at the fine details of your plots. ​ ''​Wave2''​ sounds like a piano note - do you have an electric piano or a piano app on your phone? ​ I can also hear a dog barking and people talking outside - all this information is contained in the column of numbers that you recorded - I wonder which digits contain which sound. {{ :​projects:​sound:​clipping.png?​nolink |}}
 +      * Anyways, if you zoom in on the beginning part of wave2, as shown here on the second plot of the same ''​wave2'',​ you will see that the amplitude is unnaturally constant for a while (before it starts dropping off), and the oscillations look more like square waves rather than sine waves. This tells me that your sound was too loud for the range of your recorder - that is, the actual sound was decaying in amplitude all along from the start, but the recorder was pegged at the maximum of what it can record (that is, "​clipping your sound"​) until the sound decayed enough to "​fit"​ into the range of the recorder. Does it make sense? ​  Try to repeat the same recording, but either make the sound quieter, or move the laptop away from the source so that there is some attenuation (or even do what humans do - cover your microphone (if you know which hole it is on the laptop) with a cloth or a towel.)
 +      * Another tool (besides zooming in on the time course of the signal) is to look at the spectrum - this wiki page explains how to do this. For your beautiful piano-like tone, this should give a very nice thin line in the spectrum, if you are not clipping with your recorder. If you are clipping, like in ''​wave2''​ now, the spectrum will have extra stuff - the musicians can tell it's clipping because it sounds more "​metallic"​ or even "​buzzing"​. ​ You can dedicate the entire project to the effect of clipping - compare clipped and not clipped sound (the perceived impression, the time plots, and the spectra).  ​
   - I have collected some initial data and recordings. In my file:   - I have collected some initial data and recordings. In my file:
     * ''​Wave2''​ is a medium volume sound directly adjacent to the microphone.     * ''​Wave2''​ is a medium volume sound directly adjacent to the microphone.
Line 285: Line 288:
 SetAxis bottom 0,​.04</​code> ​ SetAxis bottom 0,​.04</​code> ​
         * This highlights the striking differences in intensity.         * This highlights the striking differences in intensity.
-  - Next question+  ​-  The other thing is I have been looking at Fourier series calculations and have seen the use of integrals when looking at the Fourier coefficients. Should I be concerned about this? 
 +    * **Answer**: there are two kinds of Fourier transforms: [[wp>​Fourier transform|continuous]] (liked by theorists) and [[wp>​Discrete Fourier transform|discrete]] (used in numerical computations). The two kinds are closely related, and in the limit of small grid spacing (small dwell time $\Delta t$) they approximately give the same results. But, the continuous transform uses integrals, whereas the discrete one uses simple sums.  You don't need to worry about this too much, just use it as a tool that already works. When you write about it, just say that it decomposes the time-dependent signal into a linear superposition of pure sine and cosine waves at various frequencies on a frequency grid, and gives you the combined amplitude at each frequency, as a function of the point on the frequency grid.  
 +  - Is there a way to copy and paste the plots from Igor pro into a document or is there another way to display the plots in a document? 
 +    * **Answer**: You can use  
 +      * "​screenshots"​ (will work for any screen content, not just IGOR plots)  
 +        * explained in [[white_noise_project#​software_and_data_analysis|the white noise project, Software and data analysis, Item 10]] <- click on the green link 
 +      * Or, in IGOR, after clicking on your graph, go to the ''​File''​ menu, ''​Save Graphics...''​ submenu, and select  
 +        * the format (PNG or JPEG_ 
 +        * resolution (Other DPI, then 300) 
 +        * file name -- the name of the picture file that IGOR will create for you 
 +        * path (home -- will save in the same directory on your computer where you have saved your .pxp experiment 
 +        * force overwrite -- if you already have that picture file and want to improve it 
 +      * Then just insert the picture file into your report as picture 
 +  ​- Next question ​<-- <color red>//​ask your questions here//</​color>​ 
 + 
 +====Tips and suggestions==== 
 +  - You can simulate clipping by using the following commands (assuming you want to clip ''​wave2''​ that already exists): 
 +    * the function ''​=min(...,​...)''​ returns the smaller of the two arguments 
 +    * the function ''​=max(...,​...)''​ returns the larger of the two arguments 
 +    * before you start, you need to set up your ''​low''​ and ''​high''​ variables fist: <​code>​Wavestats/​Q wave2; print V_min,V_max // this line finds the min and max of wave2 
 +Variable/G clip_perc=80 // this creates a variable for storing the clipping percentage 
 +Variable/G low=clip_perc*V_min/​100,​high=clip_perc*V_max/​100 // sets low and high thresholds for clipping</​code>​ 
 +      * Here the ''​%%//​%%''​ is the "​comment"​ symbol, it tells IGOR to ignore the remainder of the line, allowing you to comment your code 
 +    * now create another wave and combine the ''​min()''​ and ''​max()''​ as ''​max(low,​min(high,​...))'':​ <​code>​Duplicate/​O wave2,​wave2_clipped // create an identical wave2_clipped first 
 +wave2_clipped=max(low,​min(high,​wave2)) // now do the clipping</​code>​ to limit the values in wave2_clipped to be within the [low,high] range 
 +    * you can achieve different levels of clipping by setting ''​clip_perc''​ closer to 0 (more severe clipping) or closer to 100 (more gentle) 
 +    * you can display the clipped wave as a plot, calculate and display its spectrum, and play it to listen how it sounds 
 =====References and Footnotes===== =====References and Footnotes=====
 ====Cited references==== ====Cited references====
digital_sound_project.1401165711.txt.gz · Last modified: 2014/05/27 04:41 by wikimanager