ftmorf

ftmorf — Morphs between multiple ftables as specified in a list.

Description

Uses an index into a table of ftable numbers to morph between adjacent tables in the list.This morphed function is written into the table referenced by iresfn on every k-cycle.

Syntax

ftmorf kftndx, iftfn, iresfn

Initialization

iftfn -- The ftable function. The list of values are expected to be pre-existing ftable numbers.

iresfn -- Table number of the morphed function

The length of all the tables in iftfn must equal the length of iresfn.

Performance

kftndx -- the index into the iftfn table.

If iftfn contains (6, 4, 6, 8, 7, 4):

  • kftndx=4 will write the contents of f7 into iresfn.

  • kftndx=4.5 will write the average of the contents of f7 and f4 into iresfn.

Examples

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

Example 175. Example of the ftmorf 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
; Audio out   Audio in
-odac           -iadc    ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o ftmorf.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
kr = 4410
ksmps = 10
nchnls = 1

instr 1
kndx    line    0, p3, 7
        ftmorf  kndx, 1, 2
asig    oscili  30000, 440, 2
        out     asig
endin


</CsInstruments>
<CsScore>

f1 0 8 -2 3 4 5 6 7 8 9 10
f2 0 1024 10 1 /*contents of f2 dont matter */
f3 0 1024 10 1
f4 0 1024 10 0 1
f5 0 1024 10 0 0 1
f6 0 1024 10 0 0 0 1
f7 0 1024 10 0 0 0 0 1
f8 0 1024 10 0 0 0 0 0 1
f9 0 1024 10 0 0 0 0 0 0 1
f10 0 1024 10 1 1 1 1 1 1 1

i1 0 10
e


</CsScore>
</CsoundSynthesizer>


Credits

Author: William “Pete” Moss
University of Texas at Austin
Austin, Texas USA
Jan. 2002

New in version 4.18