samplv1
samplv1 copied to clipboard
Use absolute rather than relative paths for samples
When I load saved presets in samplv1, the application and my DAW crash. I looked at the saved preset file and noticed that the
This is an extreme example of what I'm describing
<filename>../../../../../home/username/Music/Samples/Hi Hat.wav</filename>
vs.
<filename>/home/username/Music/Samples/Hi Hat.wav</filename>
the stored path is relative to the directory where the *.samplv1 was first saved--not the current directory whatever it is at runtime (host).
simply told: you're here advised to NOT MOVE any *.samplv1 files around your file-system; always keep them on it's original location, where they were first saved;
exception to this rule is when the sample file and the .samplv1 preset file (that refers to it) are stored on the very same folder: in that case you may well move both files around without issues (remember that this is also the rule for .sfz files too although you must obey to it at all times;)
@rncbc Thanks for the clarification!
I didn't move the *.samplv1 files after writing them, but the crash still persisted until I replaced the path with an absolute path. One thing that might be relevant is that my ~/Music
folder is a symlink to /pool/ROOT/music
. This could be causing the wide string of ..
's in the original filename.
My theory for the crash is that it's attempting to apply the relative path from the preset's real path to the preset's symlink path, but I'm not so sure.
This would mean applying ../../../../../home/username/Music/Samples/Hi Hat.wav
to /home/username/Music/DAW/Project/'
rather than /pool/ROOT/music/DAW/Project/
, but I believe in this case the Music
directory has the same depth from the symlink and the realpath, so this would not be a problem.
Do you have any ideas on what could be causing the crash? It's entirely possible that I'm mislabelling what happened, so I apologize in advance.
no clue whatsoever about the crash... you'll have to try something else (like saving the .samplv1 files on the same or on a non-symlinked file-system tree and check to be sure it doesn't crash in that manner
otherwise, you'll probably have to run the whole show under gdb and catch a stack-backtrace to locate the culprit (where and what is causing the crash).
Thanks for the ideas! I'll let you know if I find anything.