pset_seq mod

pset_seq

pset_seq is a simple norns mod that lets you sequence script psets.

Requirements

  • norns

Documentation

you can install pset_seq and then activate the mod in SYSTEM > MODS > PSET_SEQ. after activating for the first time you need to restart SYSTEM > RESTART.

after installation you can activate the sequencer by going to PARAMETERS > EDIT > PSET_SEQUENCER.

In the PSET_SEQUENCER sub-menu you’ll find the following parameters to control the sequencer:

  • mod midi port: sets the midi port (set in SYSTEMS>DEVICES>MIDI) of the device that can be used to send program changes to load a new pset
  • mod midi in: sets the name device assigned to the selected mod midi port that can be used to send program changes to load a new pset
  • pset seq enabled: turns the sequencer on and off
  • pset seq mode: there are four modes:
    • loop: loads the psets in order returning to the first pset after the last one has loaded
    • up/down: loads the psets in order, with the load order reversed after the last pset or first pset has been loaded.
    • random: randomly loads the psets
  • load pset: manually loads a pset (note:this works whether or not the sequencer has been enabled)
  • pset seq beats and pset seq beats per bar: the combination of these two parameters sets the frequency at which a new pset gets loaded. the formula is:
    • clock tempo * (pset seq beats / pset seq beats per bar)
  • first and last: the first and last psets to be used by the pset sequencer may be set with these two parameters
  • <<reset first/last range>>: resets the first and last parameters (this is used to refresh the parameters if a new pset has been added to the script)

CAVEAT
to change psets with midi program changes, the midi port selected in the PSET SEQUENCER params sub-menu cannot also be selected for sending other midi commands (i.e. from the main script that’s been loaded).

TODO

  • enable pset exclusion sets: this will allow parameters to be excluded from the pset sequencer so they may be adjusted while the pset sequencer is running.
  • replace metro with lattice

Download

;install https://github.com/jaseknighter/pset_seq
37 Likes

this is a great idea!

3 Likes

Awesome idea to make this a MOD. Perfect for Colorwheel and Moonraker

5 Likes

really excited about this, thank you!

3 Likes

absolutely incredible @jaseknighter . I love this idea, thanks for effectively bringing it to every script :slight_smile:

6 Likes

Earlier today I was combing through the forum looking for a way to midi map Pset… so a big, big thank you for this.

2 Likes

thank you for the very kind words @Justmat, @mlogger, @fourhoarder, @infinitedigits, and @howzero. this code has been sitting in the flora script for quite some time and i’m really happy to see it more accessible for you and others to take advantage of.

:heart:

5 Likes

this is CRAZY awesome!
:stuck_out_tongue:

2 Likes

great to have the pset sequencer available for every script now. big thanks @jaseknighter !

2 Likes

Thanks a lot! This will definitely be useful in lots of situations.

1 Like

thanks to @mlogger for identifying a couple of bugs related to changing the clock tempo, first, and last params. i believe these are now fixed in a new version i just committed to github.

after updating the mod, remember to restart so the changes take effect. :heart:

3 Likes

inspired by Using Norns live. How to change scripts and presets quicker? is there a world where there’s still a “sequence”, but rather than bars & beats controlling progression thru the sequence, midi messages (ie program change) advance thru the sequence?

2 Likes

@21echoes, the ‘load pset’ param already can be midi mapped to control the loading. tho maybe that isn’t as precise as a program change…

EDIT
i found some code to detect a program change. i’ll see if i can get this coded into the mod sometime this evening.

EDIT #2
ok, this was more difficult than i expected but i am happy to report that i now have a much better understanding of how the midi.connect api works. :rofl:

i’m sure there are more elegant ways of coding this, but the pset_seq mod now supports changing psets via midi program changes.

two new parameters have been setup to support this:

  • mod midi port: identifies the midi port that’s been set in SYSTEMS>DEVICES>MIDI for the device that can be used to send program changes to load a new pset
  • mod midi in: sets the name device assigned to the aforementioned mod midi port that can be used to send program changes to load a new pset

note: the value sent in the program change message needs to be within the range set by the first and last params.

caveat: if i understand correctly how the code i’ve written is working, the midi port selected in the PSET SEQUENCER params sub-menu to send midi program changes cannot also be selected for sending other midi commands by the script the mod is modifying.

8 Likes

Made a lil video for installing this for a friend.

Maybe someone else will find it useful.

https://drive.google.com/file/d/1_iGUcKuRhI7BRso3zaEBM7GkduZ3-EdG/view?usp=drivesdk

I’m looking to integrate pset_seq into my sequencer colorwheel. The low-hanging fruit implementation is to add a grid page to colorwheel that allows the user to modify pset_seq_beats_per_bar and pset_seq_beats on a per-pset basis (this way you can have one extravagant pitch collection play for 14 beats, two beats of a ‘target note’ pitch collection with a more limited range, and then 6 beats of something else extravagant, etc etc etc, rather than a perpetually-symmetrical harmonic rhythm).

To facilitate this, I’ve added a ‘local’ variant of each of these params to cw, and I’m looking to have their pset_seq equivalents update whenever the active pset changes. I tried dropping a params:set('pset_seq_beats', params:get('local_pset_seq_beats') in after line 256, but it’s not working as expected. Is there another point where I might drop this line to get the desired results, or am I way off, @jaseknighter ?

3 Likes

@yams, thank you for sharing this video.

in terms of adding the sequencer to colorwheel, am i correct in my understanding that you are looking to fully integrate the sequencer code into colorwheel, like it is with flora, so the pset sequencer mod isn’t required for colorwheel?

if so, rather than creating ‘local’ versions of the params, i imagine you could try removing the pset params you want to change with each pset (e.g. pset_seq_beats) from the list of pset exclusions. you’ll find this list on line 328 in the sequencer’s mod.lua file:

m.pset_seq.default_exclusions = {"pset_seq_enabled","pset_seq_mode","load_pset", "pset_seq_beats","pset_seq_beats_per_bar", "pset_first", "pset_last"}

1 Like

oh wow, I hadn’t gotten to the ‘fully integrate them’ stage. I think I understand what you’re suggesting.

To set that up, is it just “drop the lua file in the lib folder, include it in the includes, init it in the init”. Then do the above thing with the default exclusions?

1 Like

the way mods are created, you can’t just drop in their code into a regular script, however, you should be able to use the version built into flora:

  • copy flora’s pset_sequencer.lua file into your lib folder
  • update the code in your pset_sequencer.lua file to remove the pset params you don’t want excluded as referenced above
  • include pset_sequencer.lua in your includes as pset_seq
  • call pset_seq.init() from your script’s init function

if this doesn’t work, i’d be happy to help investigate the issues. :hearts:

2 Likes

As you know, I’ve got it up and running! Thanks so much for all the help

I dug your cw track on the thread. Thanks for sharing :slight_smile:

I’ve got an idea though, and I’m wondering if there’s a reason this wouldn’t work:

  1. set the maximum value for the beats param to something ridiculous (10000?)
  2. create a meta sequence record button, which starts a clock ticking and then logs when you select a new pset from the box of presets (and sets the beats param to that value and saves the preset)
  3. create a meta sequence play button that plays the thing back as you played it
  4. change the ‘loop’ functionality to reference a table which stored pset values while recording, rather than simply incrementing up by one

I’d probably also want to go through and conceal UI aspects of pset_seq that are no longer functional once I get this working.

Does this seem like a solid set of steps to carry out, or are there hiccups I may be missing?

1 Like

@yams, i’m really glad you enjoyed the track i shared on the cw thread, i was really happy with how it turned out.

in terms of your idea for an alternative way of setting values for the sequencer, rather than extending the value for the beats param (step #1 above), i would probably create another param to set the sequence mode (e.g., loop mode for the existing method and record mode or something like that for your new method). other than that, i think your approach is solid. please do reach out if you hit any roadblocks implementing this. i might even replicate your brazen heist of my code and bring your new sequencing code back into the main pset_seq mod codebase. :stuck_out_tongue_winking_eye:

1 Like

Really great script! :black_heart: I have two problems with external MIDI sync. First, the pset sequencer does not start when syncing via MIDI and when using program change to change the psets, the „mod midi in“ port jumps to “None” at the first program change command. Any ideas?

1 Like