Object/Class

de.sciss.synth.ugen

Onsets

Related Docs: class Onsets | package ugen

Permalink

object Onsets extends Serializable

An onset detecting UGen for musical audio signals. It detects the beginning of notes/drumbeats/etc. Outputs a control-rate trigger signal which is 1 when an onset is detected, and 0 otherwise.

The onset detection should work well for a general range of monophonic and polyphonic audio signals. The onset detection is purely based on signal analysis and does not make use of any "top-down" inferences such as tempo.

There are different functions available for the analysis:

- 0 "power" -- generally OK, good for percussive input, and also very efficient - 1 "magsum" -- generally OK, good for percussive input, and also very efficient - 2 "complex" -- performs generally very well, but more CPU-intensive - 3 "rcomplex" (default) -- performs generally very well, and slightly more efficient than "complex" - 4 "phase" -- generally good, especially for tonal input, medium efficiency - 5 "wphase" -- generally very good, especially for tonal input, medium efficiency - 6 "mkl" -- generally very good, medium efficiency, pretty different from the other methods

The differences aren't large, so it is recommended you stick with the default "rcomplex" unless you find specific problems with it. Then maybe try "wphase". The "mkl" type is a bit different from the others so maybe try that too. They all have slightly different characteristics, and in tests perform at a similar quality level.

See also

PV_HainsworthFoote

PV_JensenAndersen

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Onsets
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def kr(chain: GE, thresh: GE = 0.5f, fun: GE = 3, decay: GE = 1.0f, noiseFloor: GE = 0.1f, minGap: GE = 10, medianSpan: GE = 11, whType: GE = 1, raw: GE = 0): Onsets

    Permalink

    chain

    the output (buffer) of an FFT UGen which transforms the audio input to track. For the FFT chain, you should typically use a frame size of 512 or 1024 (at 44.1 kHz sampling rate) and 50% hop size (which is the default setting in SC). For different sampling rates choose an FFT size to cover a similar time-span (around 10 to 20 ms).

    thresh

    the detection threshold, typically between 0 and 1, although in rare cases you may find values outside this range useful

    fun

    index of a function to be used to analyse the signal. See main paragraph for possible values (usually can be left to default).

    decay

    (advanced setting) Specifies the time (in seconds) for the normalisation to "forget" about a recent onset. If you find too much re-triggering (e.g. as a note dies away unevenly) then you might wish to increase this value. Not used with "mkl".

    noiseFloor

    (advanced setting) This is a lower limit, connected to the idea of how quiet the sound is expected to get without becoming indistinguishable from noise. For some cleanly-recorded classical music with wide dynamic variations, it was found helpful to go down as far as 1e-6. Not used with "mkl".

    minGap

    (advanced setting) Specifies a minimum gap (in FFT frames) between onset detections, a brute-force way to prevent too many doubled detections.

    medianSpan

    (advanced setting) Specifies the size (in FFT frames) of the median window used for smoothing the detection function before triggering.

    whType

    (advanced setting) ?

    raw

    (advanced setting) ? (init-time only)

  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped