How to detect if jit.gl.slab and jit.gl.pix are receiving active input?
I have a lot of jit.gl.slab and jit.gl.pix objects being connected randomly or arbitrarily into fx chains. I need to trigger/toggle various non-Jitter objects based on whether a given gl.slab/gl.pix is an active part of the chain. Does anybody know how can I easily/inexpensively sense whether an input signal is currently present/active on each individual gl.slab/gl.pix object?
An input is being sent to one of these objects if a message like jit_matrix xxxxxx or jit_gl_texture xxxxxx is going into one of their inlets. In the simple case where you have no other messages going into these objects, you could simply put a [t l x x x] where x is something you want to do and l is the incoming list. Basically, the idea is to use the trigger object to perform multiple tasks.
If you’re detecting of the left inlet and have multiple messages coming in such as parameters, you’ll need to generate events off of that jit_matrix of jit_gl_texture messages. You can do this with route or routepass.
Thanks, Wes! While your reply clarified some things and gave me ideas to try, I’m still stuck. Specifically, I need to toggle mute~ on for a related subpatcher if there is no incoming signal to a jit.gl.slab or jit.gl.pix object. Conversely, I need to toggle mute~ back off when a slab/pix input is present. For extra fun (and clarity), mute~ needs to be on with the slab/pix input is conceptually "off" and vice versa. I have a lot of slabs like this, so I need to do this inexpensively to avoid bogging the system with analysis. I don’t need to parse out param messages, thx. Seems like your [t l x x x] suggestion might be applicable, but I’m just not seeming to connect all the dots. Any further insights appreciated!
I think it would be really helpful if you could post a simple example of what you’re trying to do since it’s really specific to your situation. I imagine your patch is big, but I bet the small task you’re describing could be made into a bite-sized patch.
i would do something like the following
(this uses matrices instead of textures, but should work the same):
----------begin_max5_patcher---------- 1086.3oc0YtsbaCBDF9Z6mBFcsqGPnC14Ao2zzICVhZSpDnQBmCsS6yd4fTh SikDVwkZOdFoArL5e+X2kE7OmOKXi3IZS.3FvW.yl8y4ylY5R2wr11yBJIOk UPZLOVPlnrjxkAKremj9jzz+i6nb.ATRj0rm.rFPNURyjz7a.2xQfOA1yK2K ofR5s7PUyrBQip0y.SuaIRU+XU+lljhBfPtiV2bKOR0onRM3G9rcu9BFmlI1 yMZHtsS99RFufJMBF01YEQlsiw2dWsRUVCNLY0R3BPDTeEsJTeK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I9hhMwWT rIxw8Z4G1fcrVvonF61jIUUOPqaZGRiPBJI2Kp0MSVXZx31llQLnl9.q64il qGseM+OPAyD1A -----------end_max5_patcher-----------
Thanks all. I was successful with a different direction and I thought I’d share in case it helps someone else… or if somebody can point to a simpler solution. ;) (Wesley, trying to excerpt a small troubleshoot example that actually functioned turned out to be more difficult than it sounds. Robert, your solution didn’t hit the nail on the head.)
The first thing I did was take some advice from other threads and move away from the mute~ object (depricated I believe) as applied to a bpatcher, implementing with a mute message to a poly~ instead.
My goal was to sense whether a slab is receiving an active (clocked) signal (due to whether the slab is actively switched into a chain of fx slabs), for the purpose of unmuting a poly~ if active/clocked texture and muting the poly~ if inactive/unclocked texture. The big hurdle wasn’t in sensing if texture was active/clocked, but whether it had stopped. I needed something akin to a gate or weighted switch that automatically closed when nothing was forcing it open… and I couldn’t find a single existing object that does that and is compatible with textures. My solution was to use the parent patcher’s metro to clock a getstate message into jit.fpsgui. This then allows a change object to determine if fps has fallen to zero (inactive/unclocked).
Here’s a partial patch to illustrate:
----------begin_max5_patcher---------- 1652.3ocyZszaaiCD9ryuBBiEnI.oth5ks6sE6o8vBrG18TQQ.sDsMakHEDo hSZQ2e66vgR1JoVIRNt19hbDEeL7aF9MOX99UiFuP8.WOl7QxmHiF88qFMBa x1vn52GMNm8PRFSicarjuQs3Kiu08IC+AC1bIw9mUk76Lp6zbol2zkkJoQK9 F21Mp+Du5lKXlj0B4p6J4IFm.3ieF5T3D+n.5zP3uod1l7gmjOWORYUtPlwM n7zLchTTL.Q68zv1KsjkiK83euTvxFuaNTUllIgV2pqIyiEbm.MdL4y1u7iq tx931dBQIp7btz7SXz+rlSVoXYj07RNQnIFEAgJxl0bCzHgQzYrE1OAnBWbO fODljvRLh64jqSxTIekmdCQKVIg445zJtcRZFN7X6D3FS1iD8FAfz7ThPBck QRVyDRhZIY4CXm02bKYoxM3hpxBEHOvWqj4UFb8IEprG+OhXY8b9gZwnQiCR XJoty3jzzcgrd.UxmMjIDKVrPrh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qwAB5ByiCOlsNCgm5uKZi.Wb7CJlqffyI8m2AG+dvr3FBO34rAP6 EL6Ly60EXbHIyDMywIEdffQXvkY7T0EJzaxAWz9l.pBFb.UgC1wXPmXxsjwB KEh6mipaRrRstTA81UKbP+2tR2GClF+XztJzV4HatLACljI9jTOskYJXRNbC F5tLShFdX3TudTRjBVIzN3N3NtjUqP71K.32kIErKYnA0gGsdW42orAitrPe vPn+LzQezzWF81WRudC1Dw+kNzcbYlatqi2Vpu9TWY1BFLKc74lkd205b31F P19zHJ7CPJ6R4MdHELN7Bv9nKp3NtFR6MGZuGSEoUY6tF3.LfP6tYssgd28U VE2Zeujk7VJwmKJArpKyvynyl2mKwxck2Ayl0ORwdbGVQuE+A3pi4p7r+OAv Mfs8mpB0ppxjFkey8wS1sIR4ZC3urQb+zNCtVcZsHMkKayWmJzVJ7ztcW0W4 oOhS7ISZrkX6UEGrHkmHA54qUG.TvoSf75EDYCH3jIQS6gDEd5LoC5i3b5zX 1b9dc44zcfO3xRbrKE8UDmmAg+xkG+KGqm3fKK+Ey6i954jT8Wfb9WYEE2yK 00SJJKPvPeQUtMljwfue2q3LNtjeuno+gWYmseb0+C3h+wdE -----------end_max5_patcher-----------
Hope this helps somebody else. And, again, if anybody sees a simpler way to do this, I’m all ears!