SuperCollider Smalltalk

stsc3 now has translators from SuperCollider to Smalltalk.

There are two forms, the nicer one allows writing Smalltalk programs using SuperCollider syntax.

It works particularly well for Smalltalk classes that have a primary factory message.

There are example files at stsc3/help/graphs (they have an .stc extension).

One is copied here for reference:

// zizle (jmcc) #SC3d1.5 ; texture=overlap,4,4,12,inf
var a = {arg f; (SinOsc(f * [Rand(0.7, 1.3), 1], {Rand(0, 2 * pi)}.dup) * 0.1).mix};
var o = SinOsc(Rand(24, 108).midicps, Rand(0, 2 * pi));
var s = o * a.value(ExpRand(0.3, 8)).max(0) * a.value(ExpRand(6, 24)).abs;
Pan2(s, Rand(-1, 1), 1)

The Squeak SC3 Browser translates as required, and there’s an Emacs mode to work with GNU Smalltalk.

stsc3 is at https://gitlab.com/rd--/stsc3

Best,
Rohan

Ps. Since this is not straightforwards to get working, here’s a short video of yet another lovely Fredrik Olofsson graph, for the mildly curious. It indicates a subtle difference in the rules for implicit message names, c.f. ...osc = LFTri; osc(1 / b, 0).... https://vimeo.com/615732677