Norns: code review



In regards to variable scoping yes, instrument and triggered are only valid inside this for loop, and will be replaced each iteration of the loop.

To be honest I haven’t totally grokked variable scoping in lua yet :sweat_smile:


update on traffic.lua, my reworking of loom to decouple a sequence from its harmonic content.

the recent changes to the app have produced some music that’s got me feeling introspective so this will be needlessly long.

awhile ago i read that when pt anderson decided to adapt pynchon’s ‘inherent vice’, the first thing he did was type up the entire book, line by line, in screenplay format, to get a feel of what it had felt like to write the book. i thought this seemed like a good idea for my next version of loom, to teach myself vim and “truly understand” how the script worked.

this in retrospect was probably not a good use of my time because i almost immediately forgot how the app worked after i was done and i also introduced a bunch of typos that took forever to find.

but i’ve got 98% of the kinks worked out with my scale changing functions. i’ve added in tehn’s pattern recording to allow for the repetition of a sequence of scales of transpositions of arbitrary length, and i’ve added support for transposing within the key via midi.

i also tried to decouple the triggers from the notes but this proved to be both a lot harder and less useful than i thought, so i only wound up including 4 modes for trigger speed: normal, slower, paused, reverse.

i have gotten to the point where i don’t actually know where to go next with this code, aside from tweaking some edge case bugs as they pop up i am probably done with this idea in its current form.

the impulse with this project was to handle changing chords and modulations in a more dynamic way without interrupting flow (eg during a performance). but i’m not a performer, and what i find most handy about the script is its ability to quickly generate motifs and then refine them using harmony until until they’re something interesting. so for my next exploration, i want push the refinement possibilities further without losing the immediacy of the generative aspects.

some broad design goals:
—design a new grid sequencer that facilitates easy reassignment of individual notes and triggers without breaking a chord tone.
—bring wacom integration to sequencer. if the information can be processed without too big of a cpu hit this seems like an ideal way of refining sequences. map grid to tablet 1:1, select notes with pen, process with arc…
—if you hear a happy accident it should be possible to get back to it. on the norns screen, some abstraction of a timeline with options to set loop points within the previous events, ala the party van. maybe should be able to set sequencer to rewind mode to undo changes.
—should be a tab on norns’ display for synth paramaters.
—synth scenes that can be morphed between over a defined period of time.
—never use the brightest LED level for more than, say, 8 LEDs at a time. LED noise on this was a constant battle but too closely entwined with the sequencer for me to wrap my head around.

anyway here’s the script!

if you try it out and something isn’t working or is unclear please let me know! thanks again everyone.


Great music - looking forward to trying out the code :thinking:


Will this be released into the dust repository or whatever its successor might be? I’d love to give it a spin.


not 100% sure this was directed at me but just in case—i am still too github impaired to figure out how to do it, and have sort have been waiting to figure out what actually is going to happen to dust before i invest any time in it.

even though i called it done, after having used it for a couple of weeks i already have some more “small tweaks” i want to change. in the process i’ve discover the fundamental problem with this hobby:

—it takes time to build an instrument
—you need to play an instrument to know what it needs
—it takes time to learn to play an instrument
—doing one causes you to forget the other

it should “just work” if you copy/paste it into maiden though unless i’ve done something really wrong