-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify outlets post-object construction #187
Comments
@mourendxu |
@x37v What I am asking is can I change the number of outlets AFTER the constructor has been called? Another way to look at it, can I create an mc like signal operator that will output undetermined(at object initialization time) number of channels? Thank you! |
Ideally your creation arguments would describe all that you need to specify your i/o. If that isn't possible, could you specify a maximum for inlets and outlets in your creation arguments, create those, and then utilize as needed after? |
Hi Alex, thank you for the reply. Yes that's what I thought. No worries. It's understandable due to preemptive buffer allocations. I will work around it. |
It was possible to handle dynamic IO with the |
I can think of only one very specific scenario where changing the number of inlet/outlets after object's instantiation may be useful. For the vast majority of cases, it's just a sign of flawed design. |
thank you for the replies. So, I am creating a set of modules to transfer data from another application. In the other application, they do allow for dynamic # of channels. The way I see it, it should be best handled with mc, since there isn't a need to physically attach connections. A single cable carrying x number of channels. It's interesting to know that you can do that with dsp_resize. I will take a look there. Thanks. |
As I said, more often than not dynamic inlets/oulets are not really necessary. |
Yah, if it was just control data running on the Scheduler thread, the data is so sparse, there is no point in generating multiple outlets. A single outlet w a route/routepass would solve the problem. Is there an MC project that I can take a look at? I mainly just want to see the standard practice for changing output channels post-constructor. Thank you. |
You may want to ask C74/Ableton to share some code snippets that showcase the technique. |
If you're just trying to do MC directly.. check the SDK docs: https://cycling74.com/sdk/max-sdk-8.2.0/chapter_mc.html |
https://cycling74.com/sdk/max-sdk-8.2.0/chapter_mc.html#chapter_mc_output_channelcount I figure you can use a |
Awesome. Thank you folks! |
Hi,
I was wondering if it's possible to change the number of outlets of an object after it has been initialized? If so, how would I go about doing that?
Thank you.
The text was updated successfully, but these errors were encountered: