SuperCollider CLASSES (extension)


experimental time domain onset detector
Inherits from: UGen : AbstractFunction : Object

//SLUGens released under the GNU GPL as extensions for SuperCollider 3, by Nick Collins, 


Purely time domain onset detector

Works well for loud signals but fainter onsets are missed, and really loud onsets lead to multiple triggers.

(my note: needs some sort of log amplitude correction?)

Class Methods

Inherited class methods

Undocumented class methods

*kr (input, memorysize1: 20, before: 5, after: 5, threshold: 10, hysteresis: 10, mul: 1, add: 0)

Instance Methods

Inherited instance methods


x = {arg threshold=10.0; 

var input, onsets; 

input =; 

onsets=,20,5,5,threshold);,,0,0.1)*, 0.01, 0.1)); 


x.set(\threshold, 10.0);

b =,"sounds/a11wlk01.wav"); // remember to free the buffer later.
b =,"sounds/break2"); // remember to free the buffer later.

x = {arg threshold=10.0, hysteresis=20; 

var input, onsets; 

input =, b,, loop:1);

onsets=,20,5,5,threshold,hysteresis);, input + (,0,0.1)*, 0.01, 0.05))); 


//by setting these appropriately can get somewhere...
x.set(\threshold, 50.0)
x.set(\hysteresis, 10.0);