The PluginHost


#1

first of all, thanks jules for including that new thingy - it seems to be the ideal lightweight-host for plugIn-testing. up to now i always tested my plugins with tobybears miniHost, which was fine. but with JUCE-PlugInHost’s modular structure it will be even better, because i can now put some analyzer stuff like freakoskope in chain. not to mention, how cool it is to have the source-code around and make my own debug-build of it. …BUT miniHost had one little advantage: it always loaded the most recent plugIn automatically on startup, such that i only needed to hit ‘F5’ in MSVC to debug it - in JUCE’s Plugin-Host, i have additionaly to load the most recent filtergraph which requires some mousing. so there goes my question: it should be easy to include an option to automatically load the most recent filtergraph on startup - i’d do that myself, but i’m not familiar with the code (yet), so maybe jules, you can point me to the right place?


#2

Glad you like it! It’d be a one-liner to add - there’s already a recent files list, so maybe have a search for that in the code and have a look at the way it handles the user choosing one of those menu items.


#3

yeah, i’ll study the code more thoroughly later this day. this new juce-version is a real gift. felt like christmas yesterday :smiley:


#4

O.K. i just added the following piece of code at the end of the constructor of the MainHostWindow-class:

[code]
//---------------------------------------------------------------------------------------
// from here: additional code added by Robin Schmidt to load the most recent FilterGraph:

GraphDocumentComponent* const graphEditor = getGraphEditor();

RecentlyOpenedFilesList recentFiles;
recentFiles.restoreFromString (ApplicationProperties::getInstance()->getUserSettings()
->getValue (“recentFilterGraphFiles”));

if( recentFiles.getNumFiles() > 0 )
{
if (graphEditor != 0 && graphEditor->graph.saveIfNeededAndUserAgrees() == FileBasedDocument::savedOk)
graphEditor->graph.loadFrom (recentFiles.getFile (0), true);
}

// end of filter-graph loading
//---------------------------------------------------------------------------------------[/code]

and it seems to work as expected. not exactly one line, but almost that. i basically copied the code from the appropriate section in the menuItemSelected()-method. any concerns about that? … i always feel a bit bad when “hacking into” someone elses code, you know. maybe we can have an “Preferences”-submenu or something in the “Options”-menu in the next version, where such things can be set up cleanly?


#5

Hi

First I apologize for my bad English, because I am Brazilian and I don’t have fluency with English.

I am studying the source code of PluginHost to understand its operation and develop my own program host.
Testing the program I discovered a small bug:

When PluginHost does load a preset save in xml, he arrow in the correct parameters plugin (graphically), but not internally.
In other words, graphically the parameters of the plugins are correct, but by the sound realizes that the parameters of the plug are default.

Will to solve this problem, would have to call the
VSTPluginInstance: setParameter (int index, float newValue) for each parameter of the plugin? :?:

Thanks :slight_smile:


#6

hmm - yes, you’re probably right, I’ll take a look at that.


#7

In FilterInGraph::createFromXml after
c->filter->setStateInformation (m.getData(), m.getSize());
I added the code

for (int i=0; ifilter->getNumParameters(); i++)
{
c->filter->setParameter(i,c->filter->getParameter(i));
}

but not solved the problem, someone would have some other ideas? :?:
Thanks :slight_smile:


#8

Hi
I think I was wrong.
I was testing a Plugin called JVM900, and with this plugin does not work.
But tested with the other plugins PluginHost worked normally.

Probably this Plugin which has been tested set a default value of the parameters when initiated internally.


#9