Lab 2 (15 points) Additive synthesis: The sum of K sinusoids, can be expressed as K-1...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Lab 2 (15 points) Additive synthesis: The sum of K sinusoids, can be expressed as K-1 K-1 y(t) = Yk (t) = Ak cos(2xt + k) k=0 k=0 where Ak, fk, and k are the peak amplitude, frequency (Hz), and initial phase (rad) of the kth sinusoidal component of frequency fk. K is the total number of sinusoidal components. Creating such a sum of sinusoids is known as additive synthesis. a) Write a function that generates N samples of a sinusoid knowing its amplitude, A, frequency, f, phase, phi, given the sampling rate, Fs. Use this function to create, plot (only 0.01 s), and listen to one-second-long, unit-amplitude, zero-phase, 440 Hz cosine wave sampled at 44100 Hz. b) Write a function that uses the function above to generate the sum of K sinusoids. This function should take lists/vectors of amplitudes, frequencies, and phases (each of the same length) as well as the number of samples and the sampling rate and should return the sum of the sinusoids. Use your function to create the sum of K = 5 sinusoids with frequencies fk = [220, 660, 1100, 1540, 1980] and amplitudes Ak = [1, 1/3, 1/5, 1/7, 1/9], all with zero phase. Use a sampling rate of 44.1kHz and return a one-second segment. Plot (only 0.01 s) and listen to it. How does it sound? What waveform does this approximate? c) Use the functions above to create a signal that is comprised of each of the sinusoids from b) (starting with 220Hz) presented in a sequence 1 second long and added to the previous sinusoid (e.g., 220Hz for 1 second, then add the 660Hz sinusoid for 1 second, ..., finally add the 1980 Hz sinusoid for 1 second). Plot (full duration) and listen to it. Plot at t = [0.1, 1.1, 2.1, 3.1, 4.1] seconds for 0.02 s. How does the signal evolve through time? How does it sound? d) Generate the same waveform as in b) but with randomized phase. Does it sound the same as b)? Does it look the same? Lab 2 (15 points) Additive synthesis: The sum of K sinusoids, can be expressed as K-1 K-1 y(t) = Yk (t) = Ak cos(2xt + k) k=0 k=0 where Ak, fk, and k are the peak amplitude, frequency (Hz), and initial phase (rad) of the kth sinusoidal component of frequency fk. K is the total number of sinusoidal components. Creating such a sum of sinusoids is known as additive synthesis. a) Write a function that generates N samples of a sinusoid knowing its amplitude, A, frequency, f, phase, phi, given the sampling rate, Fs. Use this function to create, plot (only 0.01 s), and listen to one-second-long, unit-amplitude, zero-phase, 440 Hz cosine wave sampled at 44100 Hz. b) Write a function that uses the function above to generate the sum of K sinusoids. This function should take lists/vectors of amplitudes, frequencies, and phases (each of the same length) as well as the number of samples and the sampling rate and should return the sum of the sinusoids. Use your function to create the sum of K = 5 sinusoids with frequencies fk = [220, 660, 1100, 1540, 1980] and amplitudes Ak = [1, 1/3, 1/5, 1/7, 1/9], all with zero phase. Use a sampling rate of 44.1kHz and return a one-second segment. Plot (only 0.01 s) and listen to it. How does it sound? What waveform does this approximate? c) Use the functions above to create a signal that is comprised of each of the sinusoids from b) (starting with 220Hz) presented in a sequence 1 second long and added to the previous sinusoid (e.g., 220Hz for 1 second, then add the 660Hz sinusoid for 1 second, ..., finally add the 1980 Hz sinusoid for 1 second). Plot (full duration) and listen to it. Plot at t = [0.1, 1.1, 2.1, 3.1, 4.1] seconds for 0.02 s. How does the signal evolve through time? How does it sound? d) Generate the same waveform as in b) but with randomized phase. Does it sound the same as b)? Does it look the same?
Expert Answer:
Related Book For
Data Analysis and Decision Making
ISBN: 978-0538476126
4th edition
Authors: Christian Albright, Wayne Winston, Christopher Zappe
Posted Date:
Students also viewed these programming questions
-
Streamlined Electronic Center began October with 80 units of merchandise inventory that cost $57 each. During October, the store made the following purchases: Streamlined Electronic Center uses the...
-
QUIZ... Let D be a poset and let f : D D be a monotone function. (i) Give the definition of the least pre-fixed point, fix (f), of f. Show that fix (f) is a fixed point of f. [5 marks] (ii) Show that...
-
Analyzing Revenues and Expenses and Completing an Income Statement Neighborhood Realty, Incorporated, has been operating for three years and is owned by three investors. S. Bhojraj owns 60 percent of...
-
Eastern Railroad has a dividend reinvestment program for shareholders. Over the past five years, the company has had the following share prices and the following dividends. If you started with 100...
-
Balance each of the following oxidation reduction reactions by using the oxidation states method. a. C2H6(g) + O2(g) CO2(g) + H2O(g) b. Mg(s) + HCl(aq) Mg2+(aq) + Cl2(aq) + H2(g) c. Cu(s) + Ag+(aq)...
-
How can you ensure that a pattern provides the correct solution for your problem?
-
On January 1, 2008, Ameen Company purchased a building for $36 million. Ameen uses straight-line depreciation for financial statement reporting and MACRS for income tax reporting. At December 31,...
-
What measures can be implemented to address the growing cybersecurity threats targeting supply chain infrastructure, safeguarding critical assets and sensitive information against data breaches and...
-
Consider a coal plant with the following characteristics: Capital cost of $3300 per kW CCF of 0.13 FOM costs of $103 per kW-year Fuel costs of $1.07 per GJ Utilization of 72% (about 6312 hours per...
-
Part A. Enter the name of the Arrhenius acid that contains the fluoride anion. Enter the name of the acid. Spelling counts! acid Part B Enter the name of the Arrhenius acid that contains the...
-
Find each limit in Problems 11-18, if it exists. \(\lim _{n ightarrow \infty} \frac{8,000}{n-1}\)
-
Consider the sequence \(3,3.1,3.14,3.141,3.1415,3.14159\), \(3.141592, \cdots\). What do you think is the appropriate limit of this sequence?
-
Find the antiderivative by using areas in Problems 9-22. \(\int 6 d x \)
-
Evaluate the area function for the functions given in Problems 1-8. Let \(y=3 x+2\); find \(A(3)\).
-
Find each limit in Problems 11-18, if it exists. \(\lim _{n ightarrow \infty} \frac{n}{n-5,000}\)
-
When William Sheltons carpet business was swept away due to a fire, he got a first-hand, crash course in restoring the building to its original state. His friends and family could not believe how...
-
Explain the term global capital markets. This chapter primarily discusses global equity markets. What other types of financial instruments are traded in these markets? How important are global...
-
A real estate agent has collected a random sample of 75 houses that were recently sold in a suburban community. She is particularly interested in comparing the appraised value and recent selling...
-
The file P02_35.xlsx contains data from a survey of 500 randomly selected households. For this problem, use Monthly Payment as the dependent variable in several regressions, as explained below. a....
-
In the original Western Airlines set-covering model in Figure 14.52, we used the number of hubs as the objective to minimize. Suppose instead that there is a fixed cost of locating a hub in any city,...
-
The best case study of all is probably the real-world situation. This allows you to: choose situations that are topical; choose countries that you are both knowledgeable about and interested in; ...
-
The per share element of the EPS calculation includes: A. All shares. B. The average number of ordinary shares outstanding during the year. C. The number of ordinary shares outstanding at the end of...
-
The dividend yield is the: A. Dividends paid per ordinary share. B. The proportion of the return in one year on a share. C. The profit per share. D. The dividend on a share as a proportion of the...
Study smarter with the SolutionInn App