pset_seq mod

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 ?

4 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

@klingklangmatze if you are comfortable making a minor code update, here’s something you could try that might help, at least with the second issue…

in the mod.lua file in the script’s lib folder, you’ll see a line of code on line 328 that looks like this:

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"}

try replacing this line with the following code and restarting:

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

1 Like

Thanks for the quick reply. Unfortunately that did not help. What works (but is not a good solution) if I set the device selection directly in the Lua script to 3, because that is always my USB MIDI device. So the selection stays on my MIDI device and doesn’t jump back to 1 (“none”) when a program change command arrives. This is not very elegant, but maybe I can think of something better.

1 Like

Thank you for taking the time to check my suggestion. I’ll investigate further.

EDIT
@klingklangmatze, i am semi-certain that the suggestion i gave you to address the second issue you reported is actually working, however, i just remembered that changes to pset exclusions only take effect for new psets. accordingly, you’ll want to delete and resave any psets you want to use with the pset_seq mod.

i’ve gone ahead and checked in the suggested changes for the second issue so (assuming i’ve actually solved it) other folks won’t encounter it.

in regards to the first issue (the pset sequencer does not start when syncing via MIDI), i’m not sure what you mean exactly. i did test midi mapping the pset seq enabled param and was able to start and stop the sequencer via midi (with a 16n faderbank). perhaps this isn’t what you meant by "starting* the pset sequencer?

1 Like

Now it works. Thanks a lot! Just as you wrote, I had to re-save the psets!

What I meant with sequence start: If I set the Norns clock to “MIDI” instead of “Internal”, the sequencer of your script does not start for me.

1 Like

i’m so glad the fix is really working!

thank you again for the explanation about sequence start. i’ll look into this later today or tomorrow.

EDIT
@klingklangmatze, i was able to reproduce the first issue you reported and i’ve checked in a potential fix. after making the change, i was able to run the pset sequencer with norns clock source set to “link” with the clock being set from Ableton.

i’d be grateful if you would test with clock source set to “external” to see if the fix i made works for you. :hearts:

1 Like

Sorry for the late feedback. Ableton Link also does work properly for me, but MIDI still doesn’t unfortunately. I have gone through your script several times. It’s really not clear to me where the error actually lies.

1 Like