Packages

final case class Crest(rate: Rate, in: GE, length: GE = 400, gate: GE = 1.0f) extends SingleOut with Product with Serializable

A UGen that measures the "crest factor" of a time-domain signal. The "crest factor" is the ratio of the absolute peak to the absolute mean over a certain time period. In pseudocode:

crest = (samples.abs.max) / (samples.abs.mean)

For Pulse waves the value will be 1, because the mean and the maximum are the same. For SinOsc , the theoretical value is 2.sqrt . For Saw it is 3.sqrt . These exact values might not occur in practice, because of anti-aliasing and other sampling factors.

This is not to be confused with FFTCrest which does the same thing for spectral data.

This is a third-party UGen (MCLDUGens).

in

signal to analyze, can be audio rate or control rate

length

number of samples over which to take the measurement. A buffer of this size is created internally (so be careful about specifying a massive number here). (init-time only)

gate

normally the statistic is calculated on every control block cycle. If one wants it less often (e.g. to reduce CPU usage), one can modulate this – calculation only occurs if gate is greater than zero.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Crest
  2. Serializable
  3. SingleOut
  4. SomeOut
  5. Lazy
  6. GE
  7. UGenSource
  8. Expander
  9. Lazy
  10. Product
  11. Equals
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Crest(rate: Rate, in: GE, length: GE = 400, gate: GE = 1.0f)

    in

    signal to analyze, can be audio rate or control rate

    length

    number of samples over which to take the measurement. A buffer of this size is created internally (so be careful about specifying a massive number here). (init-time only)

    gate

    normally the statistic is calculated on every control block cycle. If one wants it less often (e.g. to reduce CPU usage), one can modulate this – calculation only occurs if gate is greater than zero.

Value Members

  1. val gate: GE
  2. lazy val hashCode: Int
    Definition Classes
    UGenSource → AnyRef → Any
  3. val in: GE
  4. val length: GE
  5. final def name: String
    Definition Classes
    UGenSource
  6. def productElementNames: Iterator[String]
    Definition Classes
    Product
  7. val rate: Rate
    Definition Classes
    CrestGE