prepend and #1 style arguments

Mar 12, 2010 at 11:39am

prepend and #1 style arguments

I’m having problem with prepend and bpatcher arguments. The arguments are not passed from the bpatcher to the prepend object.
To illustrate what I’m doing I have uploaded an example.

Thanks in advance.

Mar 12, 2010 at 11:57am

when you click the message box you get /foo/#1_sunit 0 0 0 0 0 out of the bpatcher, which is exactly what you would expect. i’m not sure i understand you correctly..

also you can use ‘copy compressed’ for things like this, which is better than attaching a zip file. just paste the compressed bpatcher followed by the main patch and people will know what to do.

Mar 12, 2010 at 12:12pm

i had a similar problem a while back and i tracked it down to the #1 not being the first character in the msg.

for your patch i suggest to construct the path outside of prepend, probably something like sprintf.



check patch below:

– Pasted Max Patch, click to expand. –
Mar 12, 2010 at 12:18pm

yes I now about copy compressed, but its easier for the people to download just one file.

What I expect is /foo/1_sunit 0 0 0 0 0 not /foo/#1_sunit 0 0 0 0 0
So if I had many bpatchers with different arguments (f.e. 1 2 3 4) I expect this:

/foo/1_sunit 0 0 0 0 0
/foo/2_sunit 0 0 0 0 0
/foo/3_sunit 0 0 0 0 0
/foo/4_sunit 0 0 0 0 0

Here is a new main patch to ilustrate what I mean:

– Pasted Max Patch, click to expand. –

Hope this makes it clearer.

Mar 12, 2010 at 12:22pm

here’s an example of how to get around this:

– Pasted Max Patch, click to expand. –
Mar 12, 2010 at 12:23pm

@justin yes, your right. that seems to be the problem.


Mar 12, 2010 at 1:13pm

If the reason you build these messages are for OSC messaging, then cmnat’s OSC-route has a nice workaroud for this.

Mar 12, 2010 at 2:15pm

thanks for the hint, but I’m constructing the OSC msg inside max and sending this data to the compiler.


You must be logged in to reply to this topic.