Module metro

high-resolution metro API

Functions

Metro.init (arg, arg_time, arg_count) initialize a metro.
Metro.new (id) constructor.
Metro:start (time, count, stage) start a metro.
Metro:stop () stop a metro.
Metro.__index (self, idx) class custom .__index.

Global Functions

norns.metro (idx, stage) callback on metro tick from C.


Functions

Metro.init (arg, arg_time, arg_count)
initialize a metro. assigns unused id.

Parameters:

  • arg callback function
  • arg_time time period between ticks (seconds).
  • arg_count number of ticks. infinite by default.
Metro.new (id)
constructor.

Parameters:

  • id integer : identifier
Metro:start (time, count, stage)
start a metro.

Parameters:

  • time - (optional) time period between ticks (seconds.) by default, re-use the last period
  • count - (optional) number of ticks. infinite by default
  • stage - (optional) initial stage number (1-based.) 1 by default
Metro:stop ()
stop a metro.
Metro.__index (self, idx)
class custom .__index. [] accessor returns one of the static metro objects.

Parameters:

  • self
  • idx

Global Functions

norns.metro (idx, stage)
callback on metro tick from C.

Parameters:

  • idx
  • stage
generated by LDoc 1.4.6 Last updated 2019-04-04 20:07:57