Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.1 A Function to Play a Note Piano keyboards are laid out as illustrated by the following image OCTAVE Middle-C A-440 Keys on a piano

image text in transcribed

1.1 A Function to Play a Note Piano keyboards are laid out as illustrated by the following image OCTAVE Middle-C A-440 Keys on a piano .C4 refers to the C-key in the fourth octave. C4 is also called middle-C A4 is also called A-440, because its frequency is 440 Hz. Every key is given a key number. The key number of middle-C is 40 The frequency of any key can be found by substituting its key number into the formula: 440s Remember that when we construct a sinusoid in MATLAB, we are in fact constructing a sampled sinusoid The Sampling Theorem tells us that to recover a continuous signal from its samples without aliasing, f, must be at least two times greater than the maximum frequency component. Built-in function soundsc (xx, fs) reconstruct the continuous-time version of xx, i.e.z(t) z[t fs]. Use this to judge how your synthesis is doing as you work on the lab. In music synthesis, common choices for sampling frequency f, are 8000 Hz, 11025 Hz, or 44100 Hz. Write a function to produce a desired note for a given duration at a given complex amplitude. Use the following skeleton code to write your function function xxkey to note(x, keynun, dur) KEY TO NOTE: Produce a sinusoidal waveforn corresponding to agiven piano key number Input Args: X: amplitude (default-1) keynun: number of the note on piano keyboard dur: duration of the note (in seconds) Output: xx: sinusoidal waveform of the note fs 8000; tt-0:(1/fs):dur-1/fs freq xx . real(); %

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago