There's something I don't understand about compiling a plugin
-
Here's something I've experienced a few times, and I get the same result each time, so I must be being silly, or not understanding something.
I'll boil it down as best as I can:
- Create a project
- Add a sampler
- Add content to the samples folder for the project
- Save the sample map
- Setup the project settings with the relevant plugin name, company name, etc.
- It doesn't matter whether you turn off the embed audio files flag or not.
- Build the VST3i plugin.
- When it asks if you want to copy the resources files to the local appData folder, say yes.
- Plugin builds. Try to instantiate it in a host. Some hosts it won't show up. It does in Ableton Live, but will crash.
I don't understand why the plugin doesn't launch in such circumstances. I'd naively expect it to launch, but no sample content to work, if it cannot parse it.
The way I fixed this on some projects was to convert all my samplemaps to monoliths, and then create a hr1 package, and then somehow my plugin would launch, and I'd be able to install the samples.
I just don't really understand it very well I think. But this seems odd. Thoughts??
(sorry for being dumb!)
-
@Orvillain extra definitions window:
HISE_SAMPLE_DIALOG_SHOW_INSTALL_BUTTON=1
HISE_SAMPLE_DIALOG_SHOW_LOCATE_BUTTON=0 -
@Orvillain said in There's something I don't understand about compiling a plugin:
It doesn't matter whether you turn off the embed audio files flag or not.
This applies only to audio files in the AudioFiles folder - impulse responses usually - not samples.
@Orvillain said in There's something I don't understand about compiling a plugin:
Some hosts it won't show up.
Are you on a Mac?
@Orvillain said in There's something I don't understand about compiling a plugin:
convert all my samplemaps to monoliths
Yep you should always do this
@Orvillain said in There's something I don't understand about compiling a plugin:
and then create a hr1 package
This is the way to go if you want to use HISE's built in sample installer. If you're rolling your own you can disable it as Lindon suggested.
-
@d-healey I'm on Windows and Mac. This is just on Windows right now though.
Is there no workflow for avoiding converting all samplemaps to monoliths? I'm mid-development, and I'm not looking to finalise my content yet or anything like that.
Eventually yes, I will create a hr1 package for distribution. But that's months away really.
-
@Orvillain said in There's something I don't understand about compiling a plugin:
Is there no workflow for avoiding converting all samplemaps to monoliths?
I've found if you have a lot of samples (several GB) then HISE gets weird if you don't convert them, but if it's not too many it should be fine.
Conversion isn't final though, you can always go back to the waves, and then reconvert again later.
-
@d-healey said in There's something I don't understand about compiling a plugin:
@Orvillain said in There's something I don't understand about compiling a plugin:
Is there no workflow for avoiding converting all samplemaps to monoliths?
I've found if you have a lot of samples (several GB) then HISE gets weird if you don't convert them, but if it's not too many it should be fine.
Conversion isn't final though, you can always go back to the waves, and then reconvert again later.
Yeah so what I've got is:
- Some wavetables in the Audio Files folder. I'm okay to attempt to embed these.
- Samples\OneShot\ and Samples\Multi ... where each of these folders has a range of sub-folders in it.
- SampleMaps - which has a subset of the samples in the project, laid out in individual sample maps.
- This is about 2GB of content all told.
Ultimately I'm not that arsed about the samples even working in the compiled plugin right now. But I do want the wavetables to work.
But I cannot get the plugin to run in the DAW. It either doesn't pass validation in Reaper, or it just crashes outright in Ableton Live, and my suspicion is that it is trying to address sample content I don't care about.
I understand conversion isn't final. It just isn't work that I ideally want to do right now, because I don't want to go through them all one by one and do it. I did try the "convert all samples to monolith + samplemap" option in the tools menu, and it did not seem to work, regardless of the directory levels I choose.
-
@Orvillain said in There's something I don't understand about compiling a plugin:
This is about 2GB of content all told.
That shouldn't cause any issues left unconverted.
@Orvillain said in There's something I don't understand about compiling a plugin:
I did try the "convert all samples to monolith + samplemap"
Try the option in the mapping editor. Right click in the mapping window >> Tools >> Reencode All Sample Maps to HLAC Monolith.
@Orvillain said in There's something I don't understand about compiling a plugin:
my suspicion is that it is trying to address sample content I don't care about.
Easy to test. Create a new project that uses the same wavetables you already have, but don't include any sample content. See if it works.
-
@d-healey said in There's something I don't understand about compiling a plugin:
Easy to test. Create a new project that uses the same wavetables you already have, but don't include any sample content. See if it works.
Yeah, just had the same thought. Except my approach was to take out all sample maps and samples from the project folder. Double checked that nothing was showing up or "being looked for" inside HISE, so confirmed it wasn't looking for samples.
Turned on embed audio files, and recompiled the plugin. Insto-crash when I drag it to a track in Ableton.
-
@Orvillain Test with pluginval, see if it gives any useful output
-
@d-healey Will do! Will report back.
-
@d-healey It crashes pluginval - I'm building a VST3.
-
@Orvillain debug build?
-
@d-healey Okay, I went back to your suggestion of making a new project and just putting in the wavetable synth and including the wavetable files. That plugin does instantiate.
So either clearing the sample maps and samples wasn't enough to make my actual plugin no longer attempt to reference sample maps... or something is going on with my custom DSP networks (hardcoded)
-
@d-healey No, wasn't running the debug build of pluginval. I can do.
-
@Orvillain Okay.... went to my original project.... but a new xml file.... added a waveform generator and my poly ring mod network. Compiled plugin. It loads. I'll do this and go through each of my networks to isolate the one that doesn't run. If they all do... then I'm back to suspecting the samplers as the issue.
-
@Orvillain Okay. It isn't my networks. They will all run inside a plugin - one instance of them anyway.
-
@Orvillain Godddd I am so dumb.
I even bloomin' new about this, and just totally forgot! Commenting this out, and now the plugin compiles.
Basically, I found in the past that calls to the Builder could crash plugins. So I wrap all my Builder logic in a namespace, and I am SUPPOSED to remind myself to comment these lines out when building the plugin.
I'm pretty sure this is what was causing the crash on instantiation.
-
@Orvillain Also something to bear in mind, the docs say this:
Be aware that the wavetables will not be embedded into the binary, so if you don't want to use the monolith format, you have to untick the Embed AudioFiles option in your project settings. Also the Monolith file takes precedence over the source .hwt files, so as soon as you've created a .hwc file in the sample folder, the list of available wavetables will not reflect the audio file folder content.
-
@Orvillain said in There's something I don't understand about compiling a plugin:
Basically, I found in the past that calls to the Builder could crash plugins. So I wrap all my Builder logic in a namespace, and I am SUPPOSED to remind myself to comment these lines out when building the plugin.
According to the docs it should be disabled automatically anyway, even if you forget
This is connected to the former point: never ever use calls to the Builder in a compiled plugin (in fact, they are deactivated in the compiled plugin so don't expect them to work).
-
@d-healey Probably a bug of some kind then. All I can say is, commenting out TreeBuilder.buildModuleLayout() cured my crash. Chased my own tail for a bit over that is all!