Not embeding Audio Files...how to?
-
OK, so I am looking at not embedding the audio files in my product - as I'd like a LOT more than 50MB of files.... the documentation says:
Embed Audio Files
....
If it's disabled , it will use the resource files found in the app data directory and you need to make sure that your installer copies them to the right location:
Ok -fine but I cant find any documentation about these "resource files" - is it "just" the wav files I'd like to use? so I just get the installer to put these in %APPDATA%? Or is it something more complex than that?
-- (sadly) there will be follow up questions to anyone who has got whitebox or inno to do this sort of thing reliably....
-
@lindon If I remember correctly it uses a .dat file, I'll see if I can find some more info...
-
Oh I think I've found it :)
Export >> Export pooled files to binary resource
-
@d-healey said in Not embeding Audio Files...how to?:
Oh I think I've found it :)
Export >> Export pooled files to binary resource
thanks, that of course raises as many questions as it answers....
What if I dont want the image files in this dat file? - not a big deal but it occurs to me...
Whats it talking about SampleMaps for?
Does it "just" make this file and keep the originals? (allowing me to go back if it turns into a mess....)
How does my project know to use it?
-
@lindon said in Not embeding Audio Files...how to?:
What if I dont want the image files in this dat file?
Then no external audio files for you :)Actually maybe you can if you don't useloadImageFilesIntoPool
Whats it talking about SampleMaps for?
No idea, I've never used it. Try it and report back
Does it "just" make this file and keep the originals? (allowing me to go back if it turns into a mess....)
Almost certainly. HISE is generally non-destructive.
How does my project know to use it?
I think it's only used by the compiled plugin which I assume will expect the file to be in appData because you haven't checked the embed box and you are loading audio files into the pool.
-
@d-healey - yeah copying a large project to test this stuff out ---
I'm not using loadImageFilesIntoPool and I am using Engine.loadAudioFilesIntoPool();
So perhaps images wont get copied - as well as setting
Embed Audio Files = false
and
Embed Image Files = truemight also be part of the solution...
As you suggest I will report back....
-
@lindon FYI, I'll probably add the ability of referencing individual samples from a samplemap with the audio looper / scriptnode file player soon. This will make the distribution of large sample sets less awkward than it is right now.
-
@christoph-hart thaks that might be great - sadly I'm stuck back on the MAster branch right now.. so not much help for me....
-
Okay so I pressed the menu option called:
Export Pooled Files to Binary Resource
....and this made the following files in a Folder called :
Pooled Resources
AudioResources.dat
ImageResources.dat
MidiFiles.dat
SampleMaps.dat-- I have no idea how to use these.
Do I even have to use all of them?
-
@lindon I faced the same problem today. I unchecked the embed files box. I put "engine.loadAudioFilesIntoPool();" at the top of my project. I then put the samples in a folder named Audio in App data. once compiled the vst would look for the Samples. I put the samples in the app data folder even before compiling the plugin. I then tried on a different pc. it worked. but it is not practical at all. you need an installer that redirects the samples in app data . for mac it's complicated with package to make a file redirection in user library....
-
@yall said in Not embeding Audio Files...how to?:
I then put the samples in a folder named Audio
Samples or audio files?
-
@d-healey audio files.
but I changed in the end because it didn't exceed 50mb so I integrated them -
Okay reporting back (let me know if any of this is wrong...):
So some clarification - if its needed - here we are talking about Audio Files: that's the contents of the Audio Files folder in your project not the samples used in a Sampler, but the wav files used in Audio Loop Player or the Convolution reverb....
So if your number of Audio Files is so large that it will break the Visual Studio compiler - with the "out of heap space" error - then you will need to ship your Audio Files in a separate (external) resources file...
-- First make sure you have all the required wav files in the Audio Files folder:
-- Put this at the top of your script:
Engine.loadAudioFilesIntoPool();
-- Select: <Export Pooled Files for Binary Resource> from the <Export> Menu...
This will create a new folder in your Project called PooledResources
In this folder will be the following files:
AudioResources.dat
ImageResources.dat
MidiFiles.dat
SampleMaps.dat(yeah it exports all the different types of media - dont worry you dont have use all of them)
-- in your Project Preferences make sure Embed Audio Files is unchecked
-- compile your project.....
Now you have a product that will look for Audio Files in the following location (it will report an error on start up if it cant find this):
{AppData}/<your company name>/<your product name>/AudioResources.dat
-- so you need your installer to make this folder if its not already there, and copy the AudioResources.dat file into this folder