Last active
August 29, 2015 14:22
-
-
Save willm/539d95b293488ef25767 to your computer and use it in GitHub Desktop.
Supercollider cheet sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a synthdef | |
SynthDef(\name, { arg freq=440; | |
Out.ar([0,1], SinOsc.ar(freq, 0, Line.kr(0.5, 0, 0.5, doneAction:2))) | |
}).add; | |
Synth(\name, [\freq, 220]); | |
//Create a pattern | |
Pdef(\pattern, | |
Pbind(\instrument, \name, \dur, 0.15, \degree, Pseq([5, 3, 1], inf)) | |
).quant_(1.85); | |
Pdef(\pattern).play; | |
/* | |
* Pseq - plays values in array sequentially. | |
* Prand - plays values in array randomly. | |
* Pkey - copies sequence from supplied key (eg. Pkey(\degree)) | |
* Pshuf - play values in array shuffled. | |
* \degree is the degree of the scale, you can also use freq or midinote | |
* quant_ syncs to clock of a bar lasting 1.85 seconds | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment