printks2 Signal I/O:Printing and Display printks2 printks2 Prints a new value every time a control variable changes using a printf() style syntax. Description Prints a new value every time a control variable changes using a printf() style syntax. Syntax printks2 "string", kval Initialization "string" -- the text string to be used as a format. Performance kval -- signal to be printed. The style of printing is specified in string with the standard C value specifier (%f, %d, etc.). Print Output Formatting All standard C language printf() control characters may be used. For example, if kval1 = 153.26789 then some common formatting options are: %f prints with full precision: 153.26789 %5.2f prints: 153.26 %d prints integers-only: 153 %c treats kval1 as an ascii character code. In addition to all the printf() codes, printks2 supports these useful character codes: printks2 Code Character Code \\r, \\R, %r, or %R return character (\r) \\n, \\N, %n, %N newline character (\n) \\t, \\T, %t, or %T tab character (\t) %! semicolon character (;) This was needed because a ; is interpreted as an comment. ^ escape character (0x1B) ^ ^ caret character (^) ˜ ESC[ (escape+[ is the escape sequence for ANSI consoles) ˜˜ tilde (˜) For more information about printf() formatting, consult any C language documentation. Examples Here is an example of the printks2 opcode. It uses the file printks2.csd. Example of the printks2 opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also Printing and Display Credits Author: &namejohn; Bath, UK Mar 2014 New in Csound version 6.03