Hello everyone.
Noob question once again: could anyone help me out filter out a specific message from an incoming list ?
Right now I unpack my list and send my results to a symbol/atom box.
The issue is that there are certain messages that I wish to filter out, and send to different symbol case.
I've tried the route object, but it doesn't do what I want (maybe I just couldn't do it).
I'm looking for something able to do the opposite from "select", but in this case is a "word" that I want to leave out.
I've also looked for the expressions (if, etc), but I think they don't apply to symbols ?. So if anyone can point out a solution, tutorial or a file help, that would be great.
Thanks everyone for your help !
Mel
-
How to filter a specific message/symbol ?
-
@lavirgenmarea Ok, I think I figured out the problem with "select". I can't output the message that matches the argument, If I understand correctly, I can only output a bang. I think I can do a quick workaround, but if there's a better solution I'll be happy to learn.
Thanks ! -
@lavirgenmarea here is my soon to be uploaded improved [list-find] which can do what you need and more. Quick basic help:
Arguments - what to search for (can be lists)
Left inlet - List to search or any of the [list store] methods like get, insert, delete (be very careful with inserting/prepending/appending during a search!) See the [list] store] helpfile for all the methods available.
Right inlet - search terms (can be a list)
Left outlet - Anything you ask for with the get method
Middle outlet - results, given as index
Right outlet - Number of results found
testsearch.pd
l-find.pdUnmentioned features, basic wild cards and pattern matching (s for symbol, f for float or ? for either), wild cards can be changed on the fly, lists can be searched backwards, can be search in groups, return n results. Full help will be along soon.
-
@lavirgenmarea Here is a simple solution using list-drip from https://forum.pdpatchrepo.info/topic/11122/faster-list-drip-with-list-store-pd-0-48.
[sel] is used to filter the contents. Getting the filtered element is a little bit awkward, but usually the way to go: Send the element down and let [sel] bang it through.
-
iterating the list and then using route seems right.