Yes it comes with vanilla sclang (version 3.9 something iirc) and also sc3-plugins

1 Like

Having built myself DIY Norns Shield and Fates , I’m just taking tentative steps into the world of Norns scripting by working through some Supercollider tutorial material.

Some random questions on Supercollider engines:

  • If I was to attempt to implement a sequencer module, would I do this in a Lua script, or make the sequencer part of the SC engine?
  • Is it only possibly for a Norns script to use a single Supercollider engine?
  • Can SC engines be swapped by a script?
  • Can an SC engine use Supercollider extensions or Quarks?
  • Does an SC engine have direct access to WiFi networks the Norns/Fates box is connected to (interested in this one because there’s a Supercollider extension for Ableton Link, it seems)?
  • Does the SC engine have access to the filesystem, via the Lua script to load or save files?
2 Likes

up to you.

here’s a dumb random sequence in SC

Engine_Boink : CroneEngine {
	var <sequence;

	*new { arg context, doneCallback;
		^super.new(context, doneCallback);
	}

	alloc { 
              sequence = Routine { inf.do { 
                      { SinOsc.ar((10 + 50.rand).midicps) * 0.25 * EnvGen.ar(Env.perc, doneAction:2) }.play;
                      (0.1 + 0.5.rand).wait;
              } }.play;
         }

      free { 
           sequence.stop;
      }
}

but my 2c is that unless you are specifically interested in doing stuff mostly in SC, or are adapting existing SC code, it is a more natural fit to do sequencing / control stuff on the lua side for norns. that way your sequencing logic module can be more reusable and more easily integrated with controllers and stuff.

yes

yes. (i’d consider this an “advanced technique” though.)

it depends. sc3-plugins are installed already. quarks/extensions that need qt3 or another graphics layer will not work. quarks/extensions that need compiled UGen extensions will not work unless they provide arm64 binaries or you compile them. simple extension classes are fine. (norns engines are extension classes.)

in general i guess i am wary of the Quarks system, but i do love extension classes.

yes you should be able to access The Interweb from SC on norns. (send OSC with NetAddr, use String.systemCmd to curl or whatever, &c.) things like WebView will not work because nope, no graphix again. dunno about Link support; i think that is a compiled UGen so you may have to build it for arm64.

sounds like two questions. yes SC can acccess the filesystem directly with File or whatever. yes SC can talk to scripts, via polls and commands. (polls do not have to be periodic, it is just our word for the mechanism by which engines can generate events to be handled in lua.)

3 Likes

Thanks very much for your detailed reply, @zebra!

Re. Link support:

There’s an old fork of SuperCollider that incorporated Link support. I don’t think it was ever merged, though.

There’s also a UGen for it too, as you say.

No pre-compiled binary for ARM, and no examples of how it’s used, unfortunately. Maybe someone with a bit more experience of SC/Norns would be able to tell if it would be useable in Norns.

I know Link support has been suggested before. I do think it would be a great feature, whether build into Norns native tempo/clock system, somehow, or via an SC UGen that can be used in Engines.

1 Like

I was hoping we could use something like https://github.com/rncbc/jack_link
But I don’t know if/how SC ties in to JACK transport so this might or not might not work with SC currently.

i believe @Dewb was poking at integrating Link support into the norns clock system, which i do think would be a natural way to do it (though i have no skin in the game there)

see this (old) GH thread


and oh hey, it looks like that upstream PR for adding LinkClock (sclang side) was indeed merged to the main dev branch, after some work, here. which means its on the supercollider 3.11 milestone. no idea when that release will be ready or whether LinkClock is already in a good/usable state in the dev branch. (again i have zero personal investment in this feature.)

which reminds me we should probably update the norns supercollider build to bring it in sync with 3.10.4 (some good bugfixes in there)

3 Likes

Would be nice to be able to use Link to sync multiple Norns wirelessly, too, as well as sync to/from iOS apps etc.

looks very good! just a little hint while skimming over it: it might e a good idea to add a computational way to generate the synthdef name(s) from the class file to prevent accidental synthdef overloading…

1 Like

Is this the place for all Norns/SuperCollider-related questions?

I have some, but not sure if I should make another thread (or several), or post here.

feel free to use the Questions category

Cool, thank you.++++

Does this mean Link support for Norns is more possible? I always thought it’d be more something for the Lua side, but maybe i’m getting the wrong end of the stick?

2 Likes

It’s being implemented right now! There a branch on git if you wanna see the code

5 Likes

Confused as to how you should do SoundIn.ar for the Right and Left channels separately.

I’ve been using SoundIn.ar([0, 1]), but the UGen I’m working with expects two separate inputs. So are the mono inputs just SoundIn.ar(0) and SoundIn.ar(1) ?

Yup. You could also do

var inputs, left, right;
inputs = SoundIn.ar([0, 1]);
left = inputs[0];
right = inputs[1];

(also, I believe on Norns context.in_b[0].index and context.in_b[1].index are preferred to a simple 0, 1 respectively)

Probably worth reading a bit about Multichannel Expansion – definitely one of SC’s harder bits to wrap your mind around, but super helpful once you get it in your head

1 Like

its sort of a long story but FWIW: it’s no longer actually needed to use these, and they’ll be removed (or at least deprecated) in next major version (soon i promise)

2 Likes

I’ve built the Fates/Norns device and it’s working perfectly.
Managing the device and running scripts from Maiden is fantastic.

Now, I’d like to convert some supercollider scripts to run on the Norns platform.
Can supercollider scripts be uploaded to Norns through the Maiden interface? Do they have to be treated with Lua?

Yup, SC files are uploaded / edited same as Lua files in maiden. Big difference is you have to restart the device after changing any SC code. For that reason, I recommend developing your SC using the official desktop SC IDE, then uploading to norns once you’re pretty confident in it

If you haven’t gone through the official studies yet I definitely recommend starting there. It doesn’t get too deep into custom SC code, but you can dig into the PolyPerc engine it uses for most studies if you want something to crib off of.

In short: you need to wrap your SC code in an “engine” subclass so that norns knows how to use it, and then your Lua code needs to declare that when your script launches, it should also launch that particular engine.

1 Like

I found this highly useful!

3 Likes

Thanks for the help!
It’s a little daunting trying to find out where to start with something like this.

1 Like