ftprint
Prev | Orchestra Opcodes and Operators | Next

## ftprint

ftprint — Print the contents of a table (for debugging)

## Description

Plugin opcode in emugens.

Prints the contents of a table (for debugging). It works at k-time, a trigger controls when to print (use ktrig=1, which is the default, to print only at i-time)

## Syntax

    ftprint ifn [, ktrig, kstart, kend, kstep, inumcols ]

## Initialization

ifn - The table to print

inumcols - The number of elements to print in one column (default = 10)

## Performance

ktrig - The table will be printed whenever this value changes from 0 to possitive. Can be used together with metro to print at a given time interval. A value of -1 indicates to print at each k-cycle (default = 1)

kstart - The first index to print. (default = 0)

kend - The end index to print (non inclusive). (default = length of table)

kstep - How many elements to skip (default = 1)

## Examples

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

Example 375. Example of the ftprint opcode.

    <CsoundSynthesizer>
    <CsOptions>
    ;-odac     ;;;realtime audio out

    </CsOptions>
    <CsInstruments>

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

    ; This is the example file for ftprint

    /*

      ftprint

      Print the contents of an f-table
      (mostly for debuggin purposes)

      ftprint ifn, ktrig=1, kstart=0, kend=0, kstep=1, inumcols=0

      ifn: the table to print
      ktrig: table will be printed whenever this changes
             from non-positive to positive
      kstart: start index
      kend: end index (non inclusive)
      kstep: number of elements to skip
      inumcols: number of elements to print per line

      See also: printarray

    */

    instr 1
      ifn   ftgentmp 0, 0, -13, -2,  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

      ; print all elements
      ftprint ifn

      ; print all elements in columns of 4 elements
      ftprint ifn, 1, 0, 0, 1, 4

      ; print only the first 5 elements
      ftprint ifn, 1, 0, 5

      turnoff
    endin

    </CsInstruments>

    <CsScore>
    i 1 0 0.01
    </CsScore>

    </CsoundSynthesizer>

## See Also

printarray, printf

## Credits

By: Eduardo Moguillansky 2018

New plugin in version 6.12

Prev | Up | Next
ftom | Home | ftsamplebank