printks2Signal I/O:Printing and Displayprintks2printks2
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.
Syntaxprintks2 "string", kvalInitialization"string" -- the text string to be
used as a format.
Performancekval -- 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 CodeCharacter Code\\r, \\R, %r, or %Rreturn character (\r)\\n, \\N, %n, %Nnewline character (\n)\\t, \\T, %t, or %Ttab 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 alsoPrinting and DisplayCreditsAuthor: &namejohn;Bath, UKMar 2014New in Csound version 6.03