Exporting/Installing Samples for AudioLoopPlayer
-
Hey Gang,
Ive built my first plugin based around the AudioLoopPlayer. Im used to using the .hr filesystem but this cannot be used.
What is the best way to go about exporting your plugin/samples and installing them on the user end? Do I need to create an "AudioFiles" folder for my included samples during installation?
-
@trillbilly Yes, the easiest thing to do would be to simply install (copy) them on the user's HD when installing the plugin.
-
@Matt_SF and they just use the "Choose Sample Folder" option when prompted like the Sampler? Or do you mean install them to something like AppData/AudioFiles?
-
@trillbilly
I think your plugin will need to "know" where the user has installed the files...So your installer would need to ask the user where to put the audio files, and then the plugin would need to ask the user where they have been placed...
You could write an installer that:
- asks the user where they want to install your many Gbytes of files...
- installs them there
- Writes a JSON file with this location into the AppData folder
At this point when it wakes up your plugin could read the JSON file so it knows where these loops are...
Well thats my plan for this sort of thing anyway... so far I have the custom installer built....
-
@Lindon @trillbilly yes I've done that for one of my products and it works well. The installer can indeed write a file which includes the Samples location and the plugin know where to find them.
-
Okay the installer now adds a file holding the location of the user defined folder (called no surprises: LinkUser) so last bit done - I will report back when I give it a go...
@Matt_SF so I assume you are using something like:
myUserLocation = UserLocation; //which you read from the disk via (say) JSON theLoopPlayer.setFile(myUserLocation + "WaveName" + ".wav");
@trillbilly you might NOT want to put your audio files in AppData/AudioFiles
- it'll be on the users "C Drive" and on windows at least might not have the room for a lot of stuff.
-
I haven't read through the whole thread so apologies if I'm repeating things that have already been covered.
If the audio files are part of your project and live in the audio files folder, then you can ship them as a .dat file. You'll find that file in the Pooled Resources folder after you compile. That file should be placed in the app data folder.
I don't know if it's possible to redirect the .dat file using a LinkOS file but if that isn't possible then we should nag Christoph to add it :)
-
-
This sounds like an easy solution, does it also have a default location it can be placed in the AppData folder?
Just straight in the project's app data folder as far as I'm aware. I wouldn't do this if you have more than a couple of hundred mb of audio though.
-
@d-healey Yes, its minimal samples. I assume you mean the "AudioResources" dat file?
-
@trillbilly That's the one.
By the way it's mentioned in the docs:
https://docs.hise.audio/working-with-hise/project-management/projects-folders/audio-files.htmlhttps://docs.hise.audio/working-with-hise/settings/project.html#embed-audio-files
-
@d-healey Theres always that staring me right in the face.
So it sounds as though you can use the Embed Audio Files in preferences and it should install them with the plugin, yes? This should work for my use.
-
@trillbilly Embed audio files will make the files part of the binary. This is good for anything less than 50mb.
-
I for myself just mimicked the sampler's system : using the FileSystem API, I made the plugin look for a 'LinkUser' file which only contains the samples folder path. From there I get all sample files and put them on an array which, again, is mimicking the SamplePool function.
-
@Matt_SF said in Exporting/Installing Samples for AudioLoopPlayer:
I for myself just mimicked the sampler's system : using the FileSystem API, I made the plugin look for a 'LinkUser' file which only contains the samples folder path. From there I get all sample files and put them on an array which, again, is mimicking the SamplePool function.
yep my way too...