~# LMMS Issue: Moved sample library. Broken links everywhere

Support & discussion regarding DAWs and MIDI sequencers.

Moderators: MattKingUSA, khz

Post Reply
Wightboy
Established Member
Posts: 6
Joined: Wed Apr 07, 2010 1:22 am

~# LMMS Issue: Moved sample library. Broken links everywhere

Post by Wightboy »

Recently ive moved my entire sample library that I use for LMMS into a new directory.

Of course now all my projects that use these samples do not function, because in the beat/baseline editor the links to the .wav sample files are all invalid, as the path to them has changed, therefore nothing plays.

Is there any way for LMMS to automatically search for and repair the missing sample links (maybe I can direct LMMS to their new directory) so my projects can all function again?

I really do not want to have to manually reassign them all as I have over 200 projects, each with 16-32 samples tied to them, and that would be over 6400 clicks

this problem has been killing me for months now (ive registered to about 3 different forums for help so far) :mrgreen:
thanks
(if this is in the wrong place/been asked before I apologise, please link me etc)
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: ~# LMMS Issue: Moved sample library. Broken links everywhere

Post by autostatic »

Wightboy wrote:Is there any way for LMMS to automatically search for and repair the missing sample links (maybe I can direct LMMS to their new directory) so my projects can all function again?
No.

You either have to create a symlink from your old directory to the new one or you could use a little script or maybe even a gedit plugin to replace all the old directory filenames in your LMMS project files. I'm not a script wizard but some grepping/awking/sedding through your project files should work. Besided, you're probably not the first who'd like to do this so maybe you could dig something up yourself.

Best,

Jeremy
Wightboy
Established Member
Posts: 6
Joined: Wed Apr 07, 2010 1:22 am

Re: ~# LMMS Issue: Moved sample library. Broken links everywhere

Post by Wightboy »

AutoStatic wrote: You either have to create a symlink from your old directory to the new one or you could use a little script or maybe even a gedit plugin to replace all the old directory filenames in your LMMS project files.
I was thinking last night about something like that.

Is there a local file LMMS creates which stores project information? Possibly something that I could open up and 'find and replace' all the '/Old Directory' bits with '/New Directory'
Or, do I have to edit each individual project file.

I have no experience with scripting or the like. I also have to admit, Im running the windows port of LMMS here, (so have no idea what kind of editing programmes I might need)..
I was hoping the solutions though would be generalised across os's :?

thanks for your response anyway, Its been the best so far of the 4 or so forums Ive asked in :mrgreen:
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: ~# LMMS Issue: Moved sample library. Broken links everywhere

Post by autostatic »

In fact, I think it's much simpler. Open the LMMS Setup (Edit - Settings), click on the folder icon and modify the path of the LMMS WORKING DIRECTORY to the directory that contains your projects folder. This has a drawback though, it also means that your samples and presets have to be in that directory.
LMMS stores these settings in a file called .lmmsrc.xml. I don't know what the Windows equivalent is though (probably something like C:\Users\Wightboy\.lmmsrc.xml).
Wightboy
Established Member
Posts: 6
Joined: Wed Apr 07, 2010 1:22 am

Re: ~# LMMS Issue: Moved sample library. Broken links everywhere

Post by Wightboy »

AutoStatic wrote:In fact, I think it's much simpler. Open the LMMS Setup (Edit - Settings), click on the folder icon and modify the path of the LMMS WORKING DIRECTORY to the directory that contains your projects folder. This has a drawback though, it also means that your samples and presets have to be in that directory.
LMMS stores these settings in a file called .lmmsrc.xml. I don't know what the Windows equivalent is though (probably something like C:\Users\Wightboy\.lmmsrc.xml).
This is the thing. when I started with LMMS, last year some time, I dumped all my samples into ...blahblah/docs&settings/user/mydocuments/mymusic . NOT the default working directory,

Now, I want to relocate them into the default working directory, as I realise this would be a lot more organised ..blahblah/docs&settings/user/lmms/samples.

LMMS's working directory is my new folder that im relocating all my samples to. it's always been that way, even when I had my samples in their old /mymusic folder.

I think the best solution was your first response, . ie to 'batch' edit the project files
This is the bit im unsure about, I have no idea which programme would let me edit these files in windows.

thanks for these responses though, I feel like im close to a solution here.. :wink:
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: ~# LMMS Issue: Moved sample library. Broken links everywhere

Post by autostatic »

LMMS uses either mmp (uncompressed) or mmpz (compressed) project files. These are XML files so it should be possible to parse them for directory names. And a tool like 7zip should be able to decompress mmpz files. Batch files to replace text are all over the net, can't help you with that unfortunately, it's just been too long that I've touched any Windows machine, let alone a batch file :oops:
Wightboy
Established Member
Posts: 6
Joined: Wed Apr 07, 2010 1:22 am

Re: ~# LMMS Issue: Moved sample library. Broken links everywhere

Post by Wightboy »

AutoStatic wrote:LMMS uses either mmp (uncompressed) or mmpz (compressed) project files. These are XML files so it should be possible to parse them for directory names. And a tool like 7zip should be able to decompress mmpz files.
I have located a nice XML text replacement programme, and also have 7Zip.

Im a complete noob at this, so I apologise in advance for my lack of knowledge in this subject area.. :D
thanks :mrgreen:
Post Reply