A dead simple 128-step single-channel sequencer [grid/crow]

hi! i often found myself using my OP-Z w/ the CV module for simple single-channel trigger and gate sequences. however, given the limited # of steps, i often had to link patterns together, which made editing a pain. inspired by the grid studies step sequencer (which i used as a starting point), i threw this together. for now, i plan on using it with notes from arc levels to create neat, 128-step sequences.

patch

----------begin_max5_patcher----------
5179.3oc68j1aiijce18uBFkAn2rvsm5jGAHAYmcy1AH8rIXlNXPPOCLnjJK
y1TjJjT1cuK182dpKRQJwihREosWLMPKyqh06td0qduh+k2b0hkoegkuv4e1
4SNWc0e4MWck7RhKbk97qVrM7KqhCykO1hUoa2xRJVbs5dEruTHu9tLVdtS3
cErLmU2GlrIJYiypz0rxmLY+1njXVg70.0WbWXwp64O4sYrUEJvf55dC3ZGL
DeC8ZGHEKNCAtA37KGdSo6KJeU.8UiVKgizke9cdfEhq8WeyaD+b8EhYY6Sb
Ru6NmsrhrzjzsrqcRybxYIqcVEmt5AmnjhTmUYoOwOZ29BGT4qHNJgsJceh7
8fFIc.hIRBPfhLDHIJ3wPFbCrIYXSVzZGEWNuHrXz7Unqu.E7PTABEbFrUWe
ahO+iblpyCrul6rN8ojQKkBjHfqKPhMny.a7rI1rkyWB2vbVxD5cbgyBGsPo
UDFw9PAd5A8Ov7Fovn64ftK2WTjNZliGxS.fDOpjsPJ+sCns7MotTwW2wTul
EK4lwVT0nZHCNXQUumExMLvxtkkDtLV1RvrgntAtSLh5YaDUKndh.7OuPZ77
Sne4ls7QM9MuUNHB6sbae2bsC3F30NuMKJmi+u8e5mWT176RSJR3vk7U76xh
BiakDh5lD5ik5t3f.kJrhFBGOM7.8S.T4Q+Y4Mf72TMTcUZbZlpAfaBBbAd9
D9HcbihjfqM7R0gs5rJZIpubSitAbcsep2X8ygF7A2jEtNhorb.qZ7cQwwxW
vskTgEp9skmP9Kz.H5nlTAanqq8SuMYTcBWDSIJi7.ULpFOv9hz5ne6O0trz
coYEQbMX4yPm.EC3bqXfbuwiarG6hekqYP79UMiWyZFIrm3rwS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WFy39XnRxkuKMs1hvtJlElYZftACJ9dfd
dxA1KttlAguJLKe7LMoVSjKJ4AiMe5JrU5WYzAqWkjAi.yvM6LsldpT4gkUU
80Gn9QC6aiAPZWxyW23WKr7DlCSynqHV1H7IdaX.CnMqy8zJqnl7fJ5B+jHQ
cetc6OV3T7vSFrUEwJ+eoU1AKEV5KJef.hNKICBv9d5i77spebpMPouKdO6c
vQEIeQFH6oyYgCXXPc7xl.XV5SIiFBGjxaQH72+0vwCf.T.UkiHddXLRkqVH
H2bp8Av2mwXmADJodUgbBJ+9FYef6GXqGMn4UYlEV4oA.gonIPA4+kEGm9T+
f3oIUEM..76yDpOhpRYDOenubrCdan10+1FH.50HBHCA964yCb7hHUy.ld3a
zU8QXsB.tae1t9C01Il1I.TfJ1H.2.oLLxm5h7MbZqdUIIHQlfLR6FBMSqR3
yXqXQO1+p+zlLQkyiG.Nf0m1Vlx4f2OPpV2b7.hqKV+saC5oSMVtzZ.t2Qhm
GonbVx57WZVmyKVdXdwFMY1VBZyrms3Eg6FAH+gvhTmOH7uag05+7B1c6iiK
FWP3MMPYGm7n9TJTEpUWrGVkvstbUNqtnHkH0DgSVzyYDeRqpbFDWoZfQA3.
eqRODey6eIUiDOIlmzWGgf+eHJq3qN+6apkjnsOAcffEJmJBVy4DeCOTgY1n
wqLLYSaeV9vf.fqudTDhdYYcA.U8VDzAgE6ddDVUIlJWkGAoJemlEJ2RVeye
8M++.1VHHn.
-----------end_max5_patcher-----------

js file:
grid-logic.js (3.2 KB)
(bugfix: clearing neighboring gate)

if you hold a button down and press a following button, you can create gate signals.
the integer attached to the counter sets your sequence bar length.

it’s super messy but works (hooray!); i plan on cleaning it up tonight. you can run it off of the max metronome, or via a clock into in2 of crow. actually, i can’t seem to get in1 working at all, which sucks—if anyone has a clue of why that’d be, i’d really appreciate it.

once both ins are working, next step is to add a playhead reset trigger to in2. after that, a way to set sequence length from grid would be cool.

if this would be useful for anyone else / if something better already exists, would love to hear about it :slight_smile:

3 Likes

additionally, for folks who’ve made sequencers before: is there a proper way to start my sequence at the “-1th” step, but have it loop correctly once it restarts? can think of a few gnarly ways

Might help, might not, but QUENCE uses modulo arithmetic and the fact that Lua is 1-indexed (vs. 0-indexed, that is) to start at “step 0”.

You’re coming from JS… Lua isn’t particularly less readable than that :smiling_imp:

PS. Yes, that is a back-handed jab at both.

1 Like