Most Examples not working

Hi all, I am new to SuperCollider and I wonder most of the delivered Examples from the SuperCollider-3.12.2-macOS.dmg examples folder are not working and fail with Syntax Errors. Is there possibly something I need to install in order to make those examples work ?

For example demonstrations/100 FM Synths.scd fails with:

ERROR: syntax error, unexpected '(', expecting $end
  in interpreted text
  line 18 char 1:

  (
  ^
  // define 100 randomly generated percussive FM instruments.
-----------------------------------
ERROR: Command line parse failed
-> nil

Or demonstrations/Atari2600.scd fails with:

ERROR: syntax error, unexpected '(', expecting $end
  in interpreted text
  line 26 char 1:

  (
  ^
  Pbind(
-----------------------------------
ERROR: Command line parse failed
-> nil

Or demonstrations/bit_reduction.scd fails with:

ERROR: syntax error, unexpected '(', expecting $end
  in interpreted text
  line 14 char 1:

  (
  ^
  {	var snd = Blip.ar(LFNoise2.kr(8, 200, 300), LFNoise2.kr(3, 10, 20));
-----------------------------------
ERROR: Command line parse failed
-> nil

And there are many more examples failing.

Hi. I think maybe you’re not selecting all the code before running it.
If you double click on the opening bracket “(”, it should select all the code inside the brackets.
Then you can run the selected code by pressing Shift Enter.
Hope that helps,
Paul

For demonstrations/100 FM Synths.scd the problem most likely is that you’re selecting all the code in the complete file at once and then try to run it all at once.

The way that example is written, you have to run it section by section, i.e.

  • first execute the line with s.boot; by putting the cursor at the beginning of that line and pressing ctrl+enter (or command+enter on Mac I suppose?)
  • then put the cursor just before (or just behind) the bracket just before SynthDef and execute that section by typing ctrl+enter
  • then put the cursor at the bracket just before // define 100 ... and execute that section,
  • and finally proceed to the bracket just before // listen randomly ... and execute that section