Runes

Runes

Live-coding Norns screen in the browser

Runes is a tool for rapidly prototyping Norns screen code. Runes executes the screen and Lua (weaver) modules from Matron in the browser. The code in the editor is re-evaluated on every single change in order to redraw the canvas.

I built Runes because I wanted immediate feedback on the UI code I was writing. The first version was shared a little over a year ago in the Norns study group discord. I’ve cleaned up the UI a tiny bit since then and added a couple small features. There’s a lot more that could be done to improve Runes! I think it’s in an MVP state right now, so my goal is to share it more broadly and get feedback. I would love to collaborate if anyone finds it valuable and is interested in contributing!

Requirements

A modern web browser

  • Chrome is the best experience
  • Firefox works but may not be as responsive. Firefox does not support offscreen canvas, so an infinite loop in the Lua code will block the main thread and make the page unresponsive.
  • Safari is no longer scaling correctly on my M1 mac as of the latest version, but works fine on the Intel macs that I’ve tested, so YMMV

Documentation

See the comments in the editor for documentation on the most important features. All UI controls have tooltips that give a brief explanation of what they do.

Limitations

Runes runs a pared down version of Matron: only the config, screen and weaver modules are loaded. There is no support for clock, IO, audio, etc. All Lua code that depends on unsupported features has been disabled. Only the screen and util libraries are available in the global scope. However, you can require most of the other Lua lib modules as long as they don’t depend on modules that have been disabled.

Runes emulates the key and encoder inputs, but it does not use the Matron module for this. The encoders do not currently have acceleration and the sensitivity may be different on the actual Norns hardware.

The image functions in the screen library will not have any visible effect. The browser Matron has its own virtual filesystem that is not yet integrated with Runes. This may change in the future!

The Runes Matron fork is up-to-date with the Norns main branch at the time of writing, but it may fall behind temporarily or permanently in the future.

Links

GitHub

Norns fork

47 Likes

a dream come true. .

9 Likes

^this^ :heart:

Been hitting cmd + p in maiden a LOT lately just to check if pixels are in the right place. Thank you for this!

4 Likes

@midouest thanks so much for sharing this!!! it is such an incredible tool and I’m still mind-boggled on how you managed to port things to the web - utterly brilliant.

I can say with certainty that this tool has been a gamechanger for me for writing norns scripts. making UIs takes iterations and your website reduces the time it takes by an order of magnitude. I’ve been using it for the past year and love it. I recommend it to anyone starting scripting, its so nice to get a grasp on the lua screen language with the instant feedback.

12 Likes

extremely useful! thanks!

gotta redo my norns studies again

2 Likes

This looks great @midouest! Thanks so much for sharing. It will make UI development much easier, when I get back to working on Norns scripts again.

2 Likes