SpecPcile

final case
class SpecPcile(chain: GE, percent: GE, interp: GE) extends SingleOut with ControlRated with IsIndividual

A UGen to find the percentile of a signal's magnitude spectrum. Given an FFT chain this calculates the cumulative distribution of the frequency spectrum, and outputs the frequency value which corresponds to the desired percentile. For example, to find the frequency at which 90% of the spectral energy lies below that frequency, you want the 90-percentile, which means the value of percent should be 0.9. The 90-percentile or 95-percentile is often used as a measure of spectral roll-off.

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

interp

specifies whether interpolation should be used to try and make the percentile frequency estimate more accurate, at the cost of a little higher CPU usage. Set it to 1 to enable this.

percent

the percentage between 0.0 (0%) and 1.0 (100%)

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