pvshift
Prev | Orchestra Opcodes and Operators | Next

## pvshift

pvshift — Shift the frequency components of a pv stream, stretching/compressing its spectrum.

## Description

Shift the frequency components of a pv stream, stretching/compressing its spectrum.

## Syntax

    fsig pvshift fsigin, kshift, klowest[, ikeepform, igain]

## Performance

fsig -- output pv stream

fsigin -- input pv stream

kshift -- shift amount (in Hz, positive or negative).

klowest -- lowest frequency to be shifted.

ikeepform -- attempt to keep input signal formants; 0: do not keep formants; 1: keep formants by imposing original amps; 2: keep formants by filtering using the original spec envelope (defaults to 0).

igain -- amplitude scaling (defaults to 1).

This opcode will shift the components of a pv stream, from a certain frequency upwards, up or down a fixed amount (in Hz). It can be used to transform a harmonic spectrum into an inharmonic one. The ikeepform flag can be used to try and preserve formants for possibly interesting and unusual spectral modifications.

| 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 400. Example

    asig  in                                 ; get the signal in

    fsig  pvsanal   asig, 1024, 256, 1024, 1 ; analyse it
    ftps  pvshift   fsig, 100, 0             ; add 100 Hz to each component
    atps  pvsynth   ftps                     ; synthesise it

Depending on the input, this will transform a pitched sound into an inharmonic, bell-like sound.

## Credits

Author: Victor Lazzarini
November 2004

New plugin in version 5

Nivember 2004.

Prev | Up | Next
pvsfwrite | Home | pvsifd