Your task is to compose a short piece of electronic music. The piece must conform to the following rules (and no amount of complaining that "music doesn't have rules, man" will change that): 1. It must be between 10 and 15 seconds long. 2. It must be sampled at the rate Fs = 8192. 3. It must incorporate at least three of the built-in sounds handel, gong, laughter, train, chirp and splat. These can be incorporated in part, in full,o repeated several times (in part or in full). 4. It must include sounds playing at the same time as others. 5. It may include pure notes created using sine waves, but this is optional. 6. It may include piano notes, but this is harder than it might seem: they will need to be resampled to match the sampling rate of 8192. You'll have to work this out yourself if you want to try. 7. No other sounds may be included in the piece. So no sampling your own voice, no downloading other clips, etc. 8. The final piece must be represented by a single array y. 9. The code you submit must construct your piece from an empty workspace -- so load any samples you use. Write your code to compose the music in a script file music.mlx. The last commands of this file should save your creation as a wave file as follows: y_scaled = y / max(abs (y)); % make sure all values are between [-1, 1]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please help with this exercise using Matlab.

Your task is to compose a short piece of electronic music. The piece must conform to the following rules (and no amount of complaining that "music
doesn't have rules, man" will change that):
1. It must be between 10 and 15 seconds long.
2. It must be sampled at the rate Fs = 8192.
3. It must incorporate at least three of the built-in sounds handel, gong, laughter, train, chirp and splat These can be incorporated in part, in full, or
repeated several times (in part or in full).
4. It must include sounds playing at the same time as others.
5. It may include pure notes created using sine waves, but this is optional.
6. It may include piano notes, but this is harder than it might seem: they will need to be resampled to match the sampling rate of 8192. You'll have to
work this out yourself if you want to try.
7. No other sounds may be included in the piece. So no sampling your own voice, no downloading other clips, etc.
8. The final piece must be represented by a single array y.
9. The code you submit must construct your piece from an empty workspace -- so load any samples you use.
Write your code to compose the music in a script file music.mlx. The last commands of this file should save your creation as a wave file as follows:
y_scaled = y / max(abs(y));
% make sure all values are between [-1, 1]
audiowrite('music.wav', y_scaled, Fs) % write the wave file
Transcribed Image Text:Your task is to compose a short piece of electronic music. The piece must conform to the following rules (and no amount of complaining that "music doesn't have rules, man" will change that): 1. It must be between 10 and 15 seconds long. 2. It must be sampled at the rate Fs = 8192. 3. It must incorporate at least three of the built-in sounds handel, gong, laughter, train, chirp and splat These can be incorporated in part, in full, or repeated several times (in part or in full). 4. It must include sounds playing at the same time as others. 5. It may include pure notes created using sine waves, but this is optional. 6. It may include piano notes, but this is harder than it might seem: they will need to be resampled to match the sampling rate of 8192. You'll have to work this out yourself if you want to try. 7. No other sounds may be included in the piece. So no sampling your own voice, no downloading other clips, etc. 8. The final piece must be represented by a single array y. 9. The code you submit must construct your piece from an empty workspace -- so load any samples you use. Write your code to compose the music in a script file music.mlx. The last commands of this file should save your creation as a wave file as follows: y_scaled = y / max(abs(y)); % make sure all values are between [-1, 1] audiowrite('music.wav', y_scaled, Fs) % write the wave file
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education