Category:SuperCollider: Difference between revisions

Some additional notes on SuperCollider 2024-06-21
m (add links)
(Some additional notes on SuperCollider 2024-06-21)
Line 11:
[https://github.com/supercollider/supercollider SuperCollider at GitHub]
[http://supercollider.github.io/ SuperCollider Homepage]
 
<!-- ******************************* NEW CONTENT HERE ************************************************* -->
<br><br>
<b>Some additional notes on SuperCollider 2024-06-21</b>
 
From the SuperCollider GitHub website: https://supercollider.github.io/ :<br>
<b>Quote:</b><br>
A PLATFORM FOR AUDIO SYNTHESIS AND ALGORITHMIC COMPOSITION,<br>
&nbsp; &nbsp; &nbsp; USED BY MUSICIANS, ARTISTS AND RESEARCHERS WORKING WITH SOUND.
<br><br>
FREE AND OPEN SOURCE SOFTWARE FOR WINDOWS, MACOS AND LINUX.
<br><br>
SuperCollider features three major components:<br>
scsynth – A real-time audio server<br>
sclang – An interpreted programming language<br>
scide – An editor for sclang with an integrated help system<br>
<b>End-Quote.</b><br>
<br>
Some people try to squeeze a musical composition into 140 characters: (but just for the challenge):<br>
<i>Don't judge SuperCollider or the language by these examples, they are just for fun</i>.<br>
<syntaxhighlight lang="supercollider">
f={|t|Pbind(\note,Pseq([-1,1,6,8,9,1,-1,8,6,1,9,8]+5,319),\dur,t)};Ptpar([0,f.(1/6),12,f.(0.1672)],1).play
</syntaxhighlight>
Listen to the results here: https://supercollider.github.io/assets/audio/sc-140/06_batuhanbozkurt_celesteh.mp3<br>
You can see/hear more at: https://supercollider.github.io/sc-140.html<br>
<br>
<br>
<b>As of today (2024-06-21) the current version of SuperCollider for all supported platforms is: 3.13.0</b>
<br><br>
While SClang (SuperCollider language) and its companion components are designed for the creation of sounds and music, the language is a full featured programming language.
<br><br>
The language is OO, to the extent that everything is an object, even numbers.<br>
In this snippet: <b>123 + 456</b> the <b>123</b> is an object, <b>+</b> is a method on the class of that object, and <b>456</b> is a parameter to that method. <br>
Even though <b>+</b> is a method the syntax of the addition is what you would typically expect.
<br><br>
The print function in SClang is a method called <b>postln</b>, which first appears in the root of the class tree: <b>Object</b>.<br>
<br>
Some examples, showing two possible call formats:
<syntaxhighlight lang="supercollider">
postln("Hello World"); // prints: Hello World
"Hello World".postln; // prints: Hello World
postln(1001); // prints: 1001
1001.postln; // prints: 1001
postln(123 + 456); // prints: 579
(123 + 456).postln; // prints: 579
</syntaxhighlight>
 
The method <b>postln</b>, adds a new-line after printing the text, if you don't want the new-line, use: <b>post</b>.
<br><br>
<i>... more coming soon ...</i>
10

edits