Reaper creates two editors for my plugin

With count vars and debugging statements I got confirmed what I already suspected from seeing other debugging statements: when my plugin gets loaded into a Reaper project, it (or the processor) creates the editor twice...


My plugin is still very simple. based on the Introducer and example plugins.


Anyone seen something like this as well? What can I possibly be doing wrong?



Yeah this has been seen before:


But this leaves me then with another question:

which object should then "own" my plugin's objects?

I have a convolution engine, that can be owned by the processor, but also a class/object that is capable of loading a library with impulse response buffers. A candidate IMO for the editor, but I noticed it was being initialised twice.

You need to think of the editor as an optional extra - it may or may not exist. The processor needs to own everything necessary for its operation.


So if the user loads an impulse response in the editor then you could do one of the following:

  • order the processor to load the same impulse response itself, or
  • find a way to safely transfer that information to the plugin processor (which can then keep its own copy)

Very clear answer, thanks Andrew!

I noticed this too -- I see an editor object being created in response to effEditGetRect (so that it can calculate the size), then REAPER calls effEditOpen after, which destroys the first editor object and creates a new one. I suppose this process could be optimized (if an editor was created by effEditGetRect, reuse it for effEditOpen...)