EngE_1104_Spring_2007_Lab_7_Students_Copy_V1A_TW -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Explorations Of Our Digital Future Spring 2007 Lab 7: Introduction to Digital Audio Copyrighter by: Jeremy Garrett and Tom Walker, Nov. 2006 – Jan. 2007 Lab Warm-Up: Please see the “Lab 1 Warm-Up Worksheet.” Objective: To create sound waves from digital signals, in order to better understand the inner workings of digital audio equipment (while reviewing the way sine and cosine work as well as reviewing how nested equations work). Overview: As mentioned in the course syllabus, the lab half of this course will focus on digital audio, digital photography, storage, encryption, and networking. What the course syllabus doesn’t say is that the underlying goal is to build self-confidence while having fun, demystifying computers, and preparing students for their future jobs and future courses. In this particular lab we will begin our exploration of how computers (and MIDI devices) can use simple sine() and cosine() functions to create more complicated functions and to create complicated sounds. In order to do that, we will both graph and listen to a variety of functions that have been made from sine() and cosine() functions. Then we will finish by creating our own unique “weird” function, guessing what it will look and sound like, and testing our hypothesis. Part 1 – Creating a Simple Signal (both a plot and a sound) in MatLab: Part 1 – Background: In this section we will begin by simply plotting, and then listening to a simple sine wave. In the next section, we will repeat the steps used hear in order to observe how certain modifications affect the resulting plots and resulting sounds. Part 1 – Procedure: Using MATLAB, perform the following tasks: Create a variable called “SR” that equals 40,000 (Forty thousand, not four thousand) For example: SR = 40000; “SR” stands for “Sample Rate,” and will control how many data points (or samples) the computers will use during each second. Please note that MatLab, like most computer languages, is “case sensitive” so it will treat a variable with a capital letter as a different variable than one with a lower case letter.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Create a new variable called “SL” that equals 1.0 divided by SR. For example: SL = 1.0 / SR; In this case, “SL” stands for “Sample Length” and is the length of time that goes with each data point, or each sample. Create an array called “time” that starts at zero, increases in steps of SL (sample length), and stops after 100 steps in time, by typing in: time = 0 : SL : 100*SL; The “ 0 ” at the beginning tells MatLab where we want our list of numbers to begin. The “ SL ” in the middle tells it what step size to take, and the last piece tells it where to stop the list, which in this case is 100*SL.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 9

EngE_1104_Spring_2007_Lab_7_Students_Copy_V1A_TW -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online