MUMT 307

Outline

MUMT 307

Reverb 1 (lab)

MUMT 307

Reverb 2 (lab)

MUMT 307

Wavetable and Additive Synthesis

MUMT 307

Wavetable and Additive Synthesis (lab)

  • Using the PeriodicWave demo, create a sawtooth wavetable and a triangular wavetable with the following Fourier series with the fundamental frequency, `f`:
  • Square: `4/pisum_(k=0)^oo 1/k sin(2pifkt) text{ for } k=1,3,5,...`
    Sawtooth: `1/2 - 1/pisum_(k=0)^oo 1/k sin(2pifkt) text{ for } k=1,2,3,...`
    Triangle: `8/pi^2sum_(k=0)^oo (-1)^{(k-1)//2}/k^2 sin(2pifkt) text{ for } k=1,3,5,...`

MUMT 307

Why we do not use table lookups for sine wave generation

MUMT 307

Speed test your CPU (lab)

  • Speed test of your CPU
    • Download: speedtest.tar.gz
    • If you don't have gcc on your machine, upload (sftp) to a subdirectory of your music.mcgill.ca account
    • Uncompress speedtest.tar.gz (double-click on OSX or "tar -xf speedtest.tar.gz")
    • make c_speedtest
    • Reboot your machine
    • ./c_speedtest -nsize 1000000 -niters 1000
  • Add a vectorCosine() test

MUMT 307

JavaScript speed tests (lab)

MUMT 307

Amplitude Modulation (AM) Syntheis

MUMT 307

Amplitude Modulation (AM) Math

Carrier: `c(t) = A*sin(omega_ct), omega_c = 2pif`
Modualtor: `m(t) = M*cos(omega_mt), omega_m = 2pif`
Amplitude Modulation: `y(t) = [1 + m(t)]*c(t)`
          `= [1 + M*cos(omega_mt)]*A*sin(omega_ct)`
          `= A*sin(omega_ct) + A*M*cos(omega_mt)*sin(omega_ct)`
`= A*sin(omega_ct) + A*M//2[sin(omega_ct+omega_mt)+sin(omega_ct-omega_mt)]`

since: `cos(b)sin(a) = 1//2[sin(a+b)+sin(a-b)]`

MUMT 307

Ring Modulation

Carrier: `c(t) = A*sin(omega_ct), omega_c = 2pif`
Modualtor: `m(t) = M*cos(omega_mt), omega_m = 2pif`
Ring Modulation: `y(t) = m(t)*c(t)`
          `= M*cos(omega_mt)*A*sin(omega_ct)`
          `= A*M*cos(omega_mt)*sin(omega_ct)`
`= A*M//2[sin(omega_ct+omega_mt)+sin(omega_ct-omega_mt)]`

since: `cos(b)sin(a) = 1//2[sin(a+b)+sin(a-b)]`

MUMT 307

Frequency Modulation (FM) Syntheis

Frequency Modulation (FM) Syntheis (Lab)