Playing Samples in SuperCollider

The Buffer class manages samples in SuperCollider. There are many ways to use samples, based on these buffers. The following example loads a WAV file (find it in the download) and creates a looping node. When running, the playback speed can be changed:


// get and enter the absolute path to a sample
~sample_path = "/some/directory/sala_formanten.wav";

~buffer  =,~sample_path);

~sampler = {

      |rate= 0.1|

      var out =,~buffer.bufnum, * rate, 1, 0,0,~buffer.numFrames);, out);



// set the play rate manually



Combine the sample looper example with the control bus and mouse input example to create a synth for scratching sound files.

Contents © Henrik von Coler 2021 - Contact