Metrix (211003)

metrix

It’s like Metropolix for norns. :robot::heart:


Hello there! :wave:

This is my first post here and I’d like to introduce myself with a little sequencer I’ve been working on in the last months. It’s inspired by metropolix by intellijel, a powerful sequencer for two voices. For those who are not familiar to the module or not at all into eurorack, you might head over to the intellijel website or yt to have an overview what the original is capable of. Here are metrix’ hard facts (not all of them):

  • Two independent tracks with 8 stages each
  • Control many functions directly via grid: pulse count, gate type, ratchets, probability, pitch, octave, accumulation, slide
  • Set playback direction and clock division per track
  • Loop the whole sequence or choose parts of it
  • Quantize to a scale and root note via global params
  • Connect to Crow or via MIDI
  • Save and load up to 64 presets
  • Generate random sequences

Thanks a lot to @markel_m for borrowing large parts of skylines’ grid ui and for testing. As well as @tyleretters and @infinitedigits for helping with fixing the last issues with lattice. <3

The script should be available in maiden from now on.


Requirements

Documentation

Have a look at the full documentation here:

Roadmap

There are some things I’d like to work on in the next releases, depending on the feedback you’re hopefully gonna provide:

  • fix all them bugs :bug::bug::bug:
  • sync with external gear
  • modulation via CV in from crow
  • ui improvements
  • 4-track trigger-only-mode (?)
  • add features seen in the metropolix v1.1 firmware update

If you like it, don’t be shy and tell me your wishes for the next iteration. :slight_smile:
Hf!

#norns #grid #crow #midi

53 Likes

so cool! i can’t wait to try it.

I saw something earlier and thought it might be Tetrix.

1 Like

maybe theres a little easteregg to be found. :man_shrugging:

4 Likes

Amazing job!! These sequencers are so much fun.

Thank you, this is super fun! Looking forward to future updates :slight_smile:

Unfortunately this does not work with the midigrid library (using 2 Launchpads), because the grid:rotation function is not implemented there.

For anyone who wants to use this patch with the midigrid library there is a small hack you can use to make things work. Simply replace the g = grid.connect() line with the following code:

local grid = include("midigrid/lib/mg_128")
g = grid.connect()

function grid.vgrid.key(x,y,z)
  if grid.key then
    grid.key(9-y,x,z)
  end
end

function grid:led(x,y,z)
  return self.vgrid:set(y,9-x,z)
end

On a side note: @kasperbauer I’m not too sure but g:rotation(45) (metrix.lua:19) looks a little strange. The documentation says the function only takes “rotation 0,90,180,270 as [0, 3]” as arguments, so I have no idea what this actually does :smiley:

3 Likes

I used the ‘45°’ rotating on Skylines too, I tested all the others and none worked like I wanted at the time, and for some reason 45 worked :sweat_smile:

Haha, theres a good chance that i borrowed this line from skylines too :smiley: Have to check this with 90deg of course.

@bontric: Thanks for the info. If you’re willing to provide a PR, maybe in combination with a param that changes between the normal behaviour and the midigrid, I’d be happy to integrate that. :slight_smile: Can’t test it here, as i only have the original grid.

1 Like

Hi @kasperbauer

Had a lot of fun with this tonight. Thanks for sharing.
Three observations from me -
1 - I can’t see how to change the clock divisions (edit: page 3. D’oh!)
2 - Accent doesn’t seem to be available from the shifted page 2. I am using Molly, which may be the cause.
3 - Midi sync is drifting. I am using norns as the master to digitakt. This may be outside of your control.

1 Like

I just loaded it up and about to give it a spin. I can’t help with #2 yet, but from the OP it looks like sync is not implemented yet.

@Senorakubra
2. It’s not there anymore. :sweat_smile: I added accent during development, but it was barely audible with molly. Crow also doesn’t work due to the lack of outputs. So I removed it again. Somehow made it to the docs though, I’ll update that.
3. Yes, I also noticed sync issues using Ableton Link. I’ll have to work on that. Any help is appreciated.

1 Like

I struggled quite a bit with Initenere to make it sync up. I’ve noticed my external gear is reporting unsteady clocks from Norns. I think this is a known issue. Maybe @dan_derks can comment. I wanted to let you know so you don’t pull any hairs for stuff that may not be script related.

2 Likes

clocking norns from MIDI does currently pose timing issues: clock: crow + MIDI external clock sources double-trigger clock.sync(1) · Issue #1273 · monome/norns · GitHub

gave the script a spin – super fun, but yeah, immediate alignment trouble with Link. i’ll give it a deeper look this week to see if there’s something specific happening here – after a quick glance, i think i’d start at stress-testing whether a 256ppqn Lattice is usable under vacuum conditions. 256ppqn shoots off 1/1024 notes (every ~1.9ms at 120bpm), which is fiiiine resolution…maybe too fine, depending on the mechanics surrounding it? i tend to keep mine at 8ppqn for a 1/32-resolution grid (tho more vanilla for step-sequencing) and things stay tight…i’ll do some tests for how high that can go without issues :slight_smile: i suspect 96ppqn (octatrack-resolution) might be the reasonable max (@tyleretters , am i doing the math right? any thoughts re:ppqn?)

a good control test for the script might be to execute print(clock.get_beats()) on each note-on event to watch if timing remains consistent when on internal clock (quarter note speed should print ~1-beat differences) . then compare to link + midi clock sources. to start all clocks at the same time, there’s a midi + link helper start/stop transport example here: clocks | monome/docs, which could call seq:playPause() on start and seq:playPause() + seq:reset() on stop.

either way, congratulations on the release @kasperbauer !! stoked to dig in :sparkles:

4 Likes

I did have some issues running Initenere with link. It would drift quite a bit if I were running Link, some drums from Ableton and just using the internal norns audio engine. I want to take a stab at this script as well and see how it goes. There are times when I’ve notice a bit of drift either way with norns clock.

Either way, it’s not a do or die kinda thing, but it does make it hard to use these scripts with external equipment. I’ll give this script a shot in the near future (I get maybe, 30 min free each day right now? Haha) and see if I have issues.

Either way, thanks to all involved for the VERY COOL tools!!!

2 Likes

i just tested lattice should at 256 ppqn and it was fine. cpu stayed pretty low.

i will note that lattice was conceived to be a leader clock & i hadn’t given any design/engineering consideration to being a follower.

2 Likes

@vicimity @dan_derks @kasselvania @tyleretters

Thanks for all the input, I’m gonna wrap my head around all that when i have some time off.

/edit: thinking about it, 256 ppqn was way too much, the default value of 96 should be enough.

3 Likes

ah! this actually returned some helpful results – i added print(clock.get_beats()) to sequencer:playNote and assuming that’s the note-initializing function, I found that pulses are incrementally off even on internal clock, which would explain all the other clocking mismatches. here’s eighth notes on beat 1 (starting at beat 4):

1	3.9999596539999
1	4.5014371699999
1	5.0073664500001
1	5.509051232
1	6.018680398
1	6.5227989260002
1	7.0266116400001
1	7.52904549
1	8.0315789259998
1	8.5343203799998
1	9.036919962
1	9.5378694460001
1	10.04218277
1	10.54417194
1	11.044118912
1	11.545904862
1	12.044687038
1	12.548026112
1	13.053831196
1	13.557784338
1	14.060315878
1	14.563730166
1	15.065757852
1	15.56940173
1	16.073220658
1	16.573308498
1	17.075449822
1	17.577196938
1	18.08711304
1	18.587204846
1	19.088900644
1	19.587407458
1	20.092789808
1	20.59886724
1	21.100707718
1	21.604945574
1	22.1066524
1	22.613014526
1	23.11277625
1	23.618507134
1	24.122257074
1	24.622233588
1	25.12634228
1	25.626279738
1	26.139866746
1	26.644024724
1	27.15156955
1	27.655229304
1	28.157708294
1	28.663076278
1	29.171421306

maybe there’s a counter within the script that needs a little tuning? seems to be overshooting a bit and adding a microstep every time it cycles, which would cause the sense of off-timing when paired with another steadily-chugging device. i’d guess these differences aren’t noticeable when norns is on its own because they’re tiny, but they accumulate to a definite drift pretty quickly.

2 Likes

So, I did a short test with 96ppqn (lattice’s default), it seems to help a lot.
Didn’t notice any irregularities in one or two minutes with the internal clock.
I’ll do some more tests tomorrow and hopefully provide an update after that. :slight_smile:

Thanks so much for the detailed input @dan_derks !

2 Likes

the issues linked by @dan_derks concern syncing to midi clock input.

clock output is much simpler. there is not really much we can do to mess it up at the system level.

the most natural explanation is that a script exhibiting inconsistent clock output, is simply trying to do too much work on each tick. all clocks work on a single-threaded event loop with per-tick callbacks to the script.

256 ppq means that at 120bpm you are trying to refresh everything every 2ms, which is pretty ambitious if you’re doing anything non-trivial.

(bear in mind that drawing to the screen presently competes with all other activity for time on the main thread. there is an extant PR to fix this but we never did resolve the fact that it break some heavily-used API functions that don’t fit well with an asynchronous architecture, like screen_extents().)

3 Likes

Hey @kasperbauer. First off, huge thanks for this beautfiul sequencer. Great fun to play with the two voice combo of 0-coast and Strega!

Secondly I’ve noticed a bug. If the grid is disconnected and the reconnected the rotation is off and I need to reload the script.

2 Likes