ftmorf
Prev | Orchestra Opcodes and Operators | Next

## 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 table containing the numbers of any existing tables which are used for the morphing.

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.

| Note
iresfn is only updated if the morfing index changes it's value, if kftindx is static, no writing to iresfn will occur.

## Examples

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

Example 305. 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
    -odac     ;;;realtime audio out
    ;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o ftmorf.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    instr 1

    kndx  line   0, p3, 7
          ftmorf kndx, 1, 2
    asig  oscili .8, 440, 2
          outs   asig, 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 15
    e
    </CsScore>
    </CsoundSynthesizer>

## Credits

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

New in version 4.18

Prev | Up | Next
ftlptim | Home | ftsave