prepend "list"

Kasper's icon

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

geraldg@gmx.de's icon

Hi, why dont you use zl join? This should work!

GErald

yair reshef's icon

https://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
>
>

jln's icon
mzed's icon

> 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:

Max Patch
Copy patch and select New From Clipboard in Max.

mz

geraldg@gmx.de's icon

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 Patch
Copy patch and select New From Clipboard in Max.

_j's icon

why not substitute the word list with something else and then substitute it back just before its needed?

Emmanuel Jourdan's icon

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

Kasper's icon
gusanomaxlist's icon

hi.
have you try with scripting ?
this patch is very unpleasant but it seems to be working ....

Max Patch
Copy patch and select New From Clipboard in Max.

best

Kasper's icon

>Hi, why dont you use zl join? This should work!

does not

kasper

jln's icon
José Manuel Berenguer's icon

Hello

That works for me...

Max Patch
Copy patch and select New From Clipboard in Max.

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

mzed's icon

> '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

Kasper's icon

> > '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
http://www.sleazeArt.com

Peter Castine's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

Hope this helps,
Peter (sort of back on the list)

Mattijs's icon

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

mzed's icon

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

mzed's icon

> > 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.
>

CFM and Windows versions pending.

mz

Peter Castine's icon

> 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.-)