hw2

1) make a microphone,
2) cut a tube,
3) measure its length (metric) and
4) record an impulse sounding in the tube to get the speed of sound and it's periodicity
5) using the script below, create a simulation with IIR echoes that has the same pitch and approximately the same decay
6) create a web page located at the pathname ~/Library/Web/220a/hw2.html



include:
(define echo  ; IIR version, aka feed-back or recursive delay
  (lambda* (secs #&optional (att 1.0))
    (let ((del (make-delay (round (* secs (srate)))))
   (yz 0.0)                                       ; use yd, i.e., send output to delay
   (y0 0.0))
      (lambda (x0)
       (set! yz (tap del))                        ; where it comes back from delayline
       (set! y0 (+ x0 (* att yz)))
       (delay del y0)                             ; feed into delayline
       y0)
      )))
(map-chan (echo .01 .5)) ; smaller attenuation gets shorter echo series, by damping it faster