Anyone got a SuperCollider example for a full Sonic Pi synth?
As Discourse correctly points out, this is similar to the thread about SC’s Ping Pong. It also relates to a thread about wavetable synthesis. In both cases, @ethancrawford is involved, so maybe it should be more of a direct interaction.
A while back, created two simple synthdefs in SuperCollider. Was able to load them in Sonic Pi and play with them like normal synths, but several opts are missing, especially the _slide
ones.
Always thought that Overtone was doing something clever to add these things. As @samaaron pointed out last night, it’s not the case.
That was kind of an epiphany, for me.
Decided to go back to those SuperCollider-based projects during my office hours (which just ended, actually).
Thing is, haven’t got a clue how to get the other opts to work with new synthdefs. The Overtone/Clojure files (say, basic.clj) are full of references to these _slide
opts and it’s really not obvious how they’re used in the synths themselves.
An example would greatly help.
For reference, here’s my “talking drum” synth. A clue about fitting things like note_slide
would probably help me a lot to figure out the rest. (Would then attempt to create other synths from physical modelling and/or single-cycle waveforms.)
Thanks!
(
SynthDef(\tama,
{|note = 52, amp = 1, out_bus = 0, pan=0.0, gate=1, tension=0.05, loss=0.9, vel=1, dur=1 |
var signal, freq;
var lossexp=LinLin.ar(loss,0.0,1.0,0.9,1.0);
var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);
var excitation = EnvGen.kr(Env.perc, gate, timeScale: 1, doneAction: 0) * PinkNoise.ar(0.4);
freq=note.midicps;
signal = amp*MembraneCircle.ar(excitation, tension*(freq/60.midicps), lossexp);
DetectSilence.ar(signal,doneAction:2);
signal = signal * EnvGen.ar(Env.perc, gate, vel*0.5, 0, dur, 2);
signal=Pan2.ar(signal, pan);
Out.ar(out_bus,signal);
}
).writeDefFile("/Users/alex/Desktop/sc-synths")
)