Convert pattstorage message when @outputmode 1


    Mar 14 2006 | 11:27 pm
    Hi list,
    I would like to convert messages who come from the pattrstorage when then @outpumode is active (1). I have a really big patch with a lot of subpatch.Pattrstorage right outlet messages are in this form :
    subfolder::objectname value
    I would like seprate it and use :
    ojbectname value.
    I tried [fromsymbol] without sucess.
    Cheers,
    Nico.

    • Mar 14 2006 | 11:47 pm
      how about
      -A
    • Mar 15 2006 | 1:44 am
      Hi A.
      Thanks a lot ! I know this object but i don't understand all his functions. I tried to understand it by read the manual but with no sucess... Anyway, may be you can help me one more time, my string are more complicate :
      subfolder::patcher::objectname[2] 15
      1] I would like separate it like this :
      subfolder
      patcher
      objectname
      [2] (without the [] sign)
      15
      2]
      I made a patch (below) with the patch that you send me. the outputing regxp message contains "" sign, so I have to use [fromsymbol]. Is it possible to have a string without "" signs?
      max v2;
    • Mar 15 2006 | 3:07 am
      I dunno. This stuff gives me a headache. I just try and get it to work, I'm sure there are better ways to write regexp than what I always end up with.
      the fromsymboil object in part 2 is probably how I would do it - but I have no idea of what you are trying to do or why.....
      :)
      -A
    • Mar 15 2006 | 7:10 am
      Nico wrote:
      > I would like to convert messages who come from the pattrstorage when
      > then @outpumode is active (1). I have a really big patch with a lot
      > of subpatch.Pattrstorage right outlet messages are in this form :
      > subfolder::objectname value I would like seprate it and use :
      > ojbectname value.
      something like this?
      --
      [][] [][][] [][] [][][]
      [][][][][][][][][][][][][][][]
      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
    • Mar 15 2006 | 9:31 am
      hi nico,
      apart from the regexp solutions shown, slicing the string is
      something javascript can do well.
      see attached script and patch.
      let me also mention the C-string library objects in my collection of
      externals (http://www.jasch.ch/dl).
      cutting a string is something easily achieved: first use [strrchr :]
      to find the last colon's position in the string, then set [strrcut]
      with this value and finally slice your string.
      the same technique is also useful to slice file-paths at the last slash.
      also shown in the attached patch.
      hth
      /*j
      ________________
      save as stringslicerev.js
      a = new Array();
      s = new String();
      var split;
      function anything()
      {
      a = (arrayfromargs(messagename,arguments)); // fill everythin
      into the Array (List)
      s = a.shift(); // put first element into string and remove it
      from Array
      split = s.lastIndexOf(":"); // find last occurence of ":"
      outlet(0, s.slice(split+1, s.length), a); // output sliced
      symbol and the rest of the Array
      }
      ---------------
      save as stringslice.pat
      max v2;
    • Mar 15 2006 | 11:18 am
      Have a look at the Jamona components for some great ideas on this subject...
      By the way, cheers for jamona !! great structure !