Norns: scripting



I use Notepad++. Minimal, versatile, totally customizable. Oh and it’s pretty fast.


+1 more for Sublime txt :slight_smile:


if you use vim/emacs, major bonus that it’s identical on all platforms :wink:


Vim is my go to. It’s incredibly powerful and fast once you learn the shortcuts.


another +1 for sublime text… for more ‘involved’ work (or integration) - Linux x86/mac OS

VI for lightweight/quick changes ,or terminal/ssh work, as works on any platform.


If my Lua questions should go elsewhere, let me know… In the meantime:

When I’m working with smallish number ranges (like the 1-8 selection for sequences in Walkabout), I would like to have less encoder sensitivity. I found the set_sens function in encoders.lua, but am not sure how to use it. If I put the following in my script:

local Encoders = require 'encoders'
Encoders.set_sens(0, 0.01) -- (should lower the encoder sensitivity for all 3 encoders)

… it doesn’t seem to accomplish anything. What am I missing?



(not sure this is the right place for this!?)

@tehn ,I was playing with Earthsea yesterday (latest build) looking at the midi, as i wanted to play with the new api

I noticed whilst this is working , its not using the new virtual devices, as I could not force it to use a particular midi device - it used all.

my assumption is that the recommendation is to move away from midi_add setting d.event .

rather we should do something like:
(pseudo code, had it working last night, but didn’t save it)

local midi as Midi.connect(1)


if midi then midi.event = midi_event end

the difference is…
midi virtual device by default is all, so for most users it wont appear any different,
but it allows the user to use the System menu to now choose a specific device if they want.

also I thought the midi refactoring was going to include filtering , seems odd that every script writer should have to still need to know the midi code for note_on :slight_smile:
perhaps if this was not wanted to be ‘hardcoded’ in norns (not sure why not, midi spec is pretty static), then perhaps some canned functions in dust/lib?

so we do something like
midi.event = stdmidi_handler(note_on, note_off, cc)

(where params are funcs and can be nil if your not interested in handling these midi messages)


If anyone wants to help me track down a semantic error on a Saturday night, pm me! Having a really hard time finding it in my script.


Has anyone implemented a 14-bit MIDI control script in LUA? I made the below SuperCollider class with the help of 10-year old forum posts to help me connect up my Sensel Morph and use the 14-bit X, Y, Z values more easily. Can anyone help me adapt this to LUA for the norns?




Is this a mod of flin, or something new? Either way it looks exciting!


@artfwo 's code for flin was heavily copied in the making of it. It’s a super simple but very fun bouncing lights app.


I know a SoftCut study will come later, but I’m having a hard time achieving reverse playback of a buffer without severe glitching. poking around @tehn’s MLR script confirms it should be do-able, but any time I livecode engine.rate(1,-1) in maiden as a test in halfsecond (after freezing the buffer) the engine spazzes.

any pro-tips ahead of the study would be raaaaaad, but not expected <3 (just looking to add reverse as options in cranes before pushing it to GH)


lol, yesterday I ported the Aleph grid tutorial to a Norns script. Would a documented tutorial be useful too?




@lazzarello nice work! much of this will be overlap with the forthcoming (this week) midi/grid study, so i’d hesitate to merge it at this point.

@Dan_Derks i’ve also seen some glitch/crash business with SoftCut and need to spend more time figuring out what’s going on. if you have a simple, commonly reproducible crash situation please do file a github issue for it!


Starting a library of drawing functions. I’m not well versed in the flow of github right now, but I’ve got my functions on a single script here. It would be cool to get more together.


If I make a lua library of functions (a separate file from my main script) - this does not get recompiled (or whatever) when the main script is re-run from maiden.

The only way I could get the changes to the lib to show up is to “run script” on the library.

Bug or Feature?


(lua) feature, i think.
require 'foo' - searches for foo.lua in all available paths (see the paths we add in norns/lua/config.lua), runs once and stores in package cache
dofile('foo.lua') - always executes foo.lua in the current directory


Therefore… using require, how does one get the library to reload/recompile?

(I was previously trying to just have some functions load in, but have updated to proper library module format)