Norns: engine.list_commands() doesn't return anything

Hey there,

I’m stuck with a peculiar scripting problem. I tried to implement a sound engine into my sequencer script and it isn’t working. I have tried running the tab.print(engine.names) command and that does list all the available engines. However when I type this:

function init()
  -- Initialize engine
  engine.name = "PolyPerc"
  engine.list_commands()
end

This is the command line output I get:

Command Line Output
norns.script.load("code/Sar-TR/Sar-TR.lua")
# script load: /home/we/dust/code/Sar-TR/Sar-TR.lua
# cleanup
# script clear
ERROR (i2c/hp) failed to write
pset >> write: /home/we/dust/data/system.pset
# script run
>> reading PMAP /home/we/dust/data/Sar-TR/Sar-TR.pmap
m.read: /home/we/dust/data/Sar-TR/Sar-TR.pmap not read.
<ok>
Engine.register_commands; count: 0
___ engine commands ___
___ polls ___
amp_in_l
amp_in_r
amp_out_l
amp_out_r
cpu_avg
cpu_peak
pitch_in_l
pitch_in_r
# script init
___ engine commands ___

When I try to access one of the engine parameters (say engine.hz()) the script returns an error because I try to access a nil value. So it seems like it isn’t a purely cosmetic error either.

Any help on this would be very much appreciated!

Cheers,
Leon

move the engine name command outside init, to the top of your code

2 Likes

That solved it. Thanks alot!!