fprintks Signal I/O:File I/O fprintks fprintks Similar to printks but prints to a file. Description Similar to printks but prints to a file. Syntax fprintks "filename", "string", [, kval1] [, kval2] [...] Initialization "filename" -- name of the output file. "string" -- the text string to be printed. Can be up to 8192 characters and must be in double quotes. Performance kval1, kval2, ... (optional) -- The k-rate values to be printed. These are specified in string with the standard C value specifier (%f, %d, etc.) in the order given. fprintks is similar to the printks opcode except it outputs to a file and does not have a itime parameter. For more information about output formatting, please look at printks's documentation. Examples Here is an example of the fprintks opcode. It uses the file fprintks.csd. Example of the fprintks opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. This example will generate a file called my.sco. It should contain lines like this: i1 0.00 1.35 668.01 i1 0.13 2.21 246.53 i1 0.22 1.88 437.51 i1 1.18 9.65 126.09 Here is an example of the fprintks opcode, which converts a standard MIDI file to a csound score. It uses the file fprintks-2.csd. Example of the fprintks opcode to convert a MIDI file to a csound score. This example will generate a file called MIDI2cs.sco containing i-events according to the MIDI file Here is an advanced example of the fprintks opcode, which generates scores for Csound. It uses the file scogen-2.csd. Example of the fprintks opcode to create a Csound score file generator using Csound. This example will generate a file called schottstaedt.sco which can be used as a score together with schottstaedt.orc See also File Input and Output Credits Author: &namematt; January 2003