Duke CS Logo CompSci 1: Principles of Computer Science
(Spring 2008)
Home
Course Information
Calendar
Labs
Lab 1
Lab 2
Lab 3
Lab 4
Lab 5
Lab 6
Lab 7
Lab 8
Lab 9
Lab 10
Lab 11
Practice Lab Final
Resources
Project
Discussion Forum
Blackboard
Oasis

Lab 6: Sound Exploration

Reminder: From the prelab:
  1. Enable disk use on your iPod
  2. Bring your iPod, USB cable, microphone, and headphones to lab

Setup

Transferring files from your iPod

Transfer audiofiles from your iPod to the lab machine. Remember where you put all of the files and how you can navigate to them.
Note: If you have trouble getting the sounds off your iPod, then use the provided sound effects and spoken word audio files.

JES

Sound Exploration

Bring up each of your sounds in the SoundExplorer by typing the code below for each sound:

>>> s = makeSound(pickAFile()) >>> openSoundTool(s) This code above
1) creates a new Sound s from selected file. Make sure the file is in Waveform (.wav) audio. format
2) brings up the Sound Tools window -- alternatively, you can use the Sound Tool option in the MediaTools menu in JES

Questions to Answer

Create a text file called lab06.txt. Answer the following questions in that file:
  1. What function returns the number of samples in a particular Sound?
  2. How can you set the media path to your iPod directory?
  3. How do the waveforms for each sound differ?
  4. How do higher pitched sounds vary from lower-pitched ones?
  5. How do quieter sounds look different than louder ones? Does the change in amplitude values accurately reflect your perception of relative loudness?
  6. How does an electronic sound differ from one produced by a voice or instrument?
  7. What happens if you increase a volume too far? Explore by creating a Sound object, then increase the volume repeatedly. Does it always keep getting louder or does something else happen? Why?

Manipulating Sounds

Open up lab06.py and do the following:
  1. Complete decreaseVolume: halve the amplitude of a sound
  2. Complete changeVolume: change the amplitude of a sound by some factor

Submitting

Submit your lab06.py and lab06.txt files on Blackboard under assignment Lab 6.

Transfer any modified sounds back onto your iPod (using the write method in the Sound class), so you can listen to them and check that you did indeed change the volume, for example.

Last updated Sun Apr 27 15:32:05 EDT 2008