New SC user, some questions

I am not sure if @lABl want the followings:

  1. After recompiling sclang, evaluate the following block, or copy it to startup.scd, which can be accessed via “Open startup file” from the File menu:

    (
    ServerBoot.add{
    	Buffer.freeAll; // I am not sure if it is necessary.
    	~soundFolder = thisProcess.nowExecutingPath;// +/+ "BW2 Exports";
    	~soundFolder.postln;
    	// I would save the SCD file containing this code block in a parent folder of the sound file folder, but thisProcess..... does not work here. Why?
    
    	~soundFolder = Platform.resourceDir +/+ "sounds";
    	~soundFolder.postln;
    	~soundFiles = SoundFile.collect(~soundFolder +/+ "*");
    	~buffers = ~soundFiles.collect { |aFile|
    		aFile.postln;
    		Buffer.read(s, aFile.path)
    	};
    	s.scope;
    }
    )
    
  2. Evaluate the following block:

    (
    ~test = {
    	s.reboot;
    	s.doWhenBooted {
    		~soundFolder.postln;
    		~soundFiles.postln;
    		~buffers.postln;
    		~buffers.do { |aBuffer| 
    			aBuffer.query;
    			aBuffer.play;
    			2.wait
    		}
    	}
    }
    )
    
  3. Evaluate the following code two or three times as a test:

    ~test.()
    
1 Like