This project has moved and is read-only. For the latest updates, please go here.

controls refresh & host access via plugin

Dec 29, 2010 at 3:29 PM

I have two questions, namely:

1. When it is suitable to call refresh method when automation changing value of knob? Is for example good to call refresh in EditorIdle() plugin method? I ask because redraw | refresh is cpu consuming and it is not good way to call refresh each time SetParameter method is called. I think there should be some special method only for refreshing GUI of plugin (such a method is in the FL Studio SDK).

2. How to access host (HostCommandStub exactly) via plugin? (Where this object is located?)

Thanks in advance for help.

BTW Can I post a link to my plugin when it will be done, here?

Dec 29, 2010 at 5:05 PM

1) Not sure what Refresh method you imply. But in general a refresh-all should not be used to update your UI. I believe small incremental updates that refresh UI for values (parameters) that actually have changed are better, perhaps a little more work for the developer, but better for performance.

2) The Open method on the IVstPlugin (your plugin root object) receives a IVstHost references. This object also implements the IExtensible interface and allows you to retrieve all IVstHostXxxx interfaces and the IVstMidiProcessor interface. Note that some interfaces can return null when the host does not support the feature (group). Also check out the Capabilities property on the IVstHost interface.

Sure, I would love to place your link in the wiki area. Let me know when you're done.

Hope it helps.