readclockInstrument Control:Time Readingreadclockreadclock
Reads the value of an internal clock.
Description
Reads the value of an internal clock.
Syntaxir readclock inumInitializationinum -- the number of a clock. There are 32 clocks numbered 0 through 31. All other values are mapped to clock number 32.
ir -- value at i-time, of the clock specified by inumPerformance
Between a clockon and a clockoff opcode, the CPU time used is accumulated in the clock. The precision is machine dependent but is the millisecond range on UNIX and Windows systems. The readclock opcde reads the current value of a clock at initialization time.
Examples
Here is an example of the readclock opcode. It uses the file readclock.csd.
Example of the readclock opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
Its output should include lines like this:
instr 1: i1 = 0.000
instr 1: i1 = 90.000
instr 1: i1 = 180.000
See Alsoclockoff, clockonCreditsAuthor: &namejohn;University of Bath/Codemist Ltd.Bath, UKJuly, 1999Example written by &namekevin;.New in Csound version 3.56