Vst Instrument without having to install the samples
-
@d-healey I do notice in the tutorial I loaded all of the samples from the Samples folder and in the table they show up as {PROJECT_FOLDER} before the name, I had thought I did this in my project but its possible I did something wrong somehow. I wonder what it was.. I will make sure my files show up that way though for the future. about to finish the tutorial and compile and we will see if I can get that working.
-
@d-healey Ok, I just finished the tutorial for Music Box, and the SAMPLES DONT WORK. I created the samples for installer, everything said it succeded, and then I launched logic and the AU works, and asked me for the sample resource file, and when I select it and select the destination folder, it says everything worked, and everything else in the instrument other than the samples
EDIT, I then reloaded the instrument and it works... I think this needs to be a message that pops up telling the user they need to reload the plugin or HISE needs to make it so they work the first time this is loaded, cause that makes it feel immediately like its broken on first launch.
Also the screen popup. where you supply the samples doesn't really fit in this tutorial instrument.. there must be some kind of solution to make it feel like its not cropped in the window.
-
@MacroMachines said in Vst Instrument without having to install the samples:
EDIT, I then reloaded the instrument and it works... I think this needs to be a message that pops up telling the user they need to reload the plugin or HISE needs to make it so they work the first time this is loaded, cause that makes it feel immediately like its broken on first launch.
This a well known pre-condition that isnt going to go away any time soon - what we all do is put a big red comment in the user manual that explains you have to restart the plug-in to get any sound.
Also the screen popup. where you supply the samples doesn't really fit in this tutorial instrument.. there must be some kind of solution to make it feel like its not cropped in the window.
You have to make your instrument big enough to hold these dialogs...
-
@Lindon said in Vst Instrument without having to install the samples:
This a well known pre-condition that isnt going to go away any time soon - what we all do is put a big red comment in the user manual that explains you have to restart the plug-in to get any sound.
that presumes users would read the manual before using or during setup, nobody I know does that, they assume the plugin they just installed will work immediately.
Ideally, this would be fixed or set up so that there is a dialogue that comes up after the sample installation that simply says "samples installed successfully reload the plugin to continue". there already is one that tells you the samples were installed, the text just needs to be amended.
Even more ideally, the package installer would do this before the plugin is even run, the samples would be installed and the plugin would know where they were installed so they don't have to do anything but run the plugin and it works.
I would love to learn enough JUCE to help in implementing these types of things if they are not priorities for the developer. I think of these things as very important, maybe others are ok with this. HISE is so close to being an ideal tool for plugin development, I just think with a few tweaks it would be so much better.
-
@MacroMachines said in Vst Instrument without having to install the samples:
Ideally, this would be fixed or set up so that there is a dialogue that comes up after the sample installation that simply says "samples installed successfully reload the plugin to continue". there already is one that tells you the samples were installed, the text just needs to be amended.
So thats a simple fix in the C++ -- go for it.
I think it might be line 982 in BackgroundThreads.cpp
-
-
@ustk said in Vst Instrument without having to install the samples:
@Lindon I think it's worth to add permanently so I'll push a request to @d-healey's fork with the "fix" ;)
er... its not even tested as the right spot....so David will need to do some work...I would do it if I wasn't in the middle of a big development build...
-
I think it's a good idea. I'll take a look when I have a bit of spare time.
-
-
@ustk cool well done.
-
@Lindon I tried to add
\n
but it doesn't work. Although I've seen it in some other .cpp using the same message window...
So I let it on one line... any idea?PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully.\nPlease relaunch the instrument.");
-
Try
\r\n
-
@d-healey It doesn't work, it's taken as a literal... Not a big deal though!
-
@ustk Do you maybe have to do it with another quote as in :
PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully."\n"Please relaunch the instrument.");
or maybe it just requires a space between the /n? as in :
PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully. \n Please relaunch the instrument.");
-
@ustk Also, as far as my other mentioned slightly more ideal option, do you know what it is that happens upon plugin load that makes it so it works when you reload it? Is there any possible way to trigger the sample references or whatever is happening to be re-initialized automatically upon hitting OK on the popup? I realize that might be slightly more complex than the text solution, just figured it might be worth asking, as then it would simply work without needing to reload at all.
Either way good work :D. thanks for doing this :)
-
@MacroMachines said in Vst Instrument without having to install the samples:
@ustk Do you maybe have to do it with another quote as in :
PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully."\n"Please relaunch the instrument.");
or maybe it just requires a space between the /n? as in :
PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully. \n Please relaunch the instrument.");
I tried both solutions but the first throws a compile error and the second doesn't work...
@ustk Also, as far as my other mentioned slightly more ideal option, do you know what it is that happens upon plugin load that makes it so it works when you reload it? Is there any possible way to trigger the sample references or whatever is happening to be re-initialized automatically upon hitting OK on the popup? I realize that might be slightly more complex than the text solution, just figured it might be worth asking, as then it would simply work without needing to reload at all.
Either way good work :D. thanks for doing this :)
I think it's because samples aren't found at init so the plugin needs a re-init that can only be done this way I imagine. But there might be a solution to this at Christoph's level, dunno...
-
@ustk I just found this in the JUCE doc, taking the output kadenze online course:
void drawSingleLineText (const String &text, int startX, int baselineY, Justification justification=Justification::left) const Draws a one-line text string. More... void drawMultiLineText (const String &text, int startX, int baselineY, int maximumLineWidth, Justification justification=Justification::left, float leading=0.0f) const Draws text across multiple lines. More...
So he may have used the single line text in the message window class possibly?
-
@MacroMachines seems a nice find, but when searching for that I found no references to these methods in Hise, code, only once in a juce file for the multiLine
here's the function that is called in the PresetHandler.cpp, but this is the end of my skills...void PresetHandler::showMessageWindow(const String &title, const String &message, PresetHandler::IconType type) { #if USE_BACKEND if (CompileExporter::isExportingFromCommandLine()) { std::cout << title << ": " << message << std::endl; return; } #endif #if HISE_IOS NativeMessageBox::showMessageBox(AlertWindow::AlertIconType::NoIcon, title, message); #else ScopedPointer<LookAndFeel> laf = createAlertWindowLookAndFeel(); ScopedPointer<MessageWithIcon> comp = new MessageWithIcon(type, laf, message); ScopedPointer<AlertWindow> nameWindow = new AlertWindow(title, "", AlertWindow::AlertIconType::NoIcon); nameWindow->setLookAndFeel(laf); nameWindow->addCustomComponent(comp); nameWindow->addButton("OK", 1, KeyPress(KeyPress::returnKey)); nameWindow->runModalLoop(); #endif return ; };
-
This post is deleted! -
In case this isn't yet solved since this old threat stopped growing and some of you are still interrested…
As far as a Mac VST is concerned: I have put my samples folder into the MyInstrument.vst itself. This is possible by right clicking it in Finder and choosing Show Package Content. This opens its subdirectory where you could store your samples folder in.
Of course, this is kind of a hack and doesn't come with the PlugIn recognizing the path automatically, but… Isn't there any string within the bundle that could be changed from something like
%HOME%/Library/Applications Support/your_company_name/
to something like
%HOME%/Library/Audio/PlugIns/VST/YourInstrumentName.vst/Samples
?