-about this behaviour, MULTICH01-58150 has the real last changes respect to MULTICH01, that remains at first save.
This creates a number of pedalboards with same name but different contents…someone with same clue?
with a high number of custom saves, this could cause a heavy pedalboard orgy
on Web UI, pedalboards temp copies (in this case “MULTICH01” are named the same, not with this sequential number, so is difficult to understand which to remove…
If it can help, i share an opinion: One (or two) of possible reasons because mod Ui behaves not very well with zynthian snapshot. Snapshot recalls the pedalboard name, directly? this obviously should work at best if pedalboard name is not changed by Mod …
to workaround this (in case this is unsolvable by mod authors) how difficult is to force snapshot to save the pedalboard with priority to modification date instead of name? Hope you understand, my english here becomes hard …
I Try with a workflow:
Pedalboard name: xyz
pedalboard changed; re-saved in its web interface.
pedalboard name changed internally as xyz-20467
zynthian, before saving snapshot, checks pedalboard name and creation date first, then saves the one with newest date and containing part of previous pedalboard’s name…
Yes i know, if mod doesn’t produce copies of same pedalboard, would Be easier
I took a look at (https://github.com/zynthian/)mod-ui. It seems that “pedalboard-backups” can be avoided with a small patch to /zynthian/zynthian-sw/mod-ui/mod/host.py:
[Pls use the diff in the next article]
A simple hack. I will test it the next days - or someone else will give it a try?
In fact you have only to replace the while True: at line 1860 with the both lines marked with the + sign. Be aware of indentation - Python is very restrictive!
anyway… i tried some things… after having saved the original host.py…
to me nothing happened. After that i restored original host and tried some other things, such as reduce the random number to max 2 digits (01,09) …
By now a strange thing happens: Mod preloads empty at startup unconditionally without being present on default snapshot.
Could be a good idea, having any snapshot with it loaded with more speed…
but i believe is a bug…
P.S: just in case : what about giving sequential numbering instead of random? function “randint” does this, which one is sequential? in this way at least the newest one is recognizable on list
I don’t know why, but it seems not to be as easy as I thought. I tried several hours to get MOD-UI to overwrite the current pedalboard - it does not work. I removed all the code from the save() function and got an error when saving. I don’t know why.
Yes, it was my same feeling last night at 3am … Even python is totally unfamiliar to me. Changing random Number with sequential, maybe is a bit easier, maybe… i can’t figure how much easier… But seems that any change to code produces a Save error.
After hadding the whole day kickbacks of several different types for different projects, I thought that a little bit more frustration with Python would be a nice ending of this day
But I think I got it working. Can you try?
cd /zynthian/zynthian-sw
mv mod-ui mod-ui.orig
git clone https://github.com/dcoredump/mod-ui
reboot
If you want go back, simply remove my mod-ui clone and rename the original one back.
Whaaaaaat??? There should be something like that inside mod-ui/mod/host.py (line 1849):
def save(self, title, asNew):
titlesym = symbolify(title)[:16]
# Save over existing bundlepath
if self.pedalboard_path and os.path.exists(self.pedalboard_path) and os.
path.isdir(self.pedalboard_path) and \
self.pedalboard_path.startswith(LV2_PEDALBOARDS_DIR) and not asNew:
bundlepath = self.pedalboard_path
# Save new
else:
lv2path = os.path.expanduser("~/.pedalboards/")
trypath = os.path.join(lv2path, "%s.pedalboard" % titlesym)
# if trypath already exists, generate a random bundlepath based on title
if os.path.exists(trypath):
while True:
trypath = os.path.join(lv2path, "%s.pedalboard" % (titlesym))
if os.path.exists(trypath):
rmtree(trypath)
Ok, i Will check in depth, later… but i don’t Remember i’ve read this, after cloning… Just in case will try to change manually… if it’s only this change