thanks for the heads up. i didn’t realize ATK needed an extra step, but looking now:

sc3-plugins/ATK was empty except for a README.md

indeed, this seems to be the case after simply building and installing sc3-plugins from source. perhaps i am missing some needed configuration.

for norns, we build all the supercollider components and host them on http://package.monome.org/, including sc3-plugins, and that is where they are pulled from when building norns-image.

i suppose we should add some documentation on the SC component builds to that repo, and perhaps that repo’s issue list would be a good place to help us understand what else might be required to make ATK functional.

(i know how to build the components but @artfwo is the master of the packages, and @simonvanderveldt is the keeper of the image, and @tehn is of course our gracious host)

Thanks for taking a look and giving some background on the ecosystem. I’ll spend some more time looking into it and will likely open an issue on the repo.

Having binaural encoding in a box excites me greatly so I’d love to see it functioning without any extra configuration on the user side.

Hi! I also tried vs-code remote and what @ngwese mentioned, mounting the file system, but, how do you replicate the “play” button functionality and repl? have you sorted that out? or are you keeping a window with maiden open?

Honestly, for what I’m doing, I don’t need much beyond maiden in a browser tab for error reporting and the occasional debug print. I usually restart the script from the fates hardware.

Although, everything could probably be done from VS Code’s ssh terminal pane running the (recently deployed) maiden REPL.

1 Like

Yes, thats what I’m also doing at the moment, I looked into the code quickly and saw on the web side redux is just sending the command as is to the socket connexion which is norns.script.load("YOUR_SCRIPT_LOCATION"). I also noticed that a web socket connection is being made to ws://norns.local:5555/ for matron however I didn’t manage to connect a simple websocket application to that port, and I’m not sure of that would be the answer or if I should issue a GET or POST message to the server instead…

If anyone has any tips that could be very cool, in the meantime I will use the web button and REPL as well.

PS: didn’t know there was a recent deployment of maiden REPL that could also be nice.

See Norns execution through bash? for some recent info on websockets etc.

“FIX integrate maiden-repl” from Norns: update 200218, but IIRC it’s not super useful unless you soft link/copy/move it to somewhere that’s in PATH; in any case, it needs to be launched manually in a term, and then keep in mind that it’s essentially a mirror of the maiden web REPL… I can’t seem to find the recent lines discussion about it :frowning:

1 Like

all right, thanks! I’ll have a look at those links and see where they get me, if I manage to make it work I will report back :sweat_smile: :pray:

hi i had a friend who wrote a very cool program called KeyKit in the mid 1990s @ AT&T and he asked

“Does Lua talk to SC to do MIDI I/O? Or does it do it directly?”

what is the proper response?

pp

“directly,” if you will

this doesn’t preclude doing MIDI I/O in SC, but it will not be plumbed into the UI device selection &c

what API is his next question i assume is that logical next question?
Tim has.is keykit and i am trying to recruit him :slight_smile:

it uses the ALSA snd_rawmidi API

it’s possible that this will get yanked out in favor of JackMidi or something in a future rev.

1 Like

Completely off-topic, but; O.M.F.G.! I used KeyKit in the 90s! So cool… The world is indeed a tiny place…

1 Like

i LOVED keykit. it rules so the prospect of KeyKit -ish sequencing on Norns is staggering

Is it possible for other programs to be “plumbed into the UI device selection &c”? If so, how would that be done? I’m brand new to this and haven’t looked into it yet, but the device_midi.c file looks like MIDI support would be easy. So, I’m now wanting to find out how the UI on the screen is done, and how that might be done with C code. Thanks for any pointers!

…Tim… (author of KeyKit)

3 Likes

I’m scanning the previous development conversations here, it looks like a lot of my questions (including how the screen can be accessed) will be answered after I get through them all.

…Tim…

5 Likes

right now, not very directly. there is a program called matron which runs the lua interpreter and interfaces with screen, GPIO, and USB devices. its components aren’t really set up to be used by other C programs, either as libraries or as IPC endpoints.

@PaulBatchelor has made some C snippets that might be helpful if you just want to replace matron with something else.

the norns lua API provides “script” writers with high-level interfaces to MIDI and screen and everything. one thing that we don’t have (hasn’t come up yet) is any modular way to extend the lua API with components written in C. (such extensions have to be baked into matron.) but there is nothing stopping you from (say) launching an executable in a lua script and then talking to it with sockets or OSC or something.

the “audio backend” on norns consists of a mixer program called crone, alongside an instance of sclang+scsynth and a buffer-cutter called softcut. communication with these components is done via OSC.

norns v3 is under development and will likely alter and/or extend some of this stuff.

5 Likes

Thanks much for the pointer to the C snippets! Using OSC to talk to Lua from another executable should be pretty easy for most things that matron manages. …Tim…

1 Like

This would be super useful. A few days ago I “accidentally” recorded over an hour of me going through various scripts and noodling around (intended to record a couple of minutes but forgot to stop recording). There were a few bits that ended up being quite useful! Not a huge deal to pull it over to my computer and cut out loops, but it would be convenient to just load the audio into a script on norns, cut and save loops, and repeat.

paging @mlogger from this thread

as a demonstration i added an engine that compiles and executes arbitrary .scd code at runtime.

putting this in ‘development’ because, well, basically have been holding off on pushing this kind of thing until the 3.0 update, which is approaching.

3.0 update will overhaul, streamline and extend the supercollider interface for norns.
engine classes and environments are simpler (easier to develop off-norns),
lifecycle management is simpler (e.g. Main.stop in sclang will not mess anything up),
there are convenience methods for exposing Classes to lua (less boilerplate,)
and proxy/factory methods to connect interpreted code to lua (if you don’t want to use classes.)

and finally i am thinking about ways to make the OSC connections more flexible (for arbitrary RPC-like action.) though it would be nice if someone who enjoys that kind of thing would take it over. i don’t think the hardcoded lua <-> SC OSC system is quite powerful enough to be a general solution right now for talking to other OSC-enabled environments. but with a little TLC i think we could make a fine standard that could be easily ported to PD or whatever.

anyways, here is simple thing that works with current systems:


this engine just takes three commands:

  • script(file) runs a .scd file
  • chunk(text) compiles and executes a chunk of sclang code (or tries to)
  • clear() executes ~cleanup function and cleans the current Environment

it’s important that each script contains ~cleanup function which frees any persistent resources!

this lua script itself is very dumb and does nothing but re-run a couple different .scd files, with no interaction.

if you wanted to get values to and from the script (e.g. control stuff with encoders / param system), probably easiest to set up explicit matching OSC connections in lua osc.event and in the sclang code. (and then before you know it you’re adding more stuff to the wrapper engine and then we are reinventing the 3.0 stuff presently in the pipeline, so maybe hold off a bit.)

scripts should be able to use MIDI and HID devices but i haven’t tried it. (maybe norns will steal the MIDI ports, i dunno.)

graphics and window-driven UI stuff in sclang, will not work.

it would be a simple exercise to use the keycode libraries from one of the text-driven norns scripts, and make a little sclang repl here, with an OSC connection for feedback.


i think i want to put this here because it feels worthwhile to mention that norns lua environment is pretty fully featured with not a lot of restrictions. one can create shell processes, use thread-backed coroutines for asynchronous stuff, do file I/O, pipes, sockets, and OSC. and it’s very performant compared to, say, python or node.js.

so… norns lua can act as a poweful launch configuration manager for other arbitrary processes, including audio process. (and can manage JACK connections through a shell.) i actually use it this way pretty frequently in my day job as an audiology research scientist. (where, unfortunately, the apps and settings themselves are proprietary stuff.)

just throwing that out there. if someone wants run csound or automatism patches on norns, we can work together a little bit and make that a more integrated experience, if that’s attractive.

21 Likes

Wooah thankyou so much!