Giter Site home page Giter Site logo

Comments (2)

lzref avatar lzref commented on August 23, 2024

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:

  1. Make effect abstractions heavier and require that they contain certain scaffolding code.
  2. 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.

lzref avatar lzref commented on August 23, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.