Comments (2)
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.
from pd-lzr.
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.
from pd-lzr.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pd-lzr.