-
Hello all!
I've started building a step sequencer in Max for Live for my 128. I'm basically taking snippets of the Obo patch by Stretta while learning how to build things in Max, and trying to add my own upgrades.
What I'm trying to do is to have a vertical bar following the current playing step in the sequencer. The original approach by Stretta involves a moving "cursor" in the top row, but since I'll be using the top row for controls I thought I'd setup a moving bar at a lower LED intensity than the selected steps in the matrix.
I figured out how to output matrixctrl data to the grid every time I edit the sequence.
My problem is that relying on the matrixctrl object to send LED data for the moving bar works as long as the refresh rate is low. If I set the steps duration to anything higher than 32nd notes I get random stuck LEDs on the monome, because the matrixctrl object sends data in a stream of triplets (x y s) for each individual node.
One solution I thought of would be to refresh two columns at a time instead of the whole grid by using /grid/led/level/col and a bitmask to send the grid the state of the current column (all lit at half intensity) and the state of the previous column (lit accordingly to the matrixctrl object state, at full intensity).
Is this a good approach or are there better solutions to my problem? -
maybe have a look at the guts of 64step? the 'playhead' is a full column though i don't know which method they've used for the leds.
-
Thanks for the tip! I tried opening up 64 step but in the end I realized I had almost solved the problem... They key was to use the [zl reg] object to store the previous step configuration and then bang it when the next step comes up! Fun times, it's taken me two nights to figure out...
Here is how it looks with the varibrightness option on. I have also implemented a full brightness playhead, maybe I'll do a quick demo of the different modes later on. -
I was gonna say have a look inside my controller patch for monosequencer cause it does this...But you've figure it out, nice!
-
I believe I'm beginning to *think* in Max. It's sometimes very hard, but it gets better and better every day (and night!).
The solution I found was giving me problems with ghost cols hanging when switching presets, so I made a better version of the "get the previous col" bit by getting the data straight from the [coll] without going through [matrixctrl]. No lag, no hangs, fast and reliable! I love this program.
I might get rid of [matrixctrl] as a whole in the end, it's got way too much lag compared to [coll].
Also, we got presets!! -
I've never really got my head around [coll] for monome usage. I'd love to see the code...
-
@karaokaze: yeah, I'm beginning to see things but it's still a little frustrating because M4L crashes often and I have a hard time figuring out how to have the patch keep the configuration as I left it... meaning, last night it was working just fine and now it's all packets lost and deleted notes in the matrix.
@declutter: everything is pretty much in Stretta's Obo, check it out! Here is the core of the whole deal:
----------begin_max5_patcher----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w+xt75CEOXNLMydnYW1aQdxqosW
uYSbbQb9pWRKSVUdH2tKn8ckXw80eN+w8+efRGHjZ
-----------end_max5_patcher----------- -
I have a couple of questions for the pros:
1. Why am I getting lost packets? Might be double connections or loops between send and receive objects?
2. Speaking of which, how can I reset [send] and [receive] objects? I found out that every now and then they get stuck with data from an old connection, when it's not there and the original object isn't sending data... It happens also with the serialosc bpatcher, it receives data that isn't there!
It mostly happens when the sequencer is running and I change connections between objects. The only solution I found is to rename the send and receive objects, sometimes even destroying them and creating new ones with new names. Simply destroying a receive object and creating a new one with the same name doesn't appear to be working...
Any light shed on these issues would be much appreciated!
I was going to post a video showing off the pattern switching but I must have broken something... >:\ -
Thanks @karaokaze! Most of my problems were fixed when I got rid of a matrixctrl left alone in a corner, that was however sending a bang on every metronome tick... Now there are minor glitches with send and receive objects that seem to solve when I save the device. So far so good.
Updates!
1. I managed to get rid of [matrixctrl] completely, using only [coll] and devising a way to initialize empty sequences and (basic) notemaps with every patcher's friend, the [zl] object.
2. Now we have patterns, 4 for now for quick access in the control row. In the future I'll build a page to store 64+ patterns, but that would require a pretty big [coll].
3. Octaves! I figured out a way to have a Y offset, so I can enter notes from 6 octaves on the 7 rows of my 128.
4. The top row is for control: button 15 toggles playback, optionally blinking on quarter notes (varibrightness monomes also get the "count": full lit 1 and dim 2, 3, 4, etc); buttons 13 and 14 are used to select the Y offset; buttons 0, 1, 2 and 3 select the four available patterns.
I'll keep developing and most likely start a new thread once I'm confident enough to start some beta testing! Little performance video coming soon!

