prepend and #1 style arguments

jirko's icon

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.

211.example.zip
zip
goodparleyandorfing's icon

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.

justin's icon

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.

hth

j

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

check patch below:

jirko's icon

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

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

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

Hope this makes it clearer.

justin's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

jirko's icon

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

thanks!

pdelges's icon

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

jirko's icon

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