swesterfeld / spectmorph

SpectMorph: spectral audio morphing
http://www.spectmorph.org
GNU Lesser General Public License v2.1
64 stars 5 forks source link

Default SpectMorph directory location #10

Closed mxmilkiib closed 4 years ago

mxmilkiib commented 4 years ago

Could the default path of the SpectMorph directory be changed to .local/share/SpectMorph rather than ~/SpectMorph?

swesterfeld commented 4 years ago

I don't really like the idea of using .local/share/SpectMorph - the reason is that as you start using the instrument editor, you will be creating instruments in ~/SpectMorph. Projects using the SpectMorph LV2 plugin will refer to these instruments. This means that effectively the instruments become dependencies for your projects.

So you need to backup your instruments, and if you copy a project from your desktop to your laptop, it may not sound correct unless you also copy your ~/SpectMorph directory to your laptop. So I don't want these to live in a hidden .local directory.

For stuff that is ok to be hidden, like your window scaling factor, we already have ~/.spectmorph.

mxmilkiib commented 4 years ago

How about as a subdir of $XDG_DOCUMENTS_DIR? I'm not tied to any solution, I'm just not keen on apps creating directories in my home folder :)

St3fi commented 4 years ago

How about as a subdir of $XDG_DOCUMENTS_DIR? I'm not tied to any solution, I'm just not keen on apps creating directories in my home folder :)

Same here, I have not used SpectMorph yet, but just scanning my lv2 plugins by ardour and carla maybe created this folder in my homedirectory. I was just searching why there is a folder there and tried with the spectmorph docu and even started the plugin to see whether there is an option to choose a different path. I didn't find an option.

Why is that folder created if spectmorph has not been used as a plugin?

The plugin could be improved if users could choose an appropriate path on their own within their organisation system, and also, if the user is asked whether a folder should be created when the plugin is first started. The folder should not be created if the plugin has never been used.

swesterfeld commented 4 years ago

Ok, as I see it there are three improvements here:

  1. The SpectMorph directory should not be created unless it is necessary. So if you hit "Save" after using the instrument editor, the directory should be created.

  2. The SpectMorph directory could go into XDG DOCUMENTS directory. On other platforms it already does this (on macOS and Windows we use the user documents dir). The downside with this is that there are users that already have instruments in ~/SpectMorph, so merely changing the path will make newer plugins no longer find them.

  3. Make it configurable. This means new UI, possibly a cross platform folder selector and so forth, so I'd like to avoid this if possible. A config entry coud be added in ~/.spectmorph/config, but that would be an expert only solution, so for most users it wouldn't help.

So I think I'll definitely implement 1, maybe 2 and probably not 3.

St3fi commented 4 years ago
3\. A config entry coud be added in ~/.spectmorph/config, but that would be an expert only solution, so for most users it wouldn't help.

Plies? :-) I am definitely no expert but I could probably do this :>

mxmilkiib commented 4 years ago

To deal with the cases where a ~/SpectMorph already exists, maybe a check to see if that directory already exists to use? Something temporary, to be removed in say ten years or so :)

Regarding the cause of "no applications should create directories or files in directly in a home folder"; can I also explicitly request that the existing hidden ~/.spectmorph directory also be shifted to the appropriate XDG subdirectory?

swesterfeld commented 4 years ago

To deal with the cases where a ~/SpectMorph already exists, maybe a check to see if that directory already exists to use? Something temporary, to be removed in say ten years or so :)

This is what I implemented, it is now $XDG_DOCUMENTS_DIR/SpectMorph unless ~/SpectMorph exists.

Regarding the cause of "no applications should create directories or files in directly in a home folder"; can I also explicitly request that the existing hidden ~/.spectmorph directory also be shifted to the appropriate XDG subdirectory?

I've changed ~/.spectmorph to $XDG_DATA_HOME/spectmorph on linux (typically ~/.local/share/spectmorph). So the issue is fixed now in git, I am closing the issue. It may take a while until the next official release - 0.5.2 - is available, there are new features that need to be finished before releasing.