rsc3/doc-schelp/HelpSource/Classes/SendPeakRMS.schelp

68 lines
1.3 KiB
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
CLASS:: SendPeakRMS
summary:: Track peak and power of a signal for GUI applications.
related:: Classes/Peak, Classes/PeakFollower, Classes/OSCFunc
categories:: UGens>Analysis>Amplitude
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.
CLASSMETHODS::
private:: new1
method::ar, kr
Unlike with other unit generators, the code::ar:: and code::kr:: methods do not
specify the rate of the computation, but the granularity. When the SendPeakRMS ugen
is instantiated with code::kr::, the reply rate id quantized to control-rate
blocks.
argument::sig
The input signal.
argument::replyRate
Float or Integer. Specifies the number of replies that are sent to the clients
per second.
argument::peakLag
Float or Integer. Lag time, which is applied to the peak values. This option is
commonly used for GUI VU meters.
argument::cmdName
Symbol or String. Address pattern for reply message.
argument::replyID
Integer ID (similar to link::Classes/SendTrig::).
INSTANCEMETHODS::
private:: numOutputs, writeOutputSpecs
EXAMPLES::
code::
(
{
SendPeakRMS.kr(Dust.ar(20), 20, 3, "/replyAddress")
}.play;
)
(
o = OSCFunc({ |msg|
"peak: %, rms: %".format(msg[3], msg[4]).postln
}, '/replyAddress');
)
o.free;
::