request function line~ data from a poly instance
I’m attempting to drive a line~ from within a poly instance with data from functions. The functions are in subpatches and there are many of them (8 functions per subpatch * 32 subpatches).
The problem is that when I send a bang to a given function, I need to be sure that the output from that function gets directed to the line~.
I tried using a pattr and binding it dynamically to the function I am querying, but the results were very unpredictable from within the poly instance. After a while, the pattr would only send back a zero instead of a nice list of number pairs. I abandoned that approach.
Next I tried using forward. I would send a list of numbers in the request, and have logic in the functions subpatch that parsed that request (sender instance in poly~, functions subpatch number, function number (1-8). After spending a few hours on this method, it seemed clear that it would be quite complicated. The data coming out of the function is a series of separate number pairs, all of wich have to be routed to the right pole instance, so once again the logic started to get very complex. Even with the functions set to list mode, only the first pair would get through the forward.
Next I am considering the use of a central router that would handle all routing of function subpatch to poly~ instance. This thing would be huge because of all the functions and potential number of poly~ voices.
There has to be a better way, has anyone worked on this kind of issue before, and if so, how did you solve it?
Thanks so much!
maybe this example does what you want?
Thanks for the reply!
I thought about putting a function in the poly~ instance but I wanted to avoid using additional UI objects. I thought there would be some kind of performance loss. That method does make a lot of sense in terms of simplicity though.