Pattern Langauge for Osc and Midi (was I2c/Osc bridge?)

I’m going to be a bit of an arse here - and let the moderators work out where this should go - couldn’t decide if it should be in a Norns thread or Ansible/Trilogy stuff anyway…

As I’m porting Kria into Lua - I was thinking about the I2C stuff - and it struck me that the sort of equivalent on Norns was to expose all those functions as Osc stuff. (which won’t be in the first release - just 'cos I want to get it out there - feel like I’ve achieved something after all this work :slight_smile: )

That’s kind of interesting but there isn’t anything like the Teletype to drive it to the best of my knowledge - what would the equivalent to that be in the Norns world? app on a phone or tablet? another Norns seems like a high barrier to entry - Max?

it also occurred to me that Crow might be an interesting answer - Teletype modulating Norns scripts via a I2c Osc bridge?

anyway - I’d be really interested in peoples thoughts - it seems like an interesting path but I’ve not quite got my head around it - but I’ll certainly add the current Kria I2c functions in via osc to see if any one finds them interesting…

1 Like

indeed, crow will be an i2c bridge, so OSC will fit right in there.

a norns kria would absolutely benefit from all the (presently i2c) parameters being exposed to OSC!


some more food for thought after having a read of the teletype source code

maybe a Teletype like live scripting environment that runs on a laptop (or perhaps Norns - will it read a keyboard via the USB - can’t see why not…).

It would speak OSC natively - both receiving and sending. Stack language like Teletype? I liked Forth back in my teens (eek!) on the BBC micro and I’ve implemented one or two for fun - is there an advantage in this case to that kind of environment - seems more interesting than something procedural - but I guess some kind of Scheme might be nice too

Would be good to have something similar to the pattern stuff in SC - that stuff seems more useful so you can manipulate it - not buried in the depths of Norns but - if you could use that across all your devices? I guess a MIDI output might be cool too…

anyway - really just passing thoughts but I can feel a project for next year forming… I guess first off - command line environment then integration with Atom or something like that.


So yeah - norns should do a USB keyboard as an HID device.

I did a quick test and sadly got nowhere with my apple keyboard (maybe because it’s got a built-in hub?). Also I think the HID examples have not been updated?

there’s an HID class on norns that works, though there are no examples to follow yet.

re: TT on laptop. i’ve imagined a slight variation of TT that could run as a vst/etc… could be interesting.


yeah, Ive been having similar thoughts recently…

Would be good to have something similar to the pattern stuff in SC

yeah, Im thinking perhaps Ndef/Pdef IS what to use, and was looking last night at if sclang can receive commands via OSC, or if i just have to put my own OSCfunc -> interpret in place.
other options are to wrap the sclang I/O and pipe it that way, which i believe is what norns is doing with maiden that may be better to get errors back?!)


but Ndef/Pdef is still pretty verbose…
but perhaps with a dedicated editor with shortcuts/snippers that might work

I did consider teletype too, and forth (I love it too, had a jupiter ace for a while, tried to buy one recently but they rare , and ridiculous money) , or lua…
but they all suffer the same issue.

if your using SC as a back end, why use another language/tech at the front, its always less integrated/documented - so creates another layer of complexity/barrier to entry.

dunno, im thinking a way to make SCLang more concise in a limited UI space is the approach im going to take.

my goal is for something in a eurorack (Bela Salt) using a Push2 for the display (like TT) with a small keyboard… so its how to make this user friendly for me :slight_smile:

yeah - not sure.

I guess the question is - is the pattern stuff in SC the pinnacle of pattern description/coding?

I genuinely don’t know the answer to that - I can’t find a lot of literature on this. I came across this;size=150;view=text which is interesting - Haskell seems to attract pattern people - isn’t Tidal in Haskell (Tidal however is such a pain to install I’ve still not managed to get a working setup - I think one of the goals should be “stupidly easy to use” - which to be fair installing supercollider is)

It feels like an area where research is needed - so the more competing ideas the better I guess. Just need to be able to afford a teletype of my own for some of that research :wink:

1 Like

I wish I had experience with more varieties of pattern-making syntax for basis of comparison, but once I got Tidal working I was pretty astonished at how easily I could create fairly intricate patterns that I could exert a great deal of control over.

I’ve not used Supercollider patterns, but looking at the docs, they are quite a bit more verbose.

Petrol appears to be less complete than Tidal?

Tidal has added “tidal-bootstrap” since I last installed it. Looks like a much easier way to get going than the manual installation method.

Just had a look at Tidal source code with the thought “how hard would it be to reimplement in Lua?” Uh, non-trivial. Shucks.

Would love to see a way to do Tidal patterns on norns, but I’m not seeing any instant (or nearly so) gratification path to it, and my life just isn’t set up to do the kind of heavy lifting required right now.

I’ll give tidal another go then.

Now I’m not writing code for my day job I’m finding I enjoy it again so I might tackle a larger project.

My own Islands Norns script and my port of Kria have gotten me pretty comfortable with Lua as well - and there is always the option of dropping back into C with Lua as well!

I guess if it were to be hosted on Norns you’d want something like the Teletype - concise, constrained and useable rather than something sprawling and verbose - and perhaps that’s a good design goal. I like the idea of using a controller too - push2 or the grid

yeah Petrol seems rather academic - however useful references at the end of that article :slight_smile:

1 Like

I have to admit I’d rather have TT on norns, like this:
• Connect an alphanumeric USB keyboard to norns
• Select TT
• chose SC engine
• Program TT via connected keyboard (= no computer needed)
• TT language offers parameters of selected SC engine
• TT scripts can be triggered via USB devices etc.


Had some vague thoughts on a pattern language while walking the dog this morning.

Pattern language thoughts

Out: INSTR <- c: quant(“c minor”) <- a: loop [ 2,6,4] 

Send repeating sequence of 2,6 and 4 to a quantiser to fit scale of CMI or and then to INSTR (which will be defined somewhere - it may receive OSC or it may receive MIDI 

a:clk [0,0.5,1]

Change the clock on node a (which is currently a loop of numbers 2,6 and 40

a: choose [7,9,1]

Change node a to be a one of 7,9 or 1 picked randomly each clock tick. The new clock we added earlier remains in force

Out:+ INSMOD <- d: sin(40,20)

Add a new node to out that sends a sin wave with a range of 20-60 to whatever INSMOD is 

Nodes assemble into a max/pd like graph behind the scenes.  Declaration order is irrelevant. Each node is making a stream.  A node can be redeclared if you have it’s label. The new definition will take over from the old one. 

Obviously needs fleshing out and then implementing but seems worth thinking about more. I’ve possibly reinvented Haskell - need to go and learn about that - would explain some things.

Borrows from tidal and supercollider. Not sure if it adds anything yet. Requirements also include - cross platform , very easy to install (standalone app) and easy to configure to work with any instrument. Quite honestly - if that’s all it adds over tidal then it is winning in my book. My current state with tidal is needing to make a VM to run it on since it wont’t run on my laptop and there is so little technical documentation I can’t even debug without delving into source code…

I have the same idea after feeling the disconnect between the SC patterns-streams-events system and Norns as specialized SC hardware. How would a USB keyboard pass events to the screen? It seems like a vertically scrolling REPL on the Norns screen with ASCII characters printing to it is an implementation detail. Then what?

I found Tidal Cycles simple to install on Arch Linux and its pattern language intuitive. With very little experience I got a small audience to gather around as I flipped patterns with a few lines of code…

My initial galaxy brain meme moment happened when I saw what some of my co-workers were doing with a hacker CTF challenge involving a Mersenne Twister exploit for DSA signatures. It seemed like there could be a fun concept to port hacking challenges into a computer music system.

I got a ways towards writing a PEG for the Tidal mini-language:

Might be a semi-useful reference if someone wants to use a library like LPeg with Lua…