fini Signal I/O:File I/O fini fini Read signals from a file at i-rate. Description Read signals from a file at i-rate. Syntax fini ifilename, iskipframes, iformat, in1 [, in2] [, in3] [, ...] Initialization ifilename -- input file name (can be a string or a handle number generated by fiopen) iskipframes -- number of frames to skip at the start (every frame contains a sample of each channel) iformat -- a number specifying the input file format. If a header is found, this argument is ignored. 0 - floating points in text format (loop; see below) 1 - floating points in text format (no loop; see below) 2 - 32 bit floating points in binary format (no loop) Performance fini is the complement of fouti and foutir. It reads the values each time the corresponding instrument note is activated. When iformat is set to 0 and the end of file is reached, the file pointer is zeroed. This restarts the scan from the beginning. When iformat is set to 1 or 2, no looping is enabled and at the end of file the corresponding variables will be filled with zeroes. Please note that since this opcode generates its output using input parameters (on the right side of the opcode), these variables must be initialized before use, otherwise a 'used before defined' error will occur. You can use the init opcode for this. Examples Here is an example of the fini opcode. It uses the file fini.csd. Example of the fini opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. Note that this example requires the file test.txt to be created, for example by fouti See also File Input and Output Credits Author: &namegabriel; Italy 1999 New in Csound version 3.56