specscal
Prev | Orchestra Opcodes and Operators | Next

## specscal

specscal — Scales an input spectral datablock with spectral envelopes.

## Description

Scales an input spectral datablock with spectral envelopes.

## Syntax

    wsig specscal wsigin, ifscale, ifthresh

## Initialization

ifscale -- scale function table. A function table containing values by which a value's magnitude is rescaled.

ifthresh -- threshold function table. If ifthresh is non-zero, each magnitude is reduced by its corresponding table-value (to not less than zero)

## Performance

wsig -- the output spectrum

wsigin -- the input spectra

Scales an input spectral datablock with spectral envelopes. Function tables ifthresh and ifscale are initially sampled across the (logarithmic) frequency space of the input spectrum; then each time a new input spectrum is sensed the sampled values are used to scale each of its magnitude channels as follows: if ifthresh is non-zero, each magnitude is reduced by its corresponding table-value (to not less than zero); then each magnitude is rescaled by the corresponding ifscale value, and the resulting spectrum written to wsig.

## Examples

      wsig2    specdiff         wsig1               ; sense onsets
      wsig3    specfilt         wsig2, 2            ; absorb slowly
               specdisp         wsig2, .1           ; & display both spectra
               specdisp         wsig3, .1

## See Also

specaddm, specdiff, specfilt, spechist

Prev | Up | Next
specptrk | Home | specsum