SendPeakRMS: table of contents
Filter:
Classes | UGens > Analysis > Amplitude

SendPeakRMS : UGen : AbstractFunction : Object

Track peak and power of a signal for GUI applications.
Source: Trig.sc

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

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

SendPeakRMS.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;