Guest User

startup.scd

a guest
May 25th, 2021
38
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (
  2. s.reboot { // server options are only updated on reboot
  3.     // configure the sound server: here you could add hardware specific options
  4.     // see http://doc.sccode.org/Classes/ServerOptions.html
  5.     s.options.numBuffers = 1024 * 256; // increase this if you need to load more samples
  6.     s.options.memSize = 8192 * 32; // increase this if you get "alloc failed" messages
  7.     s.options.numWireBufs = 64; // increase this if you get "exceeded number of interconnect buffers" messages
  8.     s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
  9.     s.options.numOutputBusChannels = 2; // set this to your hardware output channel size, if necessary
  10.     s.options.numInputBusChannels = 2; // set this to your hardware output channel size, if necessary
  11.     // boot the server and start SuperDirt
  12.     s.waitForBoot {
  13.         ~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels
  14.         ~dirt.loadSoundFiles;   // load samples (path containing a wildcard can be passed in)
  15.         ~dirt.loadSoundFiles("/home/jake/Documents/music/tidalcycles/samples-extra/*");
  16.     // for example: ~dirt.loadSoundFiles("/Users/myUserName/Dirt/samples/*");
  17.     // s.sync; // optionally: wait for samples to be read
  18.         ~dirt.start(57120, 0 ! 12);   // start listening on port 57120, create two busses each sending audio to channel 0
  19.  
  20.         // optional, needed for convenient access from sclang:
  21.         (
  22.             ~d1 = ~dirt.orbits[0]; ~d2 = ~dirt.orbits[1]; ~d3 = ~dirt.orbits[2];
  23.             ~d4 = ~dirt.orbits[3]; ~d5 = ~dirt.orbits[4]; ~d6 = ~dirt.orbits[5];
  24.             ~d7 = ~dirt.orbits[6]; ~d8 = ~dirt.orbits[7]; ~d9 = ~dirt.orbits[8];
  25.              h~d10 = ~dirt.orbits[9]; ~d11 = ~dirt.orbits[10]; ~d12 = ~dirt.orbits[11];
  26.         );
  27.     };
  28.  
  29.     s.latency = 0.3; // increase this if you get "late" messages
  30. };
  31. );
  32.  
  33.  
RAW Paste Data