pvscfs
Prev | Orchestra Opcodes and Operators | Next

## pvscfs

pvscfs — Cepstrum all-pole coefficient analysis.

## Description

This opcode takes in a pvs signal in AMP_* format, applies the cepstrum transform and computes the coefficients for a an allpole filter

## Syntax

    kCoef[],krms,kerr  pvscfs fsig, iord[,imod]

## Initialization

iord -- all-pole filter order.

imod -- filter stabilisation mode (0=no stabilisation; 1= pole reflection; 2 = pole limiting; defaults to 1).

## Performance

kCoef[] -- all-pole filter coefficients (iord-size array)

krms - RMS estimate of source signal.

kerr - error (or residual).

fsig -- pvs signal input in PV_AMP_* format.

This opcode is part of a suite of streaming linear prediction opcodes. It takes an fsig, applies a cepstrum transform, retaining iord coefficients, and computes the coefficient for an all-pole filter. Unlike in the linear prediction case, the resulting filter may be unstable. To resolve this, two stabilisation methods are offered: poles can be reflected inside the unit circle, or limited to it. This is somewhat computationally intensive, so there is also the option of turning it off (if the particular use case allows).

## Examples

Here is an example of the pvscfs opcode using an audio input signal as lpc source. It uses the file pvscfs.csd.

Example 790. Example of the pvscfs opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsOptions>
    -odac -d
    </CsOptions>
    <CsInstruments>

    sr = 44100
    ksmps = 64
    nchnls = 1
    0dbfs = 1

    instr 1
    a1 diskin "fox.wav",1,0,1
    a2 diskin "flute.aiff",1,0,1
    fenv pvsanal a1,1024,256,1024,1
    kcfs[],krms,kerr pvscfs fenv,30
    a3 allpole a2*krms*kerr,kcfs
    a3 dcblock a3
    out a3
    endin

    </CsInstruments>
    <CsScore>
    i1 0 30
    </CsScore>
    </CsoundSynthesizer>

## See Also

lpcfilter, allpole

Prev | Up | Next
pvsceps | Home | pvscross