Example from practice class 7

y4[x_,μ_]:=2*Cos[384π*(1+μ)*x]*Cos[384π*(1-μ)*x]

Plot[y4[x,0.5],{x,0,5}]
Play[y4[x,0.5],{x,0,5}]

We can produce chords/harmonics with linear combinations of cosine functions of this form. The first term is the fundamental frequency, second term and the third term are two waves of lower amplitude and higher frequency, which is supposed to imitate the different harmonics being produced when a string is struck (say on a piano). The exponential term simulates the dampening of the note after the key is struck.

f1[x_,f_,μ1_,μ2_,δ_]:=(Cos[2*f*π*x]+0.5*Cos[2*f*π*μ1*x]+0.25*Cos[2*f*π*μ2*x])Exp[-δ*x]

Plot[f1[x,440,2,3,3],{x,0,2}]
Play[f1[x,440,2,3,3],{x,0,2}]

Since original piece of music was played at ~100 minims (2 beats) / min, that converts to 0.15 secs / half beat. So we define the function piecewise in terms of frequency played and the timing at which the note starts. The specific notes and frequency of the notes that need to be played are found using the internet. 
Instead of making the chords in each piecewise function I now superimpose two piecewise functions with same starting time but different frequencies to have the notes played at the same time.
The coefficients in front of the function modulates the amplitude of the sound.

p[freq_,t_,damp_]:=Piecewise[{{0,x<0.15*t},{f1[x-0.15*t,freq,2,3,damp],x≥ 0.15*t}}]

beethoven=(p[392,1,5]+p[196,1,5]+p[98,1,5]+p[392,2,5]+p[196,2,5]+p[98,2,5]+p[392,3,5]+p[196,3,5]+p[98,3,5]+p[311,4,3]+p[156,4,3]+p[78,4,3]+p[349,12,5]+p[175,12,5]+p[87,12,5]+p[349,13,5]+p[175,13,5]+p[87,13,5]+p[349,14,5]+p[175,14,5]+p[87,14,5]+p[294,15,3]+p[147,15,3]+p[73,15,3])+0.5*(p[392,24,5]+p[392,25,5]+p[392,26,5]+p[262,27,3]+p[311,27,3]+p[415,28,5]+p[415,29,5]+p[415,30,5]+p[392,31,3]+p[622,32,5]+p[622,33,5]+p[622,34,5]+p[523,35,3])+p[392,40,5]+p[392,41,5]+p[392,42,5]+p[247,43,3]+p[294,43,3]+p[415,44,5]+p[415,45,5]+p[415,46,5]+p[392,47,3]+p[698,48,5]+p[698,49,5]+p[698,50,5]+p[587,51,3]+p[784,56,5]+p[784,57,5]+p[698,58,5]+p[622,59,3]+p[262,59,3]+1.5*(p[311,60,5]+p[311,61,5]+p[349,63,5]+p[247,64,3]+p[392,64,3]+p[587,64,5]+p[784,65,5]+p[784,66,5]+p[698,67,5]+p[622,68,3]+p[262,68,3]+p[392,68,5]+p[311,69,5]+p[311,70,5]+p[349,71,5]+p[587,72,5]+p[392,72,5]+p[247,72,5])+(p[123,74,5]+p[196,74,5]+p[247,74,5]+p[392,74,5]+p[587,74,5]+p[784,74,5]+p[123,75,5]+p[196,75,5]+p[247,75,5]+p[392,75,5]+p[587,75,5]+p[784,75,5]+p[123,76,5]+p[196,76,5]+p[247,76,5]+p[392,76,5]+p[587,76,5]+p[698,76,5]+p[130,77,5]+p[196,77,5]+p[262,77,5]+p[392,77,5]+p[523,77,5]+p[622,77,5]+p[104,81,5]+p[131,81,5]+p[208,81,5]+p[262,81,5]+p[370,81,5]+p[523,81,5]+p[98,85,3]+p[147,85,3]+p[196,85,3]+p[392,85,3]+p[494,85,3]+p[784,85,3]);

I don’t know what the PlayRange argument does but if I don’t set it to this value the sound is so loud it hurts my ears.

Plot[beethoven,{x,0,15}]
b=Play[beethoven,{x,0,15},PlayRange->{0,5},SampleRate->44100]

Export["beethoven.wav",b]