Embedding a large MatrixCtrl into a GUI screen to scroll about
Hello dear people,
I’m currently working with very large columns of MatrixCtrl objects with different sizes. I’m using these to control events, but since they have grown so large I’m trying to find a way to reduce the scope of what I’m actually seeing, and to control details with more accuracy. I did some tweaking to store the overall content of these into a Coll object, and then scroll through these lists by a common index and re-feeding this into the Matrixctrl. Now the problem is that since they have unequal sizes (33, 17, 18 for instance) they appear misaligned.
I think that a JS GUI object might do the trick, kind of embedding large Matrixctrl into a window and only showing parts of it depending on a scrollbar. It would be something like this:
oooooooo [ OOO ] oooooooo (Where o = individual matrix cell, and the middle figure is what is actually shown by the GUI window.)
Does anyone here have any pointers or ideas? Perhaps this is already too complicated, but perhaps not. If I could just find a similar object and tweak it that would be the best, since my JS skillz are beyond rusty.
Thank you very much!
I did something like this a couple years a go, sadly I don’t have the code anymore.
I think the best approach is to use a bpatcher and script the position using the offset message.
Thanks for your answer Nat. By scripting the position you mean plain old messages to the bpatcher or something more complex using JS?
BTW, does anyone else have an example code of a similar application? At least now I know my inquiry isn’t that peculiar, so hopefully I don’t have to re-invent the wheel, especially since I don’t know JS.
You could probably do it just within Max with some sliders and the offset message…
OK, been experimenting with this and it works fine, except that being large UI objects, these matrices take some processing power. I discovered the "hscroll" parameter, which does all the offsetting work for me. Now I would like to know how in the hell do I retrieve these values that the scroll sends back to [bpatcher] (or is it that it sends it to the embedded patch?). While I’m at it, I also can’t figure out how to send messages to [bpatcher] without using the inlet, which is actually the inlet of the embedded patch.
Here I copy both files, first the patch, then bpatcher:
----------begin_max5_patcher---------- 471.3oc4W1rTCCBDG+bxSQFNGcfzlu7lOGNNNzDTwIE5.azpN9taXIo1VqWb T5gbAlcYY2M+3OIsuGGQVo2JrjjqRtIIJ583nHzkyQzncDYMeaSG2hgMX.F4 1FvzQR8KKawEzqd5BVwjyMbCes.Dl6DJ9pNgKD53ZF8KXtXi1p90RUm.N1ot Gl7lMkVivJT.GjZ0cFQC3a8k4WRSGGqnzL2bQwkzjaG2mOUvqaD9MP5jV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Yv8xX7zielv30JmWnFMStnCUqYog 57Z5egnvB9C -----------end_max5_patcher-----------
I think you pretty much need an inlet to communicate to the bpatcher, but it can be any inlet as long as it goes to a thispatcher object inside the bpatcher…
Thank you! Since there’s no apparent way to control the output of "hscroll" then I will just make a custom scrollbar.
Forums > MaxMSP