How can I make t-grains ugen produce any sound at all?

153 Views Asked by At

I'm playing with overtone and I can already make some noise using oscillators, envelopes, lfos and samples.

My problem is I can't get sound from t-grains ugen.

Here is my code. It's a straight translation from one of SuperCollider's examples (which works).

(ns tutorial.core
  (:use overtone.live))

(definst grainy [b 0] (let [
                         trate (mouse-y:kr 1 30)
                         dur (/ 2 trate)]

                        (t-grains 1 (impulse:ar trate) b 1 (mouse-x:kr 0 (buf-dur:kr b)) dur 0 0.8 2)))

(def organ-sample (load-sample "~/samples/organ.wav"))
(grainy organ-sample)

Can you fix my code or give me a working example of the t-grains ugen?

0

There are 0 best solutions below