Class/Object

de.sciss.synth.ugen

BeatTrack2

Related Docs: object BeatTrack2 | package ugen

Permalink

final case class BeatTrack2(bus: GE, numChannels: GE, winSize: GE = 2, phaseSpacing: GE = 0.02f, lock: GE = 0, weighting: GE = 2.1f) extends MultiOut with ControlRated with IsIndividual with Product with Serializable

A template matching beat tracker UGen. This beat tracker is based on exhaustively testing particular template patterns against feature streams; the testing takes place every 0.5 seconds. The two basic templates are a straight (groove=0) and a swung triplet (groove=1) pattern of 16th notes; this pattern is tried out at scaling factors corresponding to the tempi from 60 to 180 bpm. This is the cross-correlation method of beat tracking. A majority vote is taken on the best tempo detected, but this must be confirmed by a consistency check after a phase estimate. Such a consistency check helps to avoid wild fluctuating estimates, but is at the expense of an additional half second delay. The latency of the beat tracker with default settings is thus at least 2.5 seconds; because of block-based amortisation of calculation, it is actually around 2.8 seconds latency for a 2.0 second temporal window.

This beat tracker is designed to be flexible for user needs; you can try out different window sizes, tempo weights and combinations of features. However, there are no guarantees on stability and effectiveness, and you will need to explore such parameters for a particular situation.

The UGen has six outputs corresponding to beat-tick, eighth-tick, groove-tick, tempo, phase, and groove. Warning: it reads from input control bus instead of taking a regular control input signal as its first argument!

bus

index of a control bus to read from. the number of channels of that bus are expected to match the numChannels argument. To track a particular audio signal, analyse it first into numChannels features, that is onset-detection-triggers, as generated by Onsets , and write the trigger-output to this control bus.

numChannels

(scalar) How many features (ie how many control bus channels) are provided (init-time only)

winSize

(scalar) Size of the temporal window desired (2.0 to 3.0 seconds models the human temporal window). You might use longer values for stability of estimate at the expense of reactiveness.

phaseSpacing

(scalar) Relates to how many different phases to test. At the default of 0.02 seconds, 50 different phases spaced by those 0.02 seconds would be tried out for 60bpm; 16 would be trialed for 180 bpm. Larger phaseSpacing means more tests and more CPU cost.

lock

If this argument is greater than 0.5, the tracker will lock at its current periodicity and continue from the current phase. Whilst it updates the model's phase and period, this is not reflected in the output until lock goes back below 0.5. Can be control-rate modulated.

weighting

(scalar) Use (-2.5) for flat weighting of tempi, (-1.5) for compensation weighting based on the number of events tested (because different periods allow different numbers of events within the temporal window). If an integer from 0 upwards is given, this is specifying the ID of a buffer containing 120 frames which represent individual tempo weights; tempi go from 60 to 179 bpm in steps of one bpm, so you make sure the buffer has 120 frames.

Linear Supertypes
Serializable, Serializable, IsIndividual, ControlRated, MultiOut, SomeOut, GE.Lazy, GE, UGenSource[UGenInLike], Expander[UGenInLike], Lazy, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BeatTrack2
  2. Serializable
  3. Serializable
  4. IsIndividual
  5. ControlRated
  6. MultiOut
  7. SomeOut
  8. Lazy
  9. GE
  10. UGenSource
  11. Expander
  12. Lazy
  13. Product
  14. Equals
  15. AnyRef
  16. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BeatTrack2(bus: GE, numChannels: GE, winSize: GE = 2, phaseSpacing: GE = 0.02f, lock: GE = 0, weighting: GE = 2.1f)

    Permalink

    bus

    index of a control bus to read from. the number of channels of that bus are expected to match the numChannels argument. To track a particular audio signal, analyse it first into numChannels features, that is onset-detection-triggers, as generated by Onsets , and write the trigger-output to this control bus.

    numChannels

    (scalar) How many features (ie how many control bus channels) are provided (init-time only)

    winSize

    (scalar) Size of the temporal window desired (2.0 to 3.0 seconds models the human temporal window). You might use longer values for stability of estimate at the expense of reactiveness.

    phaseSpacing

    (scalar) Relates to how many different phases to test. At the default of 0.02 seconds, 50 different phases spaced by those 0.02 seconds would be tried out for 60bpm; 16 would be trialed for 180 bpm. Larger phaseSpacing means more tests and more CPU cost.

    lock

    If this argument is greater than 0.5, the tracker will lock at its current periodicity and continue from the current phase. Whilst it updates the model's phase and period, this is not reflected in the output until lock goes back below 0.5. Can be control-rate modulated.

    weighting

    (scalar) Use (-2.5) for flat weighting of tempi, (-1.5) for compensation weighting based on the number of events tested (because different periods allow different numbers of events within the temporal window). If an integer from 0 upwards is given, this is specifying the ID of a buffer containing 120 frames which represent individual tempo weights; tempi go from 60 to 179 bpm in steps of one bpm, so you make sure the buffer has 120 frames.

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 beatTick: GE

    Permalink
  6. val bus: GE

    Permalink

    index of a control bus to read from.

    index of a control bus to read from. the number of channels of that bus are expected to match the numChannels argument. To track a particular audio signal, analyse it first into numChannels features, that is onset-detection-triggers, as generated by Onsets , and write the trigger-output to this control bus.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def eighthTick: GE

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def groove: GE

    Permalink
  13. def grooveTick: GE

    Permalink
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. val lock: GE

    Permalink

    If this argument is greater than 0.5, the tracker will lock at its current periodicity and continue from the current phase.

    If this argument is greater than 0.5, the tracker will lock at its current periodicity and continue from the current phase. Whilst it updates the model's phase and period, this is not reflected in the output until lock goes back below 0.5. Can be control-rate modulated.

  16. def makeUGens: UGenInLike

    Permalink

    Abstract method which must be implemented by creating the actual UGens during expansion.

    Abstract method which must be implemented by creating the actual UGens during expansion. This method is at most called once during graph expansion

    returns

    the expanded object (depending on the type parameter U)

    Attributes
    protected
    Definition Classes
    BeatTrack2Expander
  17. final def name: String

    Permalink
    Definition Classes
    UGenSource
  18. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  21. val numChannels: GE

    Permalink

    (scalar) How many features (ie how many control bus channels) are provided (init-time only)

  22. def phase: GE

    Permalink
  23. val phaseSpacing: GE

    Permalink

    (scalar) Relates to how many different phases to test.

    (scalar) Relates to how many different phases to test. At the default of 0.02 seconds, 50 different phases spaced by those 0.02 seconds would be tried out for 60bpm; 16 would be trialed for 180 bpm. Larger phaseSpacing means more tests and more CPU cost.

  24. final def rate: Rate

    Permalink
    Definition Classes
    ControlRated
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def tempo: GE

    Permalink
  27. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. val weighting: GE

    Permalink

    (scalar) Use (-2.5) for flat weighting of tempi, (-1.5) for compensation weighting based on the number of events tested (because different periods allow different numbers of events within the temporal window).

    (scalar) Use (-2.5) for flat weighting of tempi, (-1.5) for compensation weighting based on the number of events tested (because different periods allow different numbers of events within the temporal window). If an integer from 0 upwards is given, this is specifying the ID of a buffer containing 120 frames which represent individual tempo weights; tempi go from 60 to 179 bpm in steps of one bpm, so you make sure the buffer has 120 frames.

  31. val winSize: GE

    Permalink

    (scalar) Size of the temporal window desired (2.0 to 3.0 seconds models the human temporal window).

    (scalar) Size of the temporal window desired (2.0 to 3.0 seconds models the human temporal window). You might use longer values for stability of estimate at the expense of reactiveness.

Inherited from Serializable

Inherited from Serializable

Inherited from IsIndividual

Inherited from ControlRated

Inherited from MultiOut

Inherited from SomeOut

Inherited from GE.Lazy

Inherited from GE

Inherited from UGenSource[UGenInLike]

Inherited from Expander[UGenInLike]

Inherited from Lazy

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped