You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce: add 3 effects to track 1, add 2 effects to track 2, clear effects on track 1, add 1 effect on track 2 (it'll be connected to the right throws but won't be connected to previous effects). Add more effects and you may see effects connected to the wrong tracks.
The text was updated successfully, but these errors were encountered:
As I was debugging this issue (and thought I almost fixed it) I realized that my whole approach has been wrong all this time.
I was dynamically adding effect objects to the effects panel and assuming that the total number of objects on the effects panel will be the last inserted object ID. That worked when I was only adding effects but doesn't work when effects are sometimes deleted, since PD reuses object IDs.
Now, I've been hoping to keep effect abstractions really light and dumb: the only requirement was to have 2 signal inlets and 2 signal outlets. The effects panel was responsible for connecting effects to each other.
But it looks like the only reliable way of determining object ID's of newly created effects is placing iemguts/canvasindex inside of them.
So I see 2 possible solutions:
Make effect abstractions heavier and require that they contain certain scaffolding code.
Keep effect abstractions dumb but wrap them in effect wrappers that will handle all scaffolding. Ideally we'll have just a single effect wrapper abstraction that will be able to handle all types of effects.
I'm gonna try to go with option 2 unless I find reasons why that's not possible.
How is the effect wrapper abstraction gonna communicate with the rest of the system? Good question. Sounds like there has to be some kind of a global bus where wrapper can at least send its object ID. After receiving that the effects panel can connect the wrapper object to other objects. Potentially wrapper objects can have special communication inlets and outlets that can be connected to the parent right after the object is created.
To reproduce: add 3 effects to track 1, add 2 effects to track 2, clear effects on track 1, add 1 effect on track 2 (it'll be connected to the right throws but won't be connected to previous effects). Add more effects and you may see effects connected to the wrong tracks.
The text was updated successfully, but these errors were encountered: