Monday, February 23, 2009


Before I do anymore GUI stuff a quick addition to my Moog synth itself, portamento!

Also known as slide or glissando, it's a nice feature of many analogue synths, here's the wiki page on it if you're not sure what I'm talking about. 

I've been wanting to add this to my synth since I created it but I thought it might be difficult, but after putting my faith in the hand of providence and searching the SuperCollider user mailing list, I found simple that portamento is in fact dead easy.

Here's my revised SynthDef 


arg oscType =0, oscType2 = 1, pan = 0, level = 0.5, cutoff = 500, gain = 3.3, attack = 0.1, decay = 0.1, sust = 0.7, rel = 0.2, attackf = 0.1, decayf = 0.1, sustf = 0.9, relf = 0.2, gate = 1, freq =440, lagLev = 0.2;

var oscArray = [, lagLev)),, lagLev)),, lagLev))];
var oscArray2 = [, lagLev)),, lagLev)),, lagLev))];
var ampEnv =, decay, sust, rel), gate, doneAction:2);
var filterEnv =, decayf, sustf, relf), gate, doneAction:2);
var osc1 =, oscArray);
var osc2 =, oscArray2);
var fade =, osc2, pan , level * ampEnv, 0));
var filter =, cutoff * filterEnv, gain);,filter)


All I've done here is encapsulated each of my frequency arguments for the oscillators in a lag Ugen. The slide time, or the time it takes for the pitch of each note to move from it's original value to the new note is set by the lagLev argument, in seconds.

To make this work you'll need to use a Pmono pattern, it won't work if a new synth is created with each note as it would be with a  Pbind pattern. 

And that's Jazz. 

No comments:

Post a Comment