Expansion sample location



  • After exporting my project that uses expansions I'm noticing that the samples don't seem to be being picked up. The expansion is loaded correctly but there is no sound.

    Do the samples need to be in a single location that the plugin points to or can each expansion have its samples within its own samples folder? (or use a LinuxLink file to redirect?).



  • There are multiple options available:

    1. Use a global sample folder that is defined in the plugin
    2. Always use the Samples folder of each expansion
    3. Use references to expansion folder samples alongside sample references to global sample folders depending on the wildcard in the sample's FileName property.

    However there are a few things that I have to implement for this (I am currently working with expansions on a C++ project, but it would require a few things to make it work in a generic context).



  • For my purposes option 2 is the best, especially if it can be redirected with a link file.



  • Yes the redirection should work out of the box.

    Now the question is: do the sample references in your sample maps contain the expansion wildcard or the generic project folder wildcard?



  • @Christoph-Hart Aha that's probably the issue, they use the {PROJECT_FOLDER} wildcard.



  • I'll probably add a function that scans all sample maps in a expansion and change the sample references to the expansion wildcard if the sample can be located in the Expansion subfolder (or the redirected sample target). It currently also fails to detect relative paths within an expansion for samples anyway...

    BTW, there's also a redirectSampleFolderToDefault() function in the Expansion class, which basically does the same thing as if there would be a LinkOSX / LinkWindows / LinkLinux file in the samples folder that points to the default sample location of the plugin.



  • Thanks, I shall investigate that function. I notice in the demo project sample map {EXP::Backend Expansion Vol} So I'll try this out too for my project.



  • Actually it already works quite well, I just hadn't HISE_ENABLE_EXPANSIONS enabled in the HISE standalone app.

    1. If you load samples that are in the samples subfolder of an expansion folder, it will resolve it to the relative path with a EXP wildcard correctly.

    2. If you load up a samplemap from an expansion that contains samples with a PROJECT_FOLDER wildcard (which might happen if you create the samplemaps in the project folder and then move them to a expansion folder, they will be converted to {EXP...} wildcards internally (so there's no need for that tool function I sketched above.

    3. It always uses the samples subfolder of the expansion as default. You can create link files to any other folder for each expansion OR define the new preprocessor flag HISE_REDIRECT_EXPANSION_SAMPLE_FOLDER_TO_DEFAULT so that redirectSampleFolderToDefault()is called at the initialisation of the expansion object and redirects the links internally.



  • Perfect thanks! I'll rebuild HISE and re-export my project shortly to test.



  • Works perfectly. 🙂

    I'm off on holiday, I'll be back at the end of the week, no doubt I'll still be posting here on my phone but I won't be quite as active 😛



  • @d-healey Enjoy my man! 😉


Log in to reply
 

10
Online

552
Users

2.1k
Topics

16.2k
Posts