dspsum:DSPMT   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/external/convolution_reverb.xtm

Implementation

;; convolution reverb takes mono
;; files as input (i.e. separates left and right)
(bind-func dspsum:DSPMT
  (let ((reverb (creverb_st_c "assets/ir/minsterl.aif"
                              "assets/ir/minsterr.aif"))
        (rms (rms_st_c))
        (left:SAMPLE 0.0)
        (right:SAMPLE 0.0)
        (wet 2.0)
        (dry 0.3))
    (lambda (in:SAMPLE* time chan dat:SAMPLE*)
      (if (= 0 (% time FRAMES))
          (begin (set! left (rms.left))
                 (set! right (rms.right))))
      (rms chan (reverb chan (pref in 0) dry wet)))))


Back to Index

Similar Entries