kr rms asig[, ihp, istor]
nr gain asig, krms[, ihp, istor]
ar balance asig, acomp[, ihp, istor]
The rms power of asig can be interrogated, set, or adjusted to match that of a comparator signal.istor (optional) - initial disposition of internal data space ( see reson). The default value is 0.
gain provides an amplitude modification of asig so that the output ar has rms power equal to krms. rms and gain used together (and given matching ihp values) will provide the same effect as balance.
balance outputs a version of asig, amplitude-modified so that its rms power is equal to that of a comparator signal acomp. Thus a signal that has suffered loss of power (eg., in passing through a filter bank) can be restored by matching it with, for instance, its own source. It should be noted that gain and balance provide amplitude modification only - output signals are not altered in any other respect.
Example:
asrc buzz 10000,440, sr/440, 1 ; band-limited pulse train
a1 reson asrc, 1000,100 ; sent through
a2 reson a1,3000,500 ; 2 filters
afin balance a2, asrc ; then balanced with source