Norns: crone/supercollider

If you put that code i listed in Maiden, the first error would be on line 1 - it doesn’t like “//” but from the tutorial that would need to be “- -” instead. Its small things like this I would like to know to get patches to work. The syntax is slightly different from what I gather

If you look at the Dust repo link as @x2mirko suggests, that’s exactly the comment syntax used. The double dash is a Lua comment syntax, not SC. @Leverkusen I see nothing in the code that suggests that existing SC code cannot be used without some additional code to exposure the workings out to Lua. Don’t panic just yet, and perhaps just wait until @tehn gets to it in the Studies?

Are you even supposed to edit sc-files in maiden? I was under the impression so far that it was just used for lua editing. I did all my sc programming on norns so far with vim via ssh :smiley:


Thanks, will do

I think that’s the bit I really need to know the most.
I guess it’s more to highlight some thing’s I hope it will be addressed at some stage in future studies. Appreciate everyone’s help on what is obviously early days on a huge project :slight_smile:

I have absolutely no idea! I thought maiden was for everything program related. So for SC I should use vim? And lua use Maiden?

Any text editor will do, I just personally prefer vim, but someone else might say emacs or nano or notepad or whatever else you can find that edits text files. vim (and emacs) might actually not be what you want. They both use rather arcane commands that are fast if you’ve practiced using them a whole lot, but they’re not necessarily what one might choose just to edit a file from time to time.


Ach, I wouldn’t call it panic. The next opportunity to get a Norns will be in autumn anyway unless one pops up somewhere on the european used market.

Loosely following the discussion till then is confusing sometimes as I want to keep track and figure out if it really is what I imagine it is, while I cannot just try things out and learn what it is…

this should probably be all moved to a new topic… :slight_smile:
(perhaps time for a norns:supercollider/crone topic?)

heres what I found when I started to mess with SC a bit on norns.
(someone feel free to correct me if Ive got this wrong/incorrect)

No…for a couple of reasons… but main ones are, maiden doesn’t know SC format, you can’t place files where they need to go, and it would need to restart crone/scsynth.
what maiden does provide is a way of seeing SC errors on the sc tab.

anyway some random findings:

  • Engines need to be placed in ~/dust/lib/sc
    how you edit these (i.e. editor choice, and locally or remotely , is up to you :slight_smile: )
    (not sure if sub directories are allowed, could get crowded in one directory)

  • Crone (and I think matron) need to be restarted to add new engines (and edits)
    on the norns box, this is
    ~/norns/ ; ~/norns/

  • Errors (debugging etc)
    if you have an error in your SC , you’ll be able to see this in the sc tab of maiden.
    however, I found when I accidentally forgot to rename the Engine, this cause crone(actually scsynth) to fail to start… so I got audio engine failed to load … so I guess there are a class of errors when this might happen.
    (to ‘debug’ these I found the easiest way was to just run sclang, and see what errors it threw up)

(hopefully over time the above ‘workflow’ could be refined a bit… currently, I found I just left an ssh logged into norns to do this all, but would nice if this could all be done via maiden)

apart from that, creating engines from existing SC code, should not be too difficult
basically the process is, create a new ‘Engine’ derived off CroneEngine, this can ‘wrap’ the existing code.
this wrapper does a few things… sets the in/out contexts, allows you to ‘addCommands’ which are what you map to parameters on the lua side.

Its also a good idea to check out a few of the Engine SC classes , as they all seem to do things slightly different.
I guess perhaps due to when they were written and by who… but I find it a bit confusing
e.g. I see a few calling synthdef() .add() , but some do CroneDefs.add(synthdef)
perhaps ‘best practices’ will become clearer during the studies.
that said my SC is rusty, so perhaps when Im more back in the flow with it, it’ll become clearer.


Okay, I understood that my questions have been uninformed and might only have been loosely attached to the topic. Nevertheless I find it not very polite to just delete them! Thanks.:thinking:

1 Like

I didn‘t get removed.

Just moved: Norns: crone/supercollider

1 Like

Oh, all good then - I just could not find the conversation anymore and thought it was gone.


1 Like

just want to make this very clear: maiden is for editing lua scripts. you’re trying to run SC code in the lua interpreter.

the information you need is already in the thread but to sum up:

  • put new engines in dust/lib/sc.
  • use a text editor, not maiden.
  • restart the norns when you make changes (we’re working on better tooling for this, slowly)
  • see this post for a commented engine template:
  • direct link to simple passthrough example on gist:
  • see Engine_TestSine, Engine_PolyPerc, Engine_Glut, &c for respectively more sophisticated examples.
  • you should be able to wrap pretty much any SC code in a new engine.

if you do the former, the synthdef will be compiled and sent on engine init.

if you do the latter (which i prefer) the defs will be compiled and sent on startup, incurring no runtime overhead.

it’s not a big deal either way.

1 Like

Thanks for the info - the info about how to edit sc and lua is clear

Yesterday, I did start using the editor that is built into the Supercollider program on os-x to edit sc, as that allows to check bad code and listen to the results. Are there any issues doing it this way? Or best to stick to a text editor? If using a standard text editor what text format to save it as, as there are many options?

no that works fine.

my suggestion would be to use the norns SC classes and develop engine using scide (or your preferred editor) on laptop, then copy them to norns.

1 Like

just gearing up for a couple of projects. Couple of questions

running the SC classes on my laptop - should be able to manipulate them using OSC right? is there any nice (preferably command line) tool for doing that that anyone knows of? (Edit: this assumes that my reading of the engine.lua code is right. Ie it takes all the osc commands and exposes them as methods of engine)

CroneGenEngine - this looks like it’s meant to wrap a lot of boiler plate logic for a synth engine but it also looks very unfinished :slight_smile: is this under development? part of the direction things are heading in? (not important for the current project I’m working on because that’s going to need its own engine for reasons :slight_smile: but just interested)

CroneGenEngine is my class and yes it’s meant to wrap a lot of boiler plate logic. As you’ve noted it’s a work in progress (like most of my stuff scattered with TODOs, sorry). It’s not the direction norns engines are heading in general :slight_smile: . I’d say look at TestSine, PolySub, Glut, Ack. CroneGenEngine is experimental.

1 Like


For this project it wouldn’t be useful anyway but it does seem like an easy way to add a more straightforward synth,

It builds engines from SynthDefs, basically. Engine_Gong is an example of this.

After reading through this thread, I annotated the Supercollider code for the TestSine engine. I don’t know 100% what I’m talking about but I think this might be useful for others. It was helpful to me to step through a real example and explain it to myself.

For those who understand Object Oriented Programming in other languages and are confused by the sigils used in Supercollider class syntax, this reference cleared things up.

For example, why type the sigil ^ when you can type return like in other languages? Because in Supercollider no method can return void, so why bother implementing a reserved word return when everything returns. The ^ sigil says “return this value”. If it is omitted, return the object.

lol it looks like @zebra made some very similar annotations 4 months ago in this topic.

Reading through the code and getting very excited about programmable hardware! Export VU/Level meters as OSC bundles!