Forums > MaxMSP

prepend and #1 style arguments

March 12, 2010 | 11:39 am

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.

Attachments:
  1. example.zip

March 12, 2010 | 11:57 am

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.


March 12, 2010 | 12:12 pm

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

check patch below:

– Pasted Max Patch, click to expand. –

March 12, 2010 | 12:18 pm

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.


March 12, 2010 | 12:22 pm

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

– Pasted Max Patch, click to expand. –

March 12, 2010 | 12:23 pm

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

thanks!


March 12, 2010 | 1:13 pm

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


March 12, 2010 | 2:15 pm

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


Viewing 8 posts - 1 through 8 (of 8 total)