lamination is a substitution sequencer

lamination is based on a certain kind of discrete dynamical system wherein letters in a finite alphabet are replaced with strings of letters in that alphabet. Pictured is one such dynamical system: here the “alphabet” is just the letters a and b, and the rules generating the dynamical system are a -> b and b -> ba. Repeatedly performing substitutions according to these rules starting with the string “a” yields (in this case) a string that grows exponentially and has certain self-similarity properties but never truly repeats itself. (Certainly substitution rules that don’t produce this behaviour are possible.)

lamination presents you with three dynamical systems that together control the FormantPerc engine (would be easy to change engines, and not too difficult to add other outputs) or output via MIDI or crow, one each for note, octave and repeats. Tweak the rules to explore the space of possible dynamical systems!

lamination is named for a concept in the study of outer automorphisms of free groups (inspired by a similar concept for mapping classes of surface homeomorphisms), namely that of an attracting lamination. Dynamical systems similar to the one described above describe automorphisms of a free group, and in this situation, repeatedly applying the rules creates a string that converges to a “leaf” of an attracting lamination. lamination is perhaps ill-named because it is possible to produce sequences that don’t fit the model of an attracting lamination, but it seems more interesting as a script for this failing.

NB – lamination in many situations will eventually crash when it attempts to create a longer string than Lua allows you to. Fortunately it should take a while for this to happen.


norns, grid (optional), crow (optional), MIDI out (optional)


221022 Update: I highly recommend updating the script. This will allow future scripts that use FormantTriPTR to more easily coexist with Lamination.

E1 scrolls the current page.
E2 scrolls in current page, and E3 edits when applicable
K2 on size resets
K3 on rule opens it for editing



v0.2 github link


Oh I forgot to add: lamination was inspired by a group of participants at the habitus workshop, who pushed me to consider possible connections between the math that I do and music. Thanks for that encouragement :slight_smile:


This sounds fantastic (and a very interesting concept) - thanks! Are there options to constrain the output to a particular key and scale? In addition, is there MIDI output available?

Yep, on the params menu, there are params for scale and root note!

I’ll give adding MIDI output a go and report back.


i think i’m gonna like this

1 Like

Thank you very much!!

1 Like

Version 0.2 Changelog

Exposed PolyPerc engine params.
Added MIDI and crow output as options. (ping @bharris22)


Thanks again!! This is going to be fantastic!

I have long been thinking about utilizing mathematical functions to create non-repeating, generative MIDI data, and hope to learn a lot from what you have done here. At a minimum, as a non-mathematician, I have learned about “discrete dynamical systems” from your original post. This seems to be a fertile ground for creating other sequencer rules, as well - I hope you have other ideas and applications in store!

I’ve already downloaded a few papers from the internet about this topic thanks to you and your post. Now, hoping to have the time to read and understand them. :slight_smile:


oh that’s really wonderful to hear—I’m glad I could connect those dots!!
I have some thoughts about later expansion of this idea; maybe some of those will see the light of norns :slight_smile:


i’m also quite curious to see if i can understand the core math well enough to port a standalone version to crow :cowboy_hat_face:

but i need to calm down and play with this version first


This is so cool! Congrats on making it so quickly!


agreed with @icco! awesome seeing it here. excited to give it a spin.


very good idea this script, thanks
I can’t open lamination “error: init”
my norns is up to date
I tried on 2 norns shields and the problem is the same
did I forget something ?

1 Like

What does the log on Maiden’s console say?

strange, a fresh install works fine here. can you, as @Doberman says, see if Maiden is complaining about something? Is it possible both shields have some Mod active that Lamination might not like?

i have this in matron
i remove passthrough but same

# script load: /home/we/dust/code/lamination/lamination.lua
# cleanup
# script clear
including /home/we/dust/code/lamination/../awake/lib/halfsecond.lua
# script run
loading engine: PolyPerc
>> reading PMAP /home/we/dust/data/lamination/lamination.pmap /home/we/dust/data/lamination/lamination.pmap not read.
Engine.register_commands; count: 6
___ engine commands ___
amp	 	f
cutoff	 	f
gain	 	f
hz	 	f
pw	 	f
release	 	f
___ polls ___
# script init
### SCRIPT ERROR: init
/home/we/norns/lua/core/paramset.lua:125: attempt to perform arithmetic on a string value (field 'group')
stack traceback:
	/home/we/norns/lua/core/norns.lua:145: in metamethod '__sub'
	/home/we/norns/lua/core/paramset.lua:125: in function 'core/paramset.add'
	/home/we/dust/code/lamination/lamination.lua:74: in global 'init'
	/home/we/norns/lua/core/script.lua:109: in function 'core/script.init'
	[C]: in function 'xpcall'
	/home/we/norns/lua/core/norns.lua:146: in field 'try'
	/home/we/norns/lua/core/engine.lua:91: in function </home/we/norns/lua/core/engine.lua:89>

hmmm, line 74 in lamination is just me adding a group—but with the new syntax. what is the version number that shows up when you hit K2 on the script selection page?

the lamination number is 210826

that is not the lamination number but indicates that your Norns requires reflashing to the new disk image to use Lamination, unfortunately.

ok, thanks Alanza i think also it’s the best way.