tableseg

tableseg — Creates a new function table by making linear segments between values in stored function tables.

Description

tableseg is like linseg but interpolate between values in a stored function tables. The result is a new function table passed internally to any following vpvoc which occurs before a subsequent tableseg (much like lpread/lpreson pairs work). The uses of these are described below under vpvoc.

Syntax

tableseg ifn1, idur1, ifn2 [, idur2] [, ifn3] [...]

Initialization

ifn1, ifn2, ifn3, etc. -- function table numbers. ifn1, ifn2, and so on, must be the same size.

idur1, idur2, etc. -- durations during which interpolation from one table to the next will take place.

Examples

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

Example 878. Example of the tableseg opcode.

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

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac     ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o tableseg.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1
; analyze "fox.wav" with PVANAL first
iend  = p4
ktime line 0, p3, iend
      tableseg p5, p3, p6		;morph from table 1
asig  vpvoc ktime, 1, "fox.pvx"		;to table 2
      outs asig*3, asig*3

endin      
</CsInstruments>
<CsScore>
f 1 0 512 9 .5 1 0
f 2 0 512 7 0 20 1 30 0 230 0 232 1

i 1 0 10 2.7 1 2
e
</CsScore>
</CsoundSynthesizer>


See Also

pvbufread, pvcross, pvinterp, pvread, tablexseg

Credits

Author: Richard Karpen
Seattle, Wash
1997

New in version 3.44