An FFT based onset detector UGen using a mix of extracted features. It is based on work described in Jensen and Andersen (2003), "Real-time Beat Estimation Using Feature Extraction," in: Proceedings of the Computer Music Modeling and Retrieval Symposium.
First order derivatives of the features are taken. The threshold may need to be set low to pick up on changes.
===Examples===
// observe detection
play {
val sig = Decay.ar(Dust.ar(2), 0.1) * WhiteNoise.ar(0.25)
val th = MouseX.kr(0.1, 1.0, lag = 0)
th.poll(HPZ1.kr(th).abs, "thresh")
val tr = PV_JensenAndersen.ar(FFT(LocalBuf(2048), sig), thresh = th)
Seq(sig, SinOsc.ar(440) * Decay.ar(tr * 0.01, 0.1))
}
- See also
- Companion
- class
Type members
Value members
Concrete methods
- Value Params
- centroid
proportion (0 to 1) of spectral centroid feature
- chain
the fft signal (buffer) to analyze
- flux
proportion (0 to 1) of spectral flux feature
- hfc
proportion (0 to 1) of high frequency content feature
- hfe
proportion (0 to 1) of high frequency energy feature
- thresh
threshold level for detection
- waitTime
after an onset is detected, further detections are suppressed for this period in seconds, preventing multiple rapid triggers