SortBuf:
Filter:
Classes (extension) | UGens > Buffer

SortBuf : UGen : AbstractFunction : Object
ExtensionExtension

Karplus-Strong via a sorting algorithm
Source: SLUGens.sc

//SLUGens released under the GNU GPL as extensions for SuperCollider 3, by Nick Collins, http://composerprogrammer.com/index.html 

Description

In this UGen a target buffer gets sorted into increasing sample values over time- the sorting process causes gradual distortion. The sorting algorithm used is just a naive one of O(N^2) so effects are very dependent on sample length and sorting speed. It works best with small buffers and large sorting speeds will make it very CPU intensive.

SortBuf assumes that the sample rate of the target buffer is the same as the soundcard output sample rate.

Class Methods

SortBuf.ar(bufnum: 0, sortrate: 10, reset: 0)

Arguments:

bufnum

target buffer, will be overwritten by the procedure.

sortrate

number of sorting iterations per play through of the buffer

reset

restart the sorting procedure.

Inherited class methods

Instance Methods

Inherited instance methods

Examples