SubFolders for Organization of LV2?

hi, is there any way to use SubFolders inside the Synced LV2 directory the DSP card?
Create Synth and Effects directories etc to clean up the file chaos?

3 Likes

The underlying library that looks after LV2 (lilv) does not allow for subfolders.
We’re thinking on different ways we might be able to better organize this, perhaps with tags or something.
but for now, it is what it is.

4 Likes

Hey Brad. We met briefly so you saw my UNIX beard in person :wink: This can be done with symlinks and a shellscript. You can use subfolders for organization and then create symlinks in a single “mono-folder” that lilv can read.

Here’s how:

  1. Organize Plugins in Subfolders on SD Card
  • Create a directory structure for your .lv2 plugins on the SD Card- I wrote ~/lv2_plugins/ here but it would be the plugins dir in mount point of the SD Card.

  • Example structure:

~/lv2_plugins/
├── effects/
│   ├── reverb.lv2/
│   └── delay.lv2/
├── synths/
│   ├── piano.lv2/
│   └── drum.lv2/
  1. Designate a Mono-Folder
  • Choose or create a single flat directory that lilv will read (e.g., ~/.lv2/). This is where symlinks will point to the actual .lv2 folders.
  1. Automate with a Script
  • To make this process easier, you can write a simple script to find all .lv2 folders in your subfolder structure and create symlinks in the mono-folder.

  • Example Bash script (update_lv2_symlinks.sh):

#!/bin/bash
SOURCE_DIR=~/lv2_plugins
TARGET_DIR=~/.lv2

# Ensure target directory exists
mkdir -p "$TARGET_DIR"

# Remove all existing symlinks in the target directory
find "$TARGET_DIR" -type l -exec rm {} \

# Find all .lv2 folders in SOURCE_DIR and create new symlinks
find "$SOURCE_DIR" -type d -name "*.lv2" | while read -r lv2_path; do
    lv2_name=$(basename "$lv2_path")
    target_path="$TARGET_DIR/$lv2_name"
    # Create new symlink
    ln -s "$lv2_path" "$target_path"
done

  • Save this script, make it executable (chmod +x update_lv2_symlinks.sh), and run it (./update_lv2_symlinks.sh) whenever you add or move plugins.

  • After running the script, ~/.lv2/ will contain:

~/.lv2/
├── reverb.lv2 -> ~/lv2_plugins/effects/reverb.lv2
├── delay.lv2 -> ~/lv2_plugins/effects/delay.lv2
├── piano.lv2 -> ~/lv2_plugins/synths/piano.lv2
├── drum.lv2 -> ~/lv2_plugins/synths/drum.lv2
  1. Verify with lilv
  • Once symlinks are in place, lilv should recognize the plugins in ~/.lv2/ as if they were physically located there.

Why This Works

You maintain your organized subfolder structure while satisfying lilv’s limitation. Symlinks make the .lv2 folders appear in the mono-folder without moving or duplicating the actual files. lilv doesn’t care that they’re symlinks—it just needs the .lv2 directories to be directly in the folder it scans.

If lilv ever supports tags or subfolders natively, you can adapt by removing symlinks and pointing your host to the source directory.

In the meanwhile the UI could show the folders in the original folder path for the display but use the simlink from the mono-folder to load the lv2.

(There are native libraries for this stuff in C or whatever language you’re using, I’m using the shell commands as a PoC here)

4 Likes