Beatclock is just metros IIRC

see ~/norns/lua/lib/beatclock.lua

1 Like

Ok. I just rolled my own thing off of metro, it works. I need to take the time to understand all the included scripts.

I’m having trouble figuring out how to develop and explore on the supercollider side of things in an easy way. How do people do that?

It seems like my tweak a line, save and publish to see what happens I do on the lua side isn’t quite as simple for engines.

option 1:
tweak a line, enter ;restart in maiden SC REPL, see what happens

(i’d recommend copying and renaming the engine class to something local to your script, e.g. dust/code/we/lib/Engine_TestSine.sc -> dust/code/zebra/lib/Engine_ZSine.sc - important to change class name as well as filename)

option 2:
develop engine on desktop first. this gives you syntax highlighting, completion, SC help files, &c.

norns core SC classes work fine on macOS and linux. @mimetaur made this nice gist documenting the setup on mac (which we really should link from / add to the official docs):
[ https://gist.github.com/nathankoch/18346a71f1444ec8bea98a0c3c6fa365 ]

6 Likes

I got my own repo up but haven’t tested it on my device yet with the 2.0 release. I’ll do that this weekend and make the post to Library.

3 Likes

what happened with the DX7 script? not updated?

Looks like @lazzarello says this weekend prior to your post.

1 Like

does anyone know where the lua code for the ā€œlevelsā€ screen is located? wanna try and steal some code from that for a script I am working on.

All of the menu stuff currently lives in a single file. This should bring you to the mix/levels section https://github.com/monome/norns/blob/954f26da8a0362b5d657df31de26820526fc3bfc/lua/core/menu.lua#L1291

1 Like

i might suggest instead looking at the UI code inside the we folder.

3 Likes

yup, looking at both. just good to know how the levels menu are getting the live feeds from the ins/outs.

1 Like

Updated

4 Likes

Hi! I’m a new norns owner and started writing some scripts (have a bit of lua experience) :slight_smile: I have a couple of beginner questions:

  1. Can I use luarocks for third party libs?
  2. Is there something like fnutils (util functions for function programming style coding) on the norns? source
  3. Is somebody working on repl integration for vim? :smiley:
1 Like

sure. IIRC luarocks is installed by deafult (nope, i did not RC). currently if you want to stay distributable i guess you would want to point luarocks at the local script directory. (with --tree)

we’ve discussed including more libraries by default.
[ https://github.com/monome/norns/issues/479 ]

Penlight is the one that has come up. but fnutils looks like a strong candidate and i like that Hammerspoon’s libs are so focused and modular (albeit many are osx-specific.) (i’m wary of kitchen-sink libraries hiding performance pitfalls.)

not that i know of. REPL integration is via websocket by way of nanomsg. it’s not hard to make a new client, but where i’ve stopped short of doing a ā€œdemoā€ of this is in actually replacing the maiden connections. (it’s a simple pair socket; maybe some more complex topology is needed.)

1 Like

I’m not sure it is (?) - or At least I had to install manually on RasPi (as it might be new in the 2.0 build)

Also - I believe penlight is required for luarocks install - or maybe that was for ldoc? Apologies if I got that wrong

Yeah, you’re right. It’s not installed by default. Whilst it does offer a lot of possibilities it also comes with some challenges like how to get those deps installed for scripts and possible performance issues.

1 Like

you’re probably right.

penlight is needed for ldoc but not for luarocks afaik
(penlight is one of the modules in their test suite, so if you run tests you will get it)

1 Like

random find - here’s a list of font’s available in 2.0:

fonts: 
  0: 04B_03__.TTF
  1: liquid.ttf
  2: Roboto-Thin.ttf
  3: Roboto-Light.ttf
  4: Roboto-Regular.ttf
  5: Roboto-Medium.ttf
  6: Roboto-Bold.ttf
  7: Roboto-Black.ttf
  8: Roboto-ThinItalic.ttf
  9: Roboto-LightItalic.ttf
  10: Roboto-Italic.ttf
  11: Roboto-MediumItalic.ttf
  12: Roboto-BoldItalic.ttf
  13: Roboto-BlackItalic.ttf
  14: VeraBd.ttf
  15: VeraBI.ttf
  16: VeraIt.ttf
  17: VeraMoBd.ttf
  18: VeraMoBI.ttf
  19: VeraMoIt.ttf
  20: VeraMono.ttf
  21: VeraSeBd.ttf
  22: VeraSe.ttf
  23: Vera.ttf
  24: bmp/tom-thumb.bdf
  25: bmp/creep.bdf
  26: bmp/ctrld-fixed-10b.bdf
  27: bmp/ctrld-fixed-10r.bdf
  28: bmp/ctrld-fixed-13b.bdf
  29: bmp/ctrld-fixed-13b-i.bdf
  30: bmp/ctrld-fixed-13r.bdf
  31: bmp/ctrld-fixed-13r-i.bdf
  32: bmp/ctrld-fixed-16b.bdf
  33: bmp/ctrld-fixed-16b-i.bdf
  34: bmp/ctrld-fixed-16r.bdf
  35: bmp/ctrld-fixed-16r-i.bdf
  36: bmp/scientifica-11.bdf
  37: bmp/scientificaBold-11.bdf
  38: bmp/scientificaItalic-11.bdf
  39: bmp/ter-u12b.bdf
  40: bmp/ter-u12n.bdf
  41: bmp/ter-u14b.bdf
  42: bmp/ter-u14n.bdf
  43: bmp/ter-u14v.bdf
  44: bmp/ter-u16b.bdf
  45: bmp/ter-u16n.bdf
  46: bmp/ter-u16v.bdf
  47: bmp/ter-u18b.bdf
  48: bmp/ter-u18n.bdf
  49: bmp/ter-u20b.bdf
  50: bmp/ter-u20n.bdf
  51: bmp/ter-u22b.bdf
  52: bmp/ter-u22n.bdf
  53: bmp/ter-u24b.bdf
  54: bmp/ter-u24n.bdf
  55: bmp/ter-u28b.bdf
  56: bmp/ter-u28n.bdf
  57: bmp/ter-u32b.bdf
  58: bmp/ter-u32n.bdf
  59: bmp/unscii-16-full.pcf
  60: bmp/unscii-16.pcf
  61: bmp/unscii-8-alt.pcf
  62: bmp/unscii-8-fantasy.pcf
  63: bmp/unscii-8-mcr.pcf
  64: bmp/unscii-8.pcf
  65: bmp/unscii-8-tall.pcf
  66: bmp/unscii-8-thin.pcf
3 Likes

Hello everyone,

I’m a professional software dev but new to Lua, so please forgive me if I get any of the Lua specific terminology wrong. :slight_smile:

I’m trying to write a Lua library + sample host script to test it out. I’ve created the start of my lib and have my host script pulling it in, but when I make changes to the lib, the runtime doesn’t seem to see my changes. It feels like it’s not clearing out the Lua VM or something. Like when I used to do web dev and had to aggressively clear IE’s cache back in the day. Anyway, would love some help from other lib developers on a good workflow for doing this sort of thing.

Thanks!

PS. Super excited I finally broke down and bought Norns. Loving it so far!

Use this format to include instead of require:

local libfile = dofile('/home/we/dust/code/FOLDER/lib/LIBFILE.lua')

1 Like