> On Aug 25, 2014, at 6:05 AM, Benoît LAHOZ | L'ange Carasuelo > <[email protected]> wrote: > > Thank you for your answers. > I have to be more precise. > > The Iterator patch is not creating a new instance of each object for each > iteration, but using the same instance and changing parameters (you can test > it with an NSLog(@"%p", self), its the same memory address). > But, when I have a patch that need to feedback on its own calculated values > over time, it's not working anymore, even with a time parameter exposed > (custom or not). > So, I can't cache any value internally in my plug-in and it's losing its > interest. > > But, Smooth patch (which is certainly feedbacking on its own values to > calculate the smooth curve) is working in Iterator since 10.6 and I would > like to know if someone knows how it's done... or how it could be done :-)
I’m afraid the best way to have a patch cache values for an index in an iterator is to expose an Iteration Index port on your plugin. There isn’t a good way to get at the internal stuff that the Smooth patch uses to determine the current global iteration. If it’s merely expensive to compute but the expensive object is deterministic based on the input values, you may be able to use NSCache instead, which will allow you to have a nicer interface. If it’s about knowing the last value for the current iteration, you’d probably need to expose the iteration. _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

