From 5363647c2710d67487ba72c8c281c55f09ac9cde Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Wed, 21 Oct 2015 12:22:19 -0400 Subject: [PATCH] Goofing around with SuperCollider --- sclang-play/tutorial.sc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sclang-play/tutorial.sc diff --git a/sclang-play/tutorial.sc b/sclang-play/tutorial.sc new file mode 100644 index 0000000..9ecd6e7 --- /dev/null +++ b/sclang-play/tutorial.sc @@ -0,0 +1,32 @@ +{ + [ + SinOsc.ar(440, 0, 0.2), + SinOsc.ar(442, 0, 0.2) + ] +}.play; + +f = { + "Function evaluated".postln; + 2 + 3; +}; + +f.value; +f.value; +f.value; + +f = 3; +f.value; +f.value; + +f = { 3.0.rand; }; +f.value; + +f = { |a| a.value + 3 }; +f.value(4); + +g = { 3.0.rand; }; + +f.value(g); +f.value(g); + +f.value; \ No newline at end of file