grains   scheme


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

Implementation

;; granulate 'singing' with sampler
(define grains
  (lambda (beat dur)
    (play sampler
          (+ 36 (* 36.0 (random))) ;; random pitch
          (random 80 100)          ;; random volume
          (* 8 dur)                ;; overlapping grains
          0                        ;; first bank
          (random)                 ;; random panning
          (cosr (* 10.0 44100)
                (* 5.0 44100)
                1/64))             ;; shuffle playback head betwen 5.0-15.0 seconds
    (callback (*metro* (+ beat (* .5 dur))) 'grains (+ beat dur) dur)))


Back to Index