just interpret engine for norns


sometimes i want to try out supercollider sounds in norns without making an engine. so this ‘engine’ just interprets whatever text sent from lua as supercollider code. there’re just a few examples included but i think it explains the use.




in maiden:


you need to restart after installation.


you need to free your synth to avoid persistent sound (if it happens ;restart supercollider to stop it).


  1. using keys to fire sc code
  2. using enc to fire sc code

Stocked to see norns being used more and more to do livecoding.

Even if it’s more geared towards self-contained app-like script, the maiden REPL was always there waiting to be exploited!

I guess @xmacex precursored the trend and @infinitedigits has been toying with the concept quite extensively lately.

1 Like

Seems very well-timed given the upcoming Supercollider/Norns workshops :slight_smile:


so true!
i didn’t actually think of using the maiden as live-coding interface.
but yes you could do things like:

>> interpret('{*0.1*}.play')

or from other lua scripts

>> engine.interpret('{*0.1*}.play')

or just mix and match lua script with sc code text snippets:

'supercolliderNode.set(\freq,' .. lua_value .. ')'

Does it generate random sounds that you can toggle? Sorry I don’t have norns with me to check but just super curious how this works :slight_smile:

you can run any piece of supercollider code, even non-sound-generating ones. the included lua script is only a proof-of-concept. what’s handy to me is that you can test or port your existing supercollider code with minimum modifications. for example, you can just use things like Ndef and Tdef to do live re-patching of synth (live-coding) or use Patterns, Routine, or Task to sequence stuff. Then the lua part is only doing the display drawing and keys+encoders polling.


Gosh, this is just great! Thanks for making this.


so clever @yota! as usual :slight_smile: . love how succinct and powerful this is

1 Like

this little guy might be of interest:
[zebra/ at master · catfact/zebra · GitHub]

same idea (“chunk” command is the same as “interpret”) with minor differences and additions:

  • using explicit .compile instead of interpret. (the latter is unnecessary since you aren’t passing any arguments.)

  • additional facility for wrapping the execution of a given .scd in its own Environment. (and potentially running a cleanup function if defined.)

the pitfall of any stuff like this of course is that it’s not easy to enforce the reclamation of server resources.


thanks for the pointer. wasn’t aware of your norns script repo!
nice touch of having a private Environment. i’ll keep mine dumb simple so that people need explicit use of private Environment if they want to.

i’ve changed to compile+value (essentially interpretCmdLine).

btw, since you’re here, is it safe to do this cleanup of CroneEngine?

free { context.server.freeAll }

i did this because there’s nothing to prevent from spawning unreachable nodes…


Right, that’s the problem… It’s not safe, it will destroy amp and pitch polls

I might try and make a list of all nodes and busses at engine launch, then at cleanup free every thing that wasn’t there at the start

1 Like

ok. i got rid of server.freeAll
worst case is just ;restart supercollider (not too bad).

added a second example. one way to use the encoders in the context.

1 Like