Next: Week 2
- Homework: Miscellaneous physical review problems, mass-spring systems
- Reading: Rossing, chapters 1-2
- Introduction to the computer facilities at CCRMA
- Learn how sounds can be recorded to soundfiles on the computer using snd
- Explore time-varying spectral properties of sounds using snd
- Explore simple discrete-time/frequency analysis using Matlab
- Measure the dimensions of the Helmholtz resonator (beer bottle) provided in order to estimate its resonance frequency. The cavity volume can be measured by filling it with water and measuring the liquid volume (1 liter = 0.001 cubic meters). Calculate the theoretical resonance frequency using the formula given in class. Then excite the resonator by blowing across its top and record the resulting sound. Use snd to measure the resonance frequency. How do the values correspond? Is there a better correspondence if the neck length () is modified to take into account an end correction (extra length
, where is the radius of the neck)?
Snd is a sound editor written by Bill Schottstaedt, which also has recording capabilities.
- Start snd by typing snd in a terminal window. A small window with a menu bar will open.
- Open a sound file by using the File->Open menu and choosing the file you want. The path will default to your home directory.
Viewing and Listening to a Soundfile
- When the soundfile opens, you'll see the beginning chunk of the soundfile. You can change your view by dragging the two scrollbars beneath the displayed waveform: the upper bar scrolls through time, and the lower one scales the time axis. The vertical scrollbar on the left side of the window controls the amplitude scaling.
- To play the soundfile you can press the "play" button at the bottom right corner of the window or press Ctrl-q. To stop playing, press Ctrl-t. In order to adjust the volume go to View->Show Controls, and more sliders will open at the bottom of the window. The first of these sliders, labeled "amp", is the volume control (the others are mostly controls for sound effects; don't worry about these for now).
- Often the frequency content of the soundfile gives valuable information. To look at the soundfile spectrum, press the "f" button at the lower left corner of the window. (For a view of both the waveform and the spectrum at the same time, both "w" and "f" need to be activated; for a single view the corresponding button needs to be pressed.)
- There are many different frequency-domain displays available, which you can access under Options->Transform Options. As a rule of thumb, "dB" and "normalize" should be turned on.
- The default display is ``single transform''. To display the frequencies and magnitudes of the first few largest peaks, activate "peaks" in the Transform Options window. Other tools useful for visualization are the "sonogram" and the "spectrogram", which give you a view of frequency content over time.
- Another helpful function might be the verbose cursor, which is activated via View->Verbose Cursor. This will display the coordinate values of wherever you click your mouse on the plot. For example, if you want to know the frequency and amplitude of a peak, you can just click on it with the mouse.
- Be aware that the frequencies that are calculated depend on the region selected in the time domain waveform.
Recording a Soundfile using Snd
- To record a sound into snd, first open up the recording interface under File->Record. It's going to look gigantic because it can record into multiple channels, but the basic task is to just record a mono signal into a single channel. You can adjust the size of the different sections in the recording interface by moving the green squares which lie along the right side of the window.
- Under "Analog In", click on button 1. Under "Line Out", click on button 1. This "turns on" the channels that you'll use. The corresponding VU meters will also be highlighted yellow.
- Type in a file name (e.g., bottle.wav) for your recorded sound in the region next to "file:". Also, make sure the number of channels is set to 1 (value next to "chans:"). The other items should be fine at their default settings: "header" = wave, "data" = short, "srate" = 44100, "buf:" = 1024, and "Analog In" and "Line Out" should be red.
- Plug a microphone into the "Input 1" input at the left of the Omni I/O box next to the computer. Make sure the button above "pad" is in the out position (not pushed in). If the computer you're working on doesn't have this, you can plug a microphone directly into the soundcard at the back of the computer.
- Check your levels in the yellow VU meters so that the sound is loud enough but doesn't clip the meters in either the input or output stage. You can adjust the signal gain using the corresponding sliders below the meters.
- When you're ready to record, press the "Record" button at the bottom of the window. Stop recording by pressing the red "Done" button at the same location.
- Close the recording window by pressing the "Dismiss" button at the botttom left of the window.
There are many more features and functions to snd, so please refer to the manual
to learn more.