Module engine

Engine class

The norns script reference has examples for this module.

Functions

register (data, count) register all available engines.
register_commands (data, count) populate the current engine object with available commands.
add_command (id, name, fmt) add a command to the current engine.
list_commands () print all commands reported from the engine
load (name, callback) load a named engine, with a callback.
__index (self, idx) custom getters.


Functions

register (data, count)
register all available engines. called from OSC handler.

Parameters:

  • data
    • an array of strings
  • count
    • number of names
register_commands (data, count)
populate the current engine object with available commands. called from OSC handler. NB: we can count on the order of entries to be meaningful

Parameters:

  • data
    • array of [name, format]
  • count
    • number of commands
add_command (id, name, fmt)
add a command to the current engine.

Parameters:

  • id
    • integer index
  • name
    • command name (string)
  • fmt
    • OSC format string (e.g. 'isf' for "int string float")
list_commands ()
print all commands reported from the engine
load (name, callback)
load a named engine, with a callback.

Parameters:

  • name
    • name of engine
  • callback
    • function to call on engine load. will receive command list

Returns:

    • false if an engine load is already pending (nothing happens), true otherwise
__index (self, idx)
custom getters. [] accessor returns a command function; this allows e.g. engine.hz(100)

Parameters:

  • self
  • idx
generated by LDoc 1.5.0 Last updated 2024-10-13 17:45:04