SpecCentroid

final case
class SpecCentroid(chain: GE) extends SingleOut with ControlRated with IsIndividual

A UGen to measure the spectral centroid. Given an FFT chain, this measures the spectral centroid, which is the weighted mean frequency, or the "centre of mass" of the spectrum. (DC is ignored.) This can be a useful indicator of the perceptual brightness of a signal.

Note that the output frequency is pretty close to the correct value when feeding in a sine signal, but the estimate is usually too high when using for example filtered noise. In that case, you will get better results using SpecPcile at 50%.

Note that despite running at control-rate, the output remains constant for each FFT frame. E.g. with an FFT size of 1024 and 50% overlap, a new measure is generated every 512 audio frames, or (at control block size 64) every 8 control blocks.

Value Params
chain

the fft signal (buffer) to analyze

See also
Companion
object
trait Serializable
trait IsIndividual
trait ControlRated
class SingleOut
class SomeOut
trait Lazy
trait GE
class UGenSource[UGenInLike]
trait Expander[UGenInLike]
trait Lazy
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

final
def name: String
Inherited from
UGenSource
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
final
def rate: Rate
Inherited from
ControlRated

Inherited fields

lazy override
val hashCode: Int
Inherited from
UGenSource