Norns: dust



i had this thing which some people may be interested in
it’s a Lua Basics video series
Meta Tables are discussed
Lua’s customization and scripting features
Overlays for World Of Warcraft and Adobe Lightroom etc…
i am re-listening while i vacuum :slight_smile:


so i grabbed the Eclipse Lua Development Tools here

then i installed LuaRocks and peeked here


Any hints as to how we could include the Patterns library in our CroneEngine? I have a synth in SC that I have been controlling via Patterns. I’m imagining creating a LUA interface that changes the values of the pattern. What’s the best way to go about this?


there are very few limitations as to what you can do in a CroneEngine. you can use Patterns or any other sclang feature, whether it’s a good idea or not.

we have not yet published the repo containing the base classes, but of course they are in the filesystem on your norns and you can examine them in the usual ways.

in advance of more proper documentation / tutorials, here is a sort of template:

Engine_Foo : CroneEngine {

   var <baz_poll;
   var <baz_seq;

// this is your constructor. the 'context' arg is a CroneAudioContext. 
// it provides input and output busses and groups. 
// see its implementation for details.
	*new { arg context, doneCallback;
		^, doneCallback);

// this is called when the engine is actually loaded by a script. 
// you can assume it will be called in a Routine,
//  and you can use .sync and .wait methods.
	alloc {

// this is how you add "commands", 
// which is how the lua interpreter controls the engine. 
// the format string is analogous to an OSC message format string, 
// and the 'msg' argument contains data.
		this.addCommand("foo", "f", { arg msg; postln( msg[1]); });

/// this is how you add a "poll", which is how to send data back to lua, 
// triggering a callback.
// by default, a poll is periodically evaluated with a given function.
// this function just returns a random number.
                this.addPoll("bar", { 1.0.rand });

/// here is a non-periodic poll, which we can arbitrarily trigger.
// notice that it has no function argument.
                baz_poll = this.addPoll("baz", periodic:false);

// this Routine triggers the "baz" poll with another random number,
// at a random interval.
// (i would have used Pseq here for demonstration, but i've forgotten how!)
                baz_seq = Routine { {
                    (0.1 + 1.0.rand).wait;
	            } }.play;
	free {
             // here you should free resources (e.g. Synths, Buffers &c) 
// and stop processes (e.g. Routines, Tasks &c)


Overall, I’m impressed by how much heavy-lifting the LUA side of things does. SC is mostly for audio and the control side is really left up to LUA. Which makes me wonder how the control from LUA is connected to SC. For example, could you have a single SynthDef playing and then have Buses connecting data from LUA to SC so that you can have smooth control changes in the sound? As usually if you instantiate a synth in SC, you won’t get smooth parameter changes without a Bus object mapped to an argument.


This is very helpful! Thank you. Yeah, it will be interesting to see how best to adapt old patches to work with Norns and I expect this will widen my horizons for my programming in the future.


of course.

// CroneEngine_TestSine
// dumbest possible test: a single, mono sinewave
Engine_TestSine : CroneEngine {
	var <synth;

	*new { arg context, doneCallback;
		^, doneCallback);

	alloc {
		synth = {
			arg out, hz=220, amp=0.5, amplag=0.02, hzlag=0.01;
			var amp_, hz_;
			amp_ =, amplag);
			hz_ =, hzlag);, ( * amp_).dup);
		}.play(args: [\out, context.out_b], target: context.xg);

		this.addCommand("hz", "f", { arg msg;
			synth.set(\hz, msg[1]);

		this.addCommand("amp", "f", { arg msg;
			synth.set(\amp, msg[1]);

	free {;

here the smoothing is done in the synthdef. but it could be on a Bus with a separate synth. the PolySub engine in earthesea and so on, uses shared control buses for the multiple synth voices.


6 posts were merged into an existing topic: Norns: maiden

Norns: maiden

hiya, after implementing the ack sample player engine for norns and looking into making sample start / end / loop point parameters real-time modulatable with loop windowing/crossfading i found this:

haven’t tried it yet, but looks great. what license is this code under? would you mind us using it or parts of it for “ack” ?


Yes of course feel free to use that code (there’s no license). I was trying to make something a little bit like abelton’s simpler sampler in SC…


(moderator edit: moved some posts to Norns: maiden)


hi everybody

i spent most of yesterday evening exploring the scripts and lib folders in attempt to better understand norns . it really beautiful how this system has been arranged!

there is still plenty for me to dissect but i’ll ask a few questions:

  • where can i find
  • also if i’d like to teach myself how to add live input recording to a sampling instrument should i be searching in sc or lua scripts of existing apps?


it is in the main norns repo, that’s yet to be published (with the required ugens). upd: now moved to dust.

both! but supercollider docs on buffers and recording ugens won’t hurt either.



i guess that’s where PolySub is hidden also
can’t wait to see all of these amazing engines ya’ll prepared for us!


they’re up:

update getting ready


so wonderful to have these up so quickly
thank you tehn (and the gang)

i’m impressed by the brevity of all these source files!


Is the ideal hacking workflow here that engines can be edited in maiden as well?


I’m really regretting that I didn’t pre order a Norns. Is there any useful way I could play with some of the code if I don’t have access to the hardware?


— now getting it actually working… will probably require some work. And then you’ll need to figure out the hardware interface side of things.

I know @mzero had been talking about making some efforts on getting this working with rpi+pisound.


is that the repo that was mentioned previously?
I would love to get the code working on my linux64 machine as well as the Norns device