christofmuc / KnobKraft-orm

The KnobKraft Orm - The free modern cross-platform MIDI Sysex Librarian
GNU Affero General Public License v3.0
200 stars 25 forks source link

2.0.7 installation problem - Windows 7, possibly Python related #268

Closed Andy2No closed 1 year ago

Andy2No commented 1 year ago

I had 2.0.6 beta working, so I'll try reverting to that, but the 2.0.7 installation isn't working properly for me. Although it ran after installation, I can't find it in the Programs menu, or in either Program Files folder, though it does appear in the list of programs that can be uninstalled from the Control Panel (in Programs and Features).

On first startup, it had forgotten my Behringer Pro 800 patches (for the adaptation I was working on), so I imported them again (as a sysex dump file, from the Patches menu). I exited to check if they were still there, but couldn't start it up again.

I very recently installed Python 3.8.6 manually, so I can try using it from the command prompt. That was the most recent version I could find for Windows 7. The version installed with KnobKraft didn't have pip, which I needed, and it didn't seem to be possible to get it to work by adding it. I had started 2.0.6 beta earlier, and found it had forgotten my Pro 800 patches, so I added them again, then exited, but it had forgotten them when I started it up again.

I'm wondering if KnobKraft is now trying to use the parallel installation of Python, instead of the one that was installed with it.

What do I need to delete to do a clean uninstallation, so I can try again from scratch?

Andy2No commented 1 year ago

Update: I uninstalled 2.0.7, from the Control Panel, and reinstalled 2.0.6 beta. It works, and it's back in the programs menu, but it was starting with a new blank database each time, losing all patches.

I've now told it to open a backup database, from the My Documents folder I keep them in, and that seems to be working, so far. It was previously opening a new database in my Users folder, called something like SysexDatabaseOfAllPatches({number}), with the number increasing each time I started it up.

christofmuc commented 1 year ago

@Andy2No this is weird, 2.0.6 and 2.0.7 have only minor changes and none should explain your experience.

  1. You might be right that your installation of Python 3.8 could interfere with the embedded Python, but normally it shouldn't. Can you check if there is a log file in C:\Users\\AppData\Roaming\knobkraft\knobkraft.log?
  2. Same for the database. Best guess to find the last backup is to use the modification time, the backup files are in the same folder as the normal database (and make sure you copy one backup away from that folder just to be sure). You should be able to copy the database and rename it to a normal name so you don't get confused which one is the backup and which one the restored that you want to use.

Between the two versions, no difference was made to the database format, so that is weird. Can you open the database with a different tool e.g. the DB Browser (SQlite) freeware? Just to make sure the file is not corrupted.

Andy2No commented 1 year ago

Hmm... I don't have a log file there. The empty databases that it kept creating, in C:\Users\andy\AppData\Roaming\KnobKraft, got up to SysexDatabaseOfAllPatches(10).db3 and SysexDatabaseOfAllPatches(10)-backup.db3. That, and the backup I've reinstated both pass the integrity check in DB Browser.

Does the embedded python rely on the command path, in the environment variables? Maybe I've messed that up. It seems to be stable now I've pointed it at the database with the patches in, but I can't see an easy way to check which Python version it's using.

christofmuc commented 1 year ago

Right, it seems we need a help output box printing the current Python configuration. It could be a Python installation interferes, but not too likely as I have probably 10 different Pythons on my box and haven't noticed anything.

Good that you're back in stable territory - I will think about how to make the environment check better. The newly created fresh database actually are a crash fix in that if it can't open the database for whatever reason, it will create a fresh one so it doesn't crash. I wonder what could have locked the databases. Maybe there was a hang and a non-finished KnobKraft was still holding tight to the database file? To check should it occur again look in the task manager if there is a second KnobKraft running.

Andy2No commented 1 year ago

Good point. I didn't think to look for a second KnobKraft instance.

I habitually keep my databases in a folder in "My Documents", partly so I don't have to remember the AppData path, and because I figured they might be safer there. I occasionally back up My Documents, so there would usually be a reasonably recent copy.

I didn't mention it, but KnobKraft had also started up without my settings for the window size and zoom level, which probably would have been preserved if things had gone smoothly, so it seems it had lost the settings, somehow.

christofmuc commented 1 year ago

Weird, that sounds like it lost the %APPDATA%\Roaming\Knobkraft directory. I'll close this issue as non-reproducable, but let's keep an eye on it with the next release!

Behringer Pro 800 - cool! How do you like it? Let me know if I can be of help with the adaptation, or when we can include it in the release!

Andy2No commented 1 year ago

@christofmuc The Pro 800 is pretty good, especially for the price, though I do miss having the 2 pole filter option that the DSI/Sequential Mopho, Tetra and Rev2 have. I've been thinking I could use another synth after it to provide the filter, making it paraphonic, but that does complicate saving patches. It would either involve a note of which to choose, or dedicating hundreds of patches on the synth with the 2 pole filter option. I haven't ruled it out though.

One thing I do like is that I can get subtle detune between the two oscillators of a voice, like I can with true analog synths like the Odyssey (Korg, in my case). I can't do that with the DSI/Sequential Rev2 etc, because it's all in big course steps. Detune and spread on those goes up to 127, but 1 is too much, most of the time. I've read supposed workarounds, but they don't work. Maybe they did in an earlier firmware version.

Unfortunately, Behringer still haven't released the full sysex spec for the Pro 800, and haven't officially released it at all. Some people seem to have either reverse engineered some of it, or had it revealed to them, and only them, but still not all of the details.

So, I still can't make a full implementation yet. What I did have working already is fine - I can load in a full patch dump (which is a dump of all non-blank patches, not all 400 patches... actually all but one because D99 is always missing, so far), and I can rename patches in the Orm, then save them again, as individual patches. The details that have been revealed since are how to load and store an individual patch, so I can add that, but there's no universal sysex identification, AFAIK, and no one seems to know how to send a patch to the edit buffer.

I meant to put what I have so far in a discussion, and I will if anyone asks for it. Failing that, I'll wait until I've got a bit further with it. I'm thinking I could use patch D99 as a pseudo edit buffer, but since the patches are probably stored in Flash, at fixed locations, I'm reluctant to do that because it would wear it out.

Was there any progress on the idea of sending program and bank selects instead of sending to the edit buffer? Maybe I could just wire a "convert patch to edit buffer" function that makes a Bank Select + PC message, and rely on the contents of the Orm database matching what's on the synth.

christofmuc commented 1 year ago

Ha! The Orm will automatically just send bank change/program change, if you have imported the synth banks. It then knows which patch is where, and if you click a patch that's in the synth's memory, it will not send it again but just switch. Check the log window for the output.

Regarding the Pro800 - did you revisit the Deepmind implementation? That was already very well documented, and the Deepmind had a great MIDI implementation. I would hope that Behringer hasn't moved too far off that.

Andy2No commented 7 months ago

It took me a while to find this thread again. AFAIK, Behringer still haven't released any more documentation on the sysex implementation of the Pro 800, and there doesn't seem to be any correlation to the DeepMind sysex.

They documented the patch structure, and sysex commands to dump or store a single patch to a numbered location. We also have a command to retrieve some global settings, but no details of how they're structured. It seems the number of the currently selected patch is in there, which could be useful if it's possible to make the Orm adaptation do a two stage process - retrieve the globals, to get the current patch number, then retrieve that patch to simulate getting the edit buffer from the synth - though with no way to send it back.

One option to simulate sending to the edit buffer would be to send a long series of CCs, because all, or almost all parameters have one. That wouldn't send the name though. Possibly there would need to be short delays between CCs, to avoid overwhelming the synth.

I'm not sure how much of this an adaptation could currently do, but it seems like something that could maybe be done, one day, but possibly some changes to how adaptations work would be needed.

I've mentioned part of the problem in #234 - I'd need either the adaptation or the user to be able to say what happens when a patch in the Library grid gets clicked. If patches are stored in Flash, routinely sending them to the synth could wear it out quite quickly, and without manual or adaptation control, I wouldn't be confident that wasn't happening.

christofmuc commented 7 months ago

Right. What could be done is to just look at what the Behringer App sends, but maybe the documented part is already sufficient? I broke out the comment to a new discussion where we can collect stuff about the Pro 800 (this here was indeed well hidden!)