SuperCollider CLASSES

SendPeakRMS

Track peak and power of a signal for GUI applications.
Inherits from: UGen : AbstractFunction : Object

Description

The SendPeakRMS unit generator computes peak and power of a signal and sends the computed values back to the clients. It does not produce any output.

Class Methods

*ar (sig, replyRate: 20, peakLag: 3, cmdName: '/reply', replyID: -1)

*kr (sig, replyRate: 20, peakLag: 3, cmdName: '/reply', replyID: -1)

Unlike with other unit generators, the ar and kr methods do not specify the rate of the computation, but the granularity. When the SendPeakRMS ugen is instantiated with kr, the reply rate id quantized to control-rate blocks.

Arguments:

sig

The input signal.

replyRate

Float or Integer. Specifies the number of replies that are sent to the clients per second.

peakLag

Float or Integer. Lag time, which is applied to the peak values. This option is commonly used for GUI VU meters.

cmdName

Symbol or String. Address pattern for reply message.

replyID

Integer ID (similar to SendTrig).

Inherited class methods

Instance Methods

Inherited instance methods

Examples

(
{
    SendPeakRMS.kr(Dust.ar(20), 20, 3, "/replyAddress")
}.play;
)

(
o = OSCFunc({ |msg|
    "peak: %, rms: %".format(msg[3], msg[4]).postln
}, '/replyAddress');
)
o.free;