Hi everyone,
What is the logic behind the sorting of the user presets in the plugins detail from the web interface. There is some index anywhere? Some way to sort the presets as we want?
Thanks
Hi everyone,
What is the logic behind the sorting of the user presets in the plugins detail from the web interface. There is some index anywhere? Some way to sort the presets as we want?
Thanks
I figured out.
The order is the the alpha-numeric order of the presets folders in the ~/.lv2 folder.
The web ui creates the presets folders using some type algorithm by adding numerals between the plugin type descriptor (ex: mapcc) and the name given by the user. This is why the presets apear randomly. So, to get a nice sorting order we need to change the folder name and the referencies to the folder in ALL pedalboards.
I made a simple bash script to do that, but before we change the folder name, we must confirm if the ttl file inside the folder is realy related with the name we want to give to the folder. The name of the ttl file is create with the name given by the user in the web ui, and that is the name shown in the web ui. In my case, this command let me compare the folders and the ttl files:
[root@modduo ~]# find .lv2/* -path */mapcc* -name FCB*.ttl
And this the output:
.lv2/mapcc_111114-FCB01.lv2/FCB01.ttl
.lv2/mapcc_111114-FCB02.lv2/FCB02.ttl
.lv2/mapcc_111114-FCB03.lv2/FCB03.ttl
.lv2/mapcc_111114-FCB04.lv2/FCB04.ttl
.lv2/mapcc_111114-FCB05.lv2/FCB05.ttl
.lv2/mapcc_FCB01_VDL01_GAIN.lv2/FCB01_VDL01_GAIN.ttl
.lv2/mapcc_FCB01_VDL02_LEAD.lv2/FCB01_VDL02_LEAD.ttl
.lv2/mapcc_FCB01_VDL04_VLS.lv2/FCB01_VDL04_VLS.ttl
.lv2/mapcc_FCB02_VDL01_GAIN.lv2/FCB02_VDL01_GAIN.ttl
.lv2/mapcc_FCB02_VDL02_LEAD.lv2/FCB02_VDL02_LEAD.ttl
.lv2/mapcc_FCB02_VDL04_VLS.lv2/FCB02_VDL04_VLS.ttl
.lv2/mapcc_FCB03_VDL01_GAIN.lv2/FCB03_VDL01_GAIN.ttl
.lv2/mapcc_FCB03_VDL02_LEAD.lv2/FCB03_VDL02_LEAD.ttl
.lv2/mapcc_FCB03_VDL04_VLS.lv2/FCB03_VDL04_VLS.ttl
.lv2/mapcc_FCB04_VDL01_GAIN.lv2/FCB04_VDL01_GAIN.ttl
.lv2/mapcc_FCB04_VDL02_LEAD.lv2/FCB04_VDL02_LEAD.ttl
.lv2/mapcc_FCB04_VDL04_VLS.lv2/FCB04_VDL04_VLS.ttl
.lv2/mapcc_FCB05_VDL04_VLS.lv2/FCB05_VDL04_VLS.ttl
In this case I already have my mapcc presets ordered, and they apear in this order in the web ui. The script is as follow (run this from MacOS/Linux connected to the Mod Duo by usb cable, don’t forget to run “chmod +x script_name.sh” to make the script executable. Reboot the Mod Duo after change the folders names to apply):
#!/bin/bash
if [ $# -ne 2 ]
then
echo "Rename lv2 presets folders. This not change the presets names. The goal is to change the name of the folders to sort them as we want."
echo
echo "Usage: $0 <OLD NAME> <NEW NAME>"
echo
echo "Ex: $0 mapcc_1111-MY01_PRESET_NAME.lv2 mapcc_MY01_PRESET_NAME.lv2"
echo
exit 1
fi
clear
if ssh root@modduo.local ls .lv2/$1 &>/dev/null
then
echo "Ok! Folder $1 exist"
else
echo "The folder $1 does not exist"
exit 1
fi
if ssh root@modduo.local ls .lv2/$2 &>/dev/null
then
echo "Error! Folder $2 already exist. Please delete de folder/preset first if you want to change the folder name"
exit 1
else
echo "Renaming folder"
fi
ssh root@modduo.local mv .lv2/$1 .lv2/$2
echo "Changing folder referencies in pedalboards..."
echo "(this may take a while, depending of the number of pedalboard in the Mod Duo)"
ssh root@modduo.local "find .pedalboards/ -type f -exec sed -i 's/$1/$2/g' {} +"
This code is aproved by the Mod gurus?
Hi @c0ntact0!
Thank you for your work and sorry for the headaches.
Since I am new to MOD I also had to investigate this issue. This post relates to version 1.6.1.601.
First to the plugin preset ordering: When you save new presets they stay in creation-order until you reload the webpage. After reloading, the presets are in the same order as the filesystem lists them. If your preset label starts with a number or an underscore, the resulting order is even more unforeseeable.
Onto your script: Thank you for you effort and for publishing your work. But I cannot “guru-approve” this.
So here is a description how you could do it manually:
I hope this helps you out of the trouble.
Best regards
Jakob
This is not true. The pedalboards reference plugins by URI and store a snapshot of all values themselves.
Best
Jakob
Hi @Jakob,
Thanks for the replay and comments.
You are rigth, the original files are created using “-” insted of “_”.
The goal of the sed it’s not to rename the preset (the real name) but to change the “pedal:preset” URI in the ttl file to comply with the new bundle name.
Regards
Rui
Right, but I thing if we don’t change the “pedal:preset” URI the preset will not be selected in the web ui user presets list because the URI is pointing out a non existing bundle.
I don’t have my Duo with me now to confirm this, but I thing that it’s the logic behind that URI.
Rui