pvstencil
Prev | Orchestra Opcodes and Operators | Next

## pvstencil

pvstencil — Transforms a pvoc stream according to a masking function table.

## Description

Transforms a pvoc stream according to a masking function table; if the pvoc stream amplitude falls below the value of the function for a specific pvoc channel, it applies a gain to that channel.

The pvoc stream amplitudes are compared to a masking table, if the fall below the table values, they are scaled by kgain. Prior to the operation, table values are scaled by klevel, which can be used as masking depth control.

Tables have to be at least fftsize/2 in size; for most GENS it is important to use an extended-guard point (size power-of-two plus one), however this is not necessary with GEN43.

One of the typical uses of pvstencil would be in noise reduction. A noise print can be analysed with pvanal into a PVOC-EX file and loaded in a table with GEN43. This then can be used as the masking table for pvstencil and the amount of reduction would be controlled by kgain. Skipping post-normalisation will keep the original noise print average amplitudes. This would provide a good starting point for a successful noise reduction (so that klevel can be generally set to close to 1).

Other possible transformation effects are possible, such as filtering and `inverse-masking'.

## Syntax

    fsig pvstencil fsigin, kgain, klevel, iftable

## Performance

fsig -- output pv stream

fsigin -- input pv stream.

kgain -- `stencil' gain.

klevel -- masking function level (scales the ftable prior to `stenciling') .

iftable -- masking function table.

| Warning
It is unsafe to use the same f-variable for both input and output of pvs opcodes. Using the same one might lead to undefined behavior on some opcodes. Use a different one on the left and right sides of the opcode.

## Examples

Example 796. Example

    fsig    pvsanal   asig, 1024, 256, 1024, 1
    fclean  pvstencil fsig, 0, 1, 1
    aclean  pvsynth   fclean

## Credits

Author: Victor Lazzarini
November 2004

New plugin in version 5

November 2004.

Prev | Up | Next
pvstanal | Home | pvstrace