ftlptim
Prev | Orchestra Opcodes and Operators | Next

## ftlptim

ftlptim — Returns the loop segment start-time of a stored function table number.

## Description

Returns the loop segment start-time of a stored function table number.

## Syntax

    ftlptim(x) (init-rate args only)

## Performance

Returns the loop segment start-time (in seconds) of stored function table number x. This reports the duration of the direct recorded attack and decay parts of a sound sample, prior to its looped segment. Returns zero (and a warning message) if the sample does not contain loop points.

## Examples

Here is an example of the ftlptim opcode. It uses the files ftlptim.csd, and Church.wav.

Example 398. Example of the ftlptim 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 ftlptim.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    instr 1

    itim = ftlptim(1)
         print itim
    aout loscil3 .8, 40, 1
         outs aout, aout

    endin
    </CsInstruments>
    <CsScore>
    f 1 0 0 1 "Church.wav" 0 0 0 ;Csound computes tablesize

    i 1 0 5
    e
    </CsScore>
    </CsoundSynthesizer>

The audio file “Church.wav” is a looped sample, its output should include lines like these:

    Base Note : 60	Detune    : 0
    Low  Note : 0	High Note : 127
    Low  Vel. : 0	High Vel. : 127
    Gain      : 1	Count     : 1
    mode      : 801
    start     : 4529	end       : 4912	count  :0
    mode      : 0
    start     : 0	end       : 0	count  :0

## See also

Table Control:Table Queries

## Credits

Author: Barry L. Vercoe
MIT
Cambridge, Massachussetts
1997

Prev | Up | Next
ftloadk | Home | ftmorf