Forums > MaxMSP

Send infos to different instances of a poly~

September 11, 2009 | 1:25 am

Hi,

A friend of mine advised me to deal with poly~ rather than a set of bpatchers to more CPU efficient but I’m new with this object so sorry for my newbie questions.

1 Is there a way to send infos (bang, ints) to individual instances of a poly~ using the objects send and receive, and not using real "in"s and the "target" message ?
In other words is there a way to have a kind of argument #1 for each instance of poly~ ?

2 Is it possible to use a groove~ inside a poly~ where each groove~ of an instance read a different buffer~ (outside of the poly~) ?

thanks a lot for your help

Florent


September 11, 2009 | 5:30 am

In short…yes Smile

Quote:
Is there a way to send infos (bang, ints) to individual instances of a poly~ using the objects send and receive, and not using real "in"s and the "target" message ?
In other words is there a way to have a kind of argument #1 for each instance of poly~ ?

within each instance, a bang to "thispoly~" generates its instance number. You can then use this number to generate specific receives within an instance. For example, say loadbang>>thispoly~ produced "4" (instance 4). Feed that number into "sprintf set %i_param" connected to a "receive" object with no argument. The sprintf will create the message "set 4_param", which in turn sets the argument for the receive object essentially creating a "receive 4_param". If you wish to create unique sends within an instance, look into the "forward" object. Same procedure also works for audio send~/receive~ objects.

Quote:
Is it possible to use a groove~ inside a poly~ where each groove~ of an instance read a different buffer~ (outside of the poly~) ?

yes again. again using bang >> thispoly~ you can change the name of the buffer the groove~ object is using. Check out the help file for more info.

David


September 11, 2009 | 12:20 pm

Thanks a lot David for your answer !
I knew the answer was around this thispoly~ object.
I’m just not very confortable with the sprintf messages.
That’s great.
merci beaucoup

Florent


September 11, 2009 | 3:38 pm

the alternative is to name buffer/groove/wave/play/.. from
outside the poly, aka "target 3, set sample3"

there are about 25 threads about the same question, so
search the forum for more info.

-110


September 11, 2009 | 3:42 pm

…and one could also perhaps have a look at the poly~ tutorials that come with MSP (broad newbie hint).


September 11, 2009 | 5:45 pm

Thank you Roman.
I thought I looked enough to the forum, indeed I haven’t.
I am sorry.
In tutorial N°21 about poly~ we learn about getting the instance’s number trough thispoly~ object, but not to have an associated argument for the "receive" object.
I didn’t know the message "sprintf set %i_param" connected to a "receive" object with no argument would do that.
I don’t know C- Language.
I am sorry for my ignorance.
Florent


September 12, 2009 | 7:37 am

No worries! poly~ is one of the most powerful and toughest to learn concepts in Max. The fact that you are approaching it means you’re obviously trying. Nevermind the haters and don’t be afraid to ask questions! While this forum is knowledgeable, you have to accept that we can be rude sometimes. Me included.


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