Sharing plugin resources among instances, how to do this?


#1

Is it possible to share init code (like wavetables, initialising log freq EQ grids etc.) between instances of your plugin?

If so: a next C++ lesson for me, I would very much appreciate any pointers to sites or pages to learn how to to do this.

Thanks in advance,

Peter


#2

I'm maybe not understand right what you are asking, but you do know that static variable are shared across plugin instances ?


#3

No, not yet! Thanks, will Google for this :-)


#4

The SharedResourcePointer is ideal for that.


#5

This is a blessing and a curse :)


#6

But please educate me guys! Don't tease me with solutions when I still have to learn this stuff about what DLL instances can share. ;-)

Some terms that I should Google for?


#7

At the time i tried to understand exactly how Max/MSP "externals" (bundles/dll) memory interact with the app i found that blog as a good introduction: ( http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory/  ). I have no experience with VST plug-ins but i suppose that is more or less the same mechanism. Later i used extensively "vmmap" to see it in action.

You can manage scope in your dll the same way you manage it in an app. That's only if you want to share resources between different kinds of plug-in that problems arise.