Question: Question 4 : Sound Synthesis [ 3 0 marks ] Square waves ( they only have 2 states ) . We can also create audio
Question : Sound Synthesis marks
Square waves they only have states We can also create audio forms with square waves. Like any periodic waveform, square waves will have an amplitude and frequency. In WAVE files, this square wave can be represented using the minimum and maximum values of bit depth, ie in a WAVE file with a bit depth of high states will be represented with the number and low states will be represented with the number Write a MIPS program, called questionasm, that will generate square waves. You will need to obtain, from the user in this order are particularly useful in electronics as they can represent low and high states, the full output file name the entire path the tone frequency how many times a wave period will appear within a second, an integer the sample frequency how many sound samples will be measured in a second, an integer and the length of the tone an integer in seconds
Your output file should have channel only and a bit depth of You should ignore the contents of the header: set all bytes of the header to Your tone should always start with the high state. You may assume that the tone frequency, sample frequency and length will be such that there will always be an even number of samples per wave period.
Sample Console Input:
homelynnDocumentsCSCSassignqtout.wav
# tone frequency
# sample frequency
# length of the tone
Sample File Output The Canonical WAVE file format:
:
:
: ff f ff f
: ff f ff f ff f
: ff f ff f ff f ff f ff f
:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
