list filter


    Apr 13 2006 | 11:20 pm
    i am using matrices to route data. i just need an object that acts like "sel" but for lists instead of just ints and floats etc. i have tried the match object but to no avail. any ideas? anyone?

    • Apr 13 2006 | 11:32 pm
      match didn't work? in what context?
      -- robin
    • Apr 13 2006 | 11:44 pm
      i connect match to the left outlet of matrix and set match to bang on "0 0 0" but it also bangs on 0 1 0. it seems as if it isnt filtering properly.
    • Apr 13 2006 | 11:56 pm
    • Apr 13 2006 | 11:59 pm
      hmm. souns like im gonna have to leave this someone more experienced than me. sorry
      -- robin
    • Apr 14 2006 | 12:14 am
      i get that error (assuming it is an error) too. i cant think of any reason it should do this. but like i said, im no expert
      good luck with that
      -- robin
    • Apr 14 2006 | 12:15 am
      a quick fix would be [unpack 0 0 0] into three selects, but its disgustingly brute force
      -- robin
    • Apr 14 2006 | 12:20 am
      i dont follow. what do i set sel to?
    • Apr 14 2006 | 12:37 am
      ignore that, you don't need select
      you want 0 0 0 to be reported? try:
      -- robin
    • Apr 14 2006 | 10:11 am
      Rob wrote: > i am using matrices to route data. i just need an object that acts > like "sel" but for lists instead of just ints and floats etc. i have > tried the match object but to no avail. any ideas? anyone?
      Does this work for you?
      --
      [][] [][][] [][] [][][] [][][][][][][][][][][][][][][]
      Stefan Tiedje Klanggestalter Electronic Composition & Improvisation
      /~~~~~ \ /|() ()| ))))) )| | |( \ /// _/)/ ))))) ___/ ///
      -------------------------x---- --_____-----------|----------- --(_|_ ----|-----|-----()---- -- _|_)----|-----()----------- ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France Phone at CCMIX +33-1-57 42 91 09
    • Apr 14 2006 | 11:30 am
      Rob wrote: > i connect match to the left outlet of matrix and set match to bang on > "0 0 0" but it also bangs on 0 1 0. it seems as if it isnt filtering > properly.
      I can confirm, I think its a bug. I just looked at the solution I used in my St.==. And there I convert it to a string before I compare. As shown before this technique would also work with select and route...
      Stefan
      St.== for further studies... (this is newer than the version on c74/share and accepts also lists as arguments.)
      --
      [][] [][][] [][] [][][] [][][][][][][][][][][][][][][]
      Stefan Tiedje Klanggestalter Electronic Composition & Improvisation
      /~~~~~ \ /|() ()| ))))) )| | |( \ /// _/)/ ))))) ___/ ///
      -------------------------x---- --_____-----------|----------- --(_|_ ----|-----|-----()---- -- _|_)----|-----()----------- ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France Phone at CCMIX +33-1-57 42 91 09
    • Apr 14 2006 | 4:55 pm
      i take it one of those worked for you then?
      -- robin
    • Apr 14 2006 | 5:19 pm
      stefan, thanks! i am just going to use tosymbol and sel. i cant figure out what that other patch you gave me does. but the using sel with tosymbol works fine.
      thanks again.
    • Apr 14 2006 | 7:39 pm
      yes of course; [match] does not know where your list (= the matrix output) begins. match _accepts list input, but i can not _tell a list from many numbers.
      connect a [print] to the matrix and you will see. when you click the first knob twice you send: "0 0 1, 0 0 0", and 0 0 1 0 0 0 contains 0 1 0 ...
      i think you want to [unpack 0 0 0] the lists to get matrix knob status.
    • Apr 14 2006 | 7:55 pm
      > i think you want to [unpack 0 0 0] the lists to > get matrix knob status.
      actually, what i meant was this.
      use [route] to route. [route] routes lists just fine. (it just cuts off the first element, which we dont need anyway here.)
      then you can use [unpack 0 0] make the on/off item in the list a bang:
    • Apr 14 2006 | 8:14 pm
      rob
      glad to know you appreciated the effort i went to for you.
      not one word of acknowledgment for the patch that i took time to prepare as a solution to your problem. hardly inspires faith in helping others on the list
    • Apr 14 2006 | 9:52 pm
      sorry, i really do appreciate every one who helps by posting solutions. even though i didnt end up using your solution it is great to know that there are those out in cyber space who care about helping novice programmers.
      so to you all...
      much thanks and best regards
      rob
    • Apr 15 2006 | 7:57 am
      ok, let me advertise my checklist external that does what your looking for: it compares lists (mixed types).
      stephan: your approach to convert any list into a symbol before using match is dangerous performancewise. imagine having a stream of numbers coming from a sensor at relatively high speed (~ 10 ms): you'll have a symbol generation and symboltable lookup for *every* item you're trying to match, do this in an installation that runs for months without reboot and your dead.
      in the attached patch i'm doing the comparison of the matrix selection using route like roman proposed, then i'm showing the usage of the checklist external and i also added a commented abstraction that will compare two lists item by item iterating through them in parallel with an uzi.
      the last thing i would like to comment on is that these kinds of things are much easier to do in javascript/java where looping and comparison functionalities are more comfortable to use.
      hth
      /*j
      > i am using matrices to route data. i just need an object that acts > like "sel" but for lists instead of just ints and floats etc. i > have tried the match object but to no avail. any ideas? anyone?
    • Apr 15 2006 | 4:50 pm
      jasch, you're saying that if i use stefans tosymbol idea then my cpu will be running too hard. or at least there is an easier way to filter lists?
      thanks
      rob
    • Apr 15 2006 | 5:41 pm
      exactly
    • Apr 15 2006 | 6:58 pm
      /*j wrote: > stephan: your approach to convert any list into a symbol before using > match is dangerous performancewise. imagine having a stream of numbers > coming from a sensor at relatively high speed (~ 10 ms): you'll have a > symbol generation and symboltable lookup for *every* item you're trying > to match, do this in an installation that runs for months without > reboot and your dead.
      Thanks for the hint, best would be cycling acknowledges the behaviour of match as bug and fixes it... For my needs of comparisons though the symbol creation is most likely no issue
      Stefan
      --
      [][] [][][] [][] [][][] [][][][][][][][][][][][][][][]
      Stefan Tiedje Klanggestalter Electronic Composition & Improvisation
      /~~~~~ \ /|() ()| ))))) )| | |( \ /// _/)/ ))))) ___/ ///
      -------------------------x---- --_____-----------|----------- --(_|_ ----|-----|-----()---- -- _|_)----|-----()----------- ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France Phone at CCMIX +33-1-57 42 91 09
    • Apr 15 2006 | 7:39 pm
      jan is in dialectic trouble anyway with this idea since he had been taking java solutions into account :)
      i am big fan of the zl objects ... there should be a few more of them ... like funnel and spray!
    • Apr 15 2006 | 8:00 pm
      Rob wrote: > jasch, you're saying that if i use stefans tosymbol idea then my cpu > will be running too hard. or at least there is an easier way to > filter lists?
      If you use it in the context you want to, its no problem, as there is only a limited number of combination possibilties, each one would create a symbol which will be stored somewhere in the memory, but its small. If you want to compare ever changing values and keep doing so over months this is an issue. No problem for your problem I guess...
      Stefan
      --
      [][] [][][] [][] [][][] [][][][][][][][][][][][][][][]
      Stefan Tiedje Klanggestalter Electronic Composition & Improvisation
      /~~~~~ \ /|() ()| ))))) )| | |( \ /// _/)/ ))))) ___/ ///
      -------------------------x---- --_____-----------|----------- --(_|_ ----|-----|-----()---- -- _|_)----|-----()----------- ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France Phone at CCMIX +33-1-57 42 91 09
    • Apr 16 2006 | 6:17 am
      and there's also L== by peter elsea,
      how's that for dialectic....
      >> Thanks for the hint, best would be cycling acknowledges the >> behaviour of >> match as bug and fixes it... >> For my needs of comparisons though the symbol creation is most >> likely no >> issue >> >> Stefan > > > jan is in dialectic trouble anyway with this > idea since he had been taking java solutions > into account :) > > i am big fan of the zl objects ... there should > be a few more of them ... like funnel and spray!
      or the whole python-suite in single max objects
    • Apr 16 2006 | 11:34 am
      Quote: jasch wrote on Sun, 16 April 2006 00:17 ---------------------------------------------------- > > and there's also L== by peter elsea,
      there is also Y== by Yvonne Catterfeld but that is OS 9 only.
      no i dont think i like comparing lists as a solution for routing them. you will have to type a lot of lists when you have to route data from 25x25 matrix, while the use of [route] enables you to copy most parts of the code.
      -110 (in trouble as usual)