Jump to content
Weekend Astronaut

Feature Feasibility Request | Recursive Searching For Relocated File On Project Load

Recommended Posts

Often times when samples used in a project get moved, the project and instruments are unable to find them without manually pointing them to the new location.

I understand that there are complexities with regard to how an instrument might store and access sample locations discretely. I'm unsure of whether Cakewalk has any access to that interaction so this is a request for possibility.

Anyway, if it's possible I think there could be value in a config value specifying the root of a main sample/file directory with which to perform a recursive search for the file. If the DAW has an abstraction between importing of assets to instruments, perhaps a file checksum could be calculated at time of import and stored locally, then when searching recursively through the root location, first the search is done on filename and/or other properties for performance reasons. Once the file properties are located, a checksum is calculated on the file and compared to the stored checksum that was generated on import. If it matches, a confirmation is issued in the UI and if confirmed, that file is used and whatever file descriptor used for that instance is updated. For any files which have no match in either properties or checksum revert to the original method of manual location.

Again, I don't know Cakewalk's code and how it interacts with plugins/instruments but I'm sure at least outside of an instrument context this could probably be implemented, leaving instruments to the old method. Although I think there's a use case for this in an instrument context if an interface/API for the file location is shared between the instrument and the DAW.

As for the performance of a recursive search for file names given variability of environment, would an internal index of files under the config'd root be space-prohibitive?

Looking forward to any insight.

Thanks!

Share this post


Link to post
Share on other sites

The DAW has no idea if a plug-in uses samples or not

 

Share this post


Link to post
Share on other sites

:(

But how does Cakewalk know when Session Drummer is missing samples then, for example?

To be clear, I'm referring to things within Cakewalk's scope, not necessarily random 3rd party plugins and expecting Sonar to know, for instance, that you've imported a sample as a waveform in Serum.

Edited by Weekend Astronaut

Share this post


Link to post
Share on other sites

The DAW has no idea if Session Drum is sample based or if the program loaded by Session Drummer is missing sfz files or samples.

The plug-in issues the load failure messages.

It would be up to the plug-in to search for missing parts of the program.

Given the samples could be anywhere or no where at all, depending on the size and number of disks attached to the PC it might take quite a while for an exhaustive search.

Share this post


Link to post
Share on other sites

Understood. So the DAW is just getting a message from the plugin during initialization that a multisample wasn't found and sends it the path it was expecting and the DAW displays it, which we see when we start a project under that condition.

I guess it was just hopeful thinking to wonder about whether there was control about file paths that the host could hook into.

Could work with samples dropped directly in the DAW though, right?

Share this post


Link to post
Share on other sites

The DAW is not receiving any notification from the Session Drummer about missing samples.

The DAW launches the plug-in and if the plug-in loads OK that is all the DAW cares about.

If the plug-in has problems finding samples, that is a problem the plug-in has to resolve. It does so by writing a log and throwing up a message.

 

When it comes to audio clips in the project, using per-project folders in their default location under the project file makes projects completely portable as the project stores clips with relative path names.

Using non-default locations for per-project audio folders or failing to import clips into a project causes the DAW to refer to the files using absolute path names. This can be a problem is one moves things around.

Share this post


Link to post
Share on other sites

Understood. I was seeing consistency in the error message for samples not found but I guess it's just using the Windows UI for that. Red herring on my part.

Good point about the per-project audio. I'll have to correct on that, in that it should be storing a copy in the project folder and thus remove any sample directory changes from the equation.

Well I guess this whole request is shot down. If I resort to building a sample reorganization app that generates hardlinks from the old location, send help.

Edited by Weekend Astronaut

Share this post


Link to post
Share on other sites

Directory junctions are a good and safe solution. They work when relocating folders for practically any application.

All the sfz engine synths developed by RCG and Cakewalk store the sample paths in the registry. But rather than mess with the registry, I have recommended directory junctions for years.

The sfz files used by the synths all use relative paths to their samples.

 

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...