Music and Acoustics: From Instrument to Computer

2.7. Practical Computer Applications

2.7. Practical Computer Applications

This second set of practical applications focuses on creating a synthetic sound imitating an acoustic music instrument, as well as on a few experiments on timbre. The last part can only be done if you have completed Study problem 2.6.5.

2.7.1. Create Your Synthesizer

We are going to write a MATLAB function for the purpose of creating sounds by additive synthesis (the summing of sines, see also Chapter 6) and the use of an envelope to control the intensity in time. Additive synthesis requires the synthad.m function, previously used in the practical applications of Chapter 1.

2.7.1.1. Write Your Instrument Function

Create a function with the header

            function s = instrument(f1,T,Fe)

Remember that the file's name is then instrument.m (you can replace the word instrument with whatever word you like). We first create a sound of the form


Because the instrument we are dealing with is programmed, the number of harmonics or partials np, their amplitudes ? k and their 'normalized' frequencies hk, are all defined by you in the function itself. the frequency of partial number k is then f 1 h k. In theory (due to the 'normalization' effect), we have h 1 = 1 ( h 1 = 0.5 for a bell), and f 1 h 1 = f 1( f 1/2 for a...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: IC Electronic Filters
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.