prepend "list"


    Apr 03 2007 | 6:39 pm
    hi
    to a (quite long) list I need to prepend the words "list maxelem 9"
    (yes, it is for driving a peqbank~)
    of course the word "list" gets lost, so the object [prepend list
    maxelem 4] does the same thing than [prepend maxelem 4]
    I tried with [prepend list] which does not work when using the
    [prepend] object, but works with the prepend message. So it kind of
    could work, but makes me [prepend set] a pretty long list in a
    message box, then send it a "prepend list" message... and "list"
    gest lost again.
    how could I prepend this word, "list", to a list ?(I seem to
    remember there was a discussion about this question but was not able
    to find it.)
    many thanks
    kasper
    --
    Kasper T. Toeplitz
    noise, composition, bass, computer

    • Apr 05 2007 | 7:38 pm
      Hi, why dont you use zl join? This should work!
      GErald
    • Apr 05 2007 | 7:43 pm
      http://www.cycling74.com/forums/index.php?t=msg&goto=89976
      i think its this one, lengthy, never figured out the answer myself
      On 4/3/07, Kasper T Toeplitz wrote:
      >
      > hi
      >
      >
      > to a (quite long) list I need to prepend the words "list maxelem 9"
      > (yes, it is for driving a peqbank~)
      >
      > of course the word "list" gets lost, so the object [prepend list
      > maxelem 4] does the same thing than [prepend maxelem 4]
      >
      > I tried with [prepend list] which does not work when using the
      > [prepend] object, but works with the prepend message. So it kind of
      > could work, but makes me [prepend set] a pretty long list in a
      > message box, then send it a "prepend list" message... and "list"
      > gest lost again.
      >
      > how could I prepend this word, "list", to a list ?(I seem to
      > remember there was a discussion about this question but was not able
      > to find it.)
      >
      > many thanks
      >
      > kasper
      > --
      > Kasper T. Toeplitz
      > noise, composition, bass, computer
      > http://www.sleazeArt.com
      >
      > http://www.myspace.com/sleazeart
      >
      >
    • Apr 05 2007 | 8:07 pm
    • Apr 05 2007 | 9:57 pm
      > to a (quite long) list I need to prepend the words "list maxelem 9"
      > (yes, it is for driving a peqbank~)
      >
      > of course the word "list" gets lost, so the object [prepend list
      > maxelem 4] does the same thing than [prepend maxelem 4]
      >
      I think Gerald's solution is better than my sprintf one:
      mz
    • Apr 06 2007 | 9:24 am
      Hi,
      I have to disappoint you, it seems not to be possible to prepend the word list to a list... and there is no %l arg to sprintf ;-)
      Gerald
      max v2;
    • Apr 06 2007 | 10:29 am
      why not substitute the word list with something else and then substitute it back just before its needed?
    • Apr 06 2007 | 11:28 am
      On 6 avr. 07, at 13:04, jln wrote:
      > But won't the problem be the same ? It'll still be removed when
      > needed, won't it ?
      >
      > In fact, I guess the question is why do you really need the word
      > list to prepend your parameters ? If it's for visual information,
      > then you'll need to make it as a symbol at some point, as people
      > suggested. On the other hand, if it's for your string to be
      > recognized as a list, I'd prepend your parameter with 1 or whatever
      > int you want and use route to get rid of it when needed. Or maybe
      > I'm missing something, here.
      'list' is a reserved keyword (like int or float). Kasper, could you
      post just a part of the patch, so we can look at it to solve your issue.
      ej
    • Apr 06 2007 | 12:22 pm
    • Apr 06 2007 | 12:52 pm
      hi.
      have you try with scripting ?
      this patch is very unpleasant but it seems to be working ....
      best
    • Apr 06 2007 | 1:15 pm
      >Hi, why dont you use zl join? This should work!
      does not
      kasper
    • Apr 06 2007 | 1:17 pm
    • Apr 06 2007 | 3:16 pm
      Hello
      That works for me...
      jmb
      jose manuel berenguer
      jmbeal@telefonica.net +34932857046 +34696538403. http://
      www.sonoscop.net/jmb/
      jmberenguer@sonoscop.net +34933064128. http://www.sonoscop.net/
      caos->sonoscop. cccb. montalegre, 5. 08001 barcelona
      spain
    • Apr 06 2007 | 6:49 pm
      > 'list' is a reserved keyword (like int or float). Kasper, could you
      > post just a part of the patch, so we can look at it to solve your issue.
      >
      One solution would be for peqbank~ to use a different word for this function. It was, I think, a poor decision on the designer's part to use list (as a reserved word). I can leave it in there for compatibility, but also give that function a better name.
      Any suggestions?
      mz
    • Apr 06 2007 | 7:12 pm
      > > 'list' is a reserved keyword (like int or float). Kasper, could you
      >> post just a part of the patch, so we can look at it to solve your issue.
      >>
      >
      >
      >One solution would be for peqbank~ to use a different word for this
      >function. It was, I think, a poor decision on the designer's part
      >to use list (as a reserved word). I can leave it in there for
      >compatibility, but also give that function a better name.
      >
      >Any suggestions?
      of course it would be nice!!
      eq ? bank ?
      best
      kasper
      --
      Kasper T. Toeplitz
      noise, composition, bass, computer
    • Apr 10 2007 | 1:29 pm
      Quote: Kasper T Toeplitz wrote on Tue, 03 April 2007 20:39
      ----------------------------------------------------
      > to a (quite long) list I need to prepend the words "list maxelem 9"
      > (yes, it is for driving a peqbank~)
      Frankly, the use of the list message as described in peqbank~'s .help file is bound to cause problems in Max. I don't know if Tristan and Michael are reading, but I would strongly recommend that they overhaul the object to provide an alternative approach for what they're using lists for. Lists beginning with messages are "officially" invalid in Max. I know there are techniques for circumventing this rule, I've even done it myself, but it is a Bad Idea. As you've discovered, Kasper, there are objects that enforce the rule that "any list beginning with a symbol is converted to a message (the symbol) followed by arguments (the rest of the list)."
      Since the peq, shelf, and maxelem messages are already delcared as variable-parameter (A_GIMME) messages, it would be better practice to parse a message like 'maxelem 4 shelf 4. 0. 3. 500. 6000. peq 2000. 1. 0. 8. 5. peq 3000. 0.5 -2. 10. 0. peq 4000. 1.2 -2. -18. -6.' into the component messages.
      I think the easiest way to work around the problem is to simply send the messages separately, perhaps using a comma-delimited message box.
      Hope this helps,
      Peter (sort of back on the list)
    • Apr 10 2007 | 2:06 pm
      Quote: Peter Castine wrote on Tue, 10 April 2007 15:29
      ----------------------------------------------------
      > Hope this helps,
      > Peter (sort of back on the list)
      It's true, it has been awfully silent from your side the past few months. Nothing bad going on, I hope?
      Mattijs
    • Apr 10 2007 | 6:07 pm
      Quote: Peter Castine wrote on Tue, 10 April 2007 06:29
      ----------------------------------------------------
      > Quote: Kasper T Toeplitz wrote on Tue, 03 April 2007 20:39
      > ----------------------------------------------------
      > > to a (quite long) list I need to prepend the words "list maxelem 9"
      > > (yes, it is for driving a peqbank~)
      >
      > Frankly, the use of the list message as described in peqbank~'s .help file is bound to cause problems in Max. I don't know if Tristan and Michael are reading, but I would strongly recommend that they overhaul the object to provide an alternative approach for what they're using lists for.
      Yes indeed I'm reading; two messages back I was suggesting the same thing, and calling for suggestions for a more appropriate name.
      I'm liking "bank," so far. I'll leave "list" in, for backward compatibility.
      mz
    • Apr 10 2007 | 7:18 pm
      > > Frankly, the use of the list message as described in peqbank~'s .help file is bound to cause problems in Max. I ...
      >
      > I'm liking "bank," so far. I'll leave "list" in, for backward compatibility.
      >
      The macho version is at
      CFM and Windows versions pending.
      mz
    • Apr 10 2007 | 8:04 pm
      > Yes indeed I'm reading; two messages back I was suggesting the same thing, and calling for suggestions for a more appropriate name.
      Sorry, missed that...
      > I'm liking "bank," so far. I'll leave "list" in, for backward compatibility.
      If you want a dedicated message for concatenating multiple messages... how about 'params' or 'settings'? For that matter, the 'set' message is currently unused (using it in this setting would be only a little unorthodox, at least without the difficulties of 'list').
      But 'bank' is also fine.
      -- P.
      >Nothing bad going on, I hope?
      No, just trying to focus on real work that needs to be done. And giving the Max list up for Lent seemed more productive than, say, swearing off chocolate.-)