1_environment_setup.scd 701 B

123456789101112131415161718192021222324
  1. // Server configuration
  2. s = Server.local;
  3. ServerOptions.devices; // List available audio devices if needed
  4. // Server boot with status reporting
  5. (
  6. s.waitForBoot({
  7. "SuperCollider server ready!".postln;
  8. "Available audio inputs: %".format(ServerOptions.inDevices).postln;
  9. "Available audio outputs: %".format(ServerOptions.outDevices).postln;
  10. "Sample rate: % Hz".format(s.sampleRate).postln;
  11. "Audio latency: % ms".format(s.options.blockSize / s.sampleRate * 1000).postln;
  12. // Run a quick audio test
  13. {
  14. var sig = SinOsc.ar(440, 0, 0.2);
  15. sig = sig * EnvGen.kr(Env.perc(0.01, 1), doneAction: 2);
  16. sig!2 // Stereo output
  17. }.play;
  18. });
  19. )
  20. //Server.killAll