Skip to content

eventcycles

Read absolute time in k-rate cycles, since the start of an instance of an instrument.

Called at both i-time as well as k-time. NB: the returned value at k-time starts at 1

Syntax

kres eventcycles

Performance

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

sr    = 44100
kr    = 6300
ksmps = 7

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

eventcycles produces a k-rate variable for output. There are no input parameters.

eventcycles is similar to elapsedcycles except it returns the time since the start of this instance of the instrument.

📝 Note

eventcycles acts like timeinstk but it returns the correct values instead of being one cycle late.

See also

Time Reading

Credits

Author: Eduardo Moguillansky
August 2022