I’ve translated tutorial 4! That was several months longer than I intended to wait. There were extenuating circumstances.

My Clojure skills, as well as my understanding of both SuperCollider and Overtone, have improved dramatically since I tried translating Tutorial 3. This only took me an afternoon, and everything worked as expected.

The only thing I got stuck on for a couple hours is triggered params. In SCLang, you can prepend a ‘t_’ to a parameter name on the synth-form function (the second argument to SynthDef) and it will automatically create a triggered control Ugen. Overtone does not do this, and from a design perspective I think that’s a good call. But how on earth do I get, say, a gate to automatically revert to 0 after I set it to something else?

I went reading source code, but all I really needed to do was re-read the doc string for Overtone’s defsynth.

 

Params can also be given rates. By default, they are :kr, 
however another rate can be specified by using either a 
pair of [default rate] or a map with keys :default and rate:

(defsynth foo [freq [440 :kr] gate [0 :tr]] ...)
(defsynth foo [freq {:default 440 :rate :kr}] ...)

Anyway, all you have to do to get a TrigControl instead of a Control Ugen is to set the parameter’s rate to :tr using either syntax demonstrated above. See also: http://doc.sccode.org/Classes/SynthDef.html

I’m really loving Overtone. Once I really started to understand how SuperCollider works, I found that Overtone is usually pretty faithful to its design. You just write the same thing in Clojure. Sometimes there are small differences like the one above, but they’re typically improvements and they’re documented.

My code is here.

I can’t wait to get to buffers. Yeehaw.

More soon!