SortBuf:
Filter:
sc3-plugins/Classes (extension) | UGens > Buffer

SortBuf
ExtensionExtension

Karplus-Strong via a sorting algorithm

//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

.ar

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.

Examples