Skip to content

cepsinv

Calculate the inverse cepstrum of an array.

Syntax

kenv = cepsinv(keps[])
kenv cepsinv keps[]

Performance

keps[] -- the cepstrum input, an array of size N+1, where N is power-of-two, containing the cepstral coefficients.

kenv -- the inverse cepstrum (spectral envelope), an array of N+1 magnitudes.

Examples

Here is an example of the use of the cepsinv opcode. It uses the file cepsinv-modern.csd.

Example of the _cepsinv_ opcode.
<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>

instr 1
  a1 = diskin("fox.wav", 1, 0, 1)
  k1 = randh(80, 2.5)
  a2 = vco2(8, 220+k1)
  fsig = pvsanal(a1, 1024, 256, 1024, 1)
  fsig2 = pvsanal(a2, 1024, 256, 1024, 1)
  keps[] = pvsceps(fsig, 30)
  kenv[] = cepsinv(keps)
  fenv = tab2pvs(r2c(kenv))
  out(pvsynth(pvsfilter(fsig2, fenv, 1)))
endin

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

Here is an example of the use of the cepsinv opcode. It uses the file cepsinv.csd.

Example of the _cepsinv_ opcode.
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

instr 1

a1 diskin "fox.wav",1,0,1
k1 randh  80, 2.5
a2 vco2  8, 220+k1
fsig pvsanal a1,1024,256,1024,1
fsig2 pvsanal a2,1024,256,1024,1
keps[] pvsceps fsig,30
kenv[] cepsinv keps
fenv tab2pvs r2c(kenv)
fvoc pvsfilter fsig2, fenv, 1
asig pvsynth fvoc

    out asig
endin


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

See Also

Array-based spectral opcodes

Credits

Author: Victor Lazzarini
2014