Gate object problem
Hi all!
Here is the video with detailed description: https://youtu.be/n68VlaO7OBc
So the problem is that the gate object is supposed to block the data if there is 0 on 1st input, but it acts not quite like that.
It makes less sence that it works correctly in a simple setup(first part in the video), but doesnt work with midi data(second part of the video).
Maybe I don't fully inderstand it's logic, maybe it stores the last value somehow. Any advice is much appreciated :)
Thanks!
Basic patch hygiene tip: Any time you have a single outlet connected to more than one outlet, you'll save yourself a bit of trouble by using the trigger (t) object for more precise control on the order in which messages are sent to different objects located in different places in your patch. This will likely help to avoid situations in which you send the test message (0/1) before you send the value you want to pass along.


Hi,
thanks for the answer, but I don't get how is it supposed to help in my situation. In my setup I always connect single outlet to single inlet(except for the message boxes, only for illustrations).
And in your example I get 0 every time when the test value is 132.
I just want this behavior:
If the 1st outlet value(after unpack) is 123, the gate should use this value as closing signal, and block a message from the 2nd outlet value from beeing passed through.
Basically it should be a filter for this specific value.

First set the gate then send the value
Could also be done without gate.
The value is stored and only sent out if the 1st outlet value is not 123.

If I understand correctly list has to be blocked if 1st item is 123,
but pass the list otherwise.
why not simply route 123 ?
no need for unpack either

if only 2nd list item has to pass, then

"If I understand correctly list has to be blocked if 1st item is 123, but pass the list otherwise." - Yes, exactly.
Thanks again, there was no need to unpack it indeed, and right to left flow order was a discovery for me :)
I tried to use the router and it worked, but then I found a better solution: I actually use node.js script, in which is the main logic, so I just passed both values to the script and made a routing|filtering there.
I just didn't know that the multiple values can be reached inside the node.js code.
So now the solution looks like this:


But be aware that JS runs at low priority which may induce some delay. For example, if you receive CC just before a note there is no guarantee that your JS filter will also be executed before that note.