PV_HainsworthFoote

object PV_HainsworthFoote extends ProductReader[PV_HainsworthFoote]

An FFT based onset detector UGen using a balance of two features. It is based on work described in Hainsworth (2003), "Techniques for the Automated Analysis of Musical Audio," PhD thesis, University of Cambridge. See especially p. 128. The Hainsworth metric is a modification of the Kullback Liebler distance.

===Examples===

// observe detection
play {
 val sig = Decay.ar(Dust.ar(2), 0.1) * WhiteNoise.ar(0.25)
 val th  = MouseX.kr(0.3, 1.0, lag = 0)
 th.poll(HPZ1.kr(th).abs, "thresh")
 val h   = MouseY.kr(1.0, 0.1, lag = 0)
 val f   = 1 - h
 h.poll(HPZ1.kr(h).abs, "h-f")
 val tr  = PV_HainsworthFoote.ar(FFT(LocalBuf(2048), sig), h, f, thresh = th)
 Seq(sig, SinOsc.ar(440) * Decay.ar(tr * 0.01, 0.1))
}
See also
Companion
class
trait Product
trait Mirror
trait ProductReader[PV_HainsworthFoote]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def ar(chain: GE, hainsworth: GE, foote: GE, thresh: GE, waitTime: GE): PV_HainsworthFoote
Value Params
chain

the fft signal (buffer) to analyze

foote

what strength of detection signal from normalized Foote metric (0 to 1) to use.

hainsworth

what strength of detection signal from Hainsworth metric (0 to 1) to use.

thresh

threshold level for detection

waitTime

after an onset is detected, further detections are suppressed for this period in seconds, preventing multiple rapid triggers

def read(in: RefMapIn, key: String, arity: Int): PV_HainsworthFoote