Using nested bpatcher arguments, to form send/receive/value objects

centre ville's icon

Hi,

I'm running into a problem. I cannot use two arguments in send received or value objects like this.

#1#2---mysend

This is because its not possible to combine these two arguments together.

I thought I could maybe set the send receive objects name dynamically myself, and that works fine, but it does not work for "value" objects which I use quite heavily and this is also the same for pattr objects I believe.

In order to get value ato work, I can write an abstraction using coll, but then again, I will have to predefine every coll I cannot set them dynamically. I'm not sure what the workaround would be for pattr?

I'm wondering is there any better way around these problems? Can I combine the two arguments together maybe and then add them to the bpatcher with patcherargs? Is there any way to set arguments dynamically?

Roman Thilenius's icon

[loadbang]
[t #1] [t #2]
[sprintf %s%s_mysend]

"dynamic patcher arguments" do not exist. you would have to combine/alternate between your original #1 with an inlet or a receive.

tyler mazaika's icon

Use forward rather than send and you can set its target dynamically. Receive you already can set its target dynamically. Just merge the #1 and #2 together in combine or sprintf.

for value you could try using thispatcher to script creation / cabling with the required name.

centre ville's icon

Thanks all, I'm guessing this doesnt help me with pattr though, there is no way to set this. It seems to me that the only way is to make a new bpatcher for every unique one I need? I wanted to encapsulate in a bpatcher, so the first bpatcher has an argument, and that is passed down to the 8 bpatchers inside the parent so they can make unique names for the pattr, value and forward/send/receive objects. The problem is that I cannot combine them though. It seems there is no way around this. Would love to find out if there is a workaround.

I think I will have to just include multiple x8 bpatchers and label them all individually.

e.g.

1_1, 1_2, 1_3, 1_4, 1_5, 1_6 ,1_7 , 1_8

2_1, 2_2, 2_3, 2_4, 2_5, 2_6 ,2_7 , 2_8

Patrick Reed's icon

You can change the name of pattr objects by a name $1, then i would only include one load bang at the top level of the bpatcher, then send the names or arguments to each bpatcher through a send or inlet the names of what each bpatcher should be called in arguments. Or you could use thispatcher to script on load the 8 bpatchers and give the argument names then. Not sure if this helps, But i do a lot of dynamic loading of bpatchers, it can get messing sometimes, because you have to think about loading sequencing as well.