|
Overview
In this lab, you will create a C++ project in Microsoft Visual Studio .NET and enter a short program developed by the class. Sound Wave Theory
A musical note is represented by a sine wave at a specific frequency. The table below gives the frequencies of different notes.
Doubling the frequency gives you the same note one octave higher while halving the frequency gives you the same note one octave lower. Procedure
Create a C++ project in Microsoft Visual Studio .NET using this procedure. As a class we will write a program that will produce a data file containing lines of numbers in the following format: 0.0000, 1 0.0001, 0.98 0.0002, 0.975 The first column represents time and the second column represents the voltage to be sent to the computer speakers. This file should end with .csv and will be passed (drag and drop) to a csv2wav program that will convert the file to .wav format. Once in this format, it can sent to the speakers using Windows Media Player or something similar. The csv2wav program is available for download here. I would suggest saving the program on the desktop. Once the class-written program has generated a .csv file, drag and drop it on the csv2wav icon. When done, a .wav with the same name (except the extension) and location as the .csv should be created. You may double-click on the .wav file to listen to it. Lab report (due 11:00pm, the day prior to week 2 lab)
Here is a template file to use as a starting point for this report. Your lab report should be an independent document. That means that someone should be able to understand what you did and why without seeing anything other than your report. Your report should include:
As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the XML help video and/or sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well. Acknowledgment
This laboratory was developed by Dr. Chris Taylor. |
© 2001-2015 Dr. Christopher C. Taylor | Office: CC-36C | Phone: 277-7339 |