Class metro

high-resolution metro API

Functions

Metro.init (arg, arg_time, arg_count) initialize a metro.
Metro.free (id) free
Metro.free_all () free all
Metro.new (id) constructor.
Metro:start ([time[, count[, stage]]]) start a metro.
Metro:stop () stop a metro.

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 function callback function
  • arg_time number time period between ticks (seconds).
  • arg_count number number of ticks. infinite by default.
Metro.free (id)
free

Parameters:

  • id number
Metro.free_all ()
free all
Metro.new (id)
constructor.

Parameters:

  • id integer : identifier

Returns:

    Metro
Metro:start ([time[, count[, stage]]])
start a metro.

Parameters:

  • time number - time period between ticks (seconds.) by default, re-use the last period (optional)
  • count number - number of ticks. infinite by default (optional)
  • stage number - initial stage number (1-based.) 1 by default (optional)
Metro:stop ()
stop a metro.

Global Functions

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

Parameters:

  • idx
  • stage
generated by LDoc 1.4.6 Last updated 2020-03-28 23:45:19