KmeansToBPSet1:
Filter:
Classes (extension) | UGens > Generators

KmeansToBPSet1 : UGen : AbstractFunction : Object
ExtensionExtension

K-means Oscillator
Source: SLUGens.sc

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

Description

Uses succesive iterations of a k-means clustering algorithm on random data with random initial means to form break points in a 2-D space. These are then converted to wavetables in output synthesis based on the oscillator frequency.

Class Methods

KmeansToBPSet1.ar(freq: 440, numdatapoints: 20, maxnummeans: 4, nummeans: 4, tnewdata: 1, tnewmeans: 1, soft: 1.0, bufnum, mul: 1.0, add: 0.0)

Arguments:

freq

frequency of oscillator

numdatapoints

Initial number of data points

maxnummeans

Maximum number of means allowed

nummeans

current num means

tnewdata

If a trigger is received, reset source data (k-rate)

tnewmeans

If a trigger is received, reset means (k-rate)

soft

Proportion to soften means update. If 1.0, immediate update, 0.0 no update, proportion inbetween amount to move from the old mean position to the new mean of the allocated cluster (ie soft k-means).

bufnum

Number of a Buffer which contains positions for means and data points; see examples below

Inherited class methods

Instance Methods

Inherited instance methods

Examples