Hey everyone,
I'm currently writing an external that accepts a list of arbitrary length (say ``a'') and does some processing on it. In my particular case the list is comprised entirely of floats. My problem is I need the output to be a list where the length is dependent on the size of the input list. I've been looking through the list source code, but I can't figure out exactly how to create a list of any length. If I always knew the length of the input list, I could just create that many outlets, but I don't want to do that for this case. Does anyone have any pointers?
-
List Output
-
@torchflame I would recommend to find an external that does a similar thing (arbitrary length list input, list output) and look for the source code. I am sure there is something like that right?
Cheers~
-
Can you be more specific? You can definitely take in the input list, get its size (using [list length]), then output a different list through a single outlet, but I think you might mean that the number of outlets changes depending on the input list. You can definitely do this through dynamic patching (I have a patch that will help you do this easily), but if you dynamically change the number of outlets, any connections you have would be disconnected. You can fix this with more dynamic patching, but it gets a little more complicated. If you post more info about what specifically you're trying to do we can definitely help.
-
@cpenny42 yep, but I think he's trying to do an external instead of an abstraction. @torchflame?
Cheers~
-
@cpenny42 said:
You can definitely do this through dynamic patching (I have a patch that will help you do this easily)
I'm curious to see what this would look like.