elapsedcycles

elapsedcycles — Read absolute time in k-rate cycles.

Description

Read absolute time, in k-rate cycles, since the start of the performance.

Syntax

ires elapsedcycles
kres elapsedcycles

Performance

elapsedcycles is for time in k-rate cycles. So with:

  sr    = 44100
  kr    = 6300
  ksmps = 7

then after half a second, the elapsedcycles opcode would report 3150. It will always report an integer.

elapsedcycles can produce a k-rate variable for output. There are no input parameters.

elapsedcycles can also operate only at the start of the instance of the instrument. It produces an i-rate variable (starting with i or gi) as its output.

[Note] Note

elapsedcycles acts like timek but it returns the correct values instead of being one cycle late.

See Also

eventcycles, eventtime, elapsedtime.

Credits

Author: Eduardo Moguillansky
August 2022