PresetMagician: Generate NKS Presets from VST plugins

Discussion in 'MASCHINE Area' started by Drachenkatze, Nov 10, 2018.

  1. ble

    ble New Member

    Messages:
    14
    the hardware and software knobs doesn't work with exported presets, my english is not so good, sorry if i can't explain it.
     
  2. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    Did you assign a controller template in the plugin settings?
     
  3. Baer

    Baer NI Product Owner

    Messages:
    34
    I agree you can reduce complexity by eliminating the upload feature. Rather focus on improving the auto generation and storing the correct data in nksf file, making sure that folder names, plugin file names etc allow KK to find the resources.

    I have a bunch of plugins where the images don't show up in KK's preset browser or - even if they do - once you load the plugin they do not show in the plugin view (KK keyboard Mk2). I tried renaming the dll file names, tried different image folder names (both vendor as well as plugin specific folder) etc - but very limited success. It somehow appears to be a mix of filename and embedded data in nksf files (maybe it sometimes works in certain constellations due to fallback mechanisms which obfuscates the real culprit, say: nksf file would require a tweak but KK somehow compensates this problem via filename matching... only works in specific situations which makes it appear the filename was the root cause but in reality it is buried deeper...)

    (Maybe) related question: Have you figured out how the data following "uuid" in the nksf file relates to the plugin? Is this some checksum/hash over the plugin ID or even the actual plugin file?
     
  4. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    Well, the major problem here is that NI doesn't make their NKS spec public. In turn, that means I don't have a particular problem to solve, but identify the problem (or part of it first). Often "concentrating" is not the right way to go, but rather doing something else first. Reverse engineering is often an extremely creative process.

    Plugin images didn't work for me for a long time, until I found the solution a few days ago. I have just documented my findings at the PresetMagician manual. It may or may not complete.

    No, a UUID (or GUID) is an unique identifier, mainly used to ensure that two IDs are (mostly likely) unique. So it's a way to ensure that a NKS preset can be uniquely identified, no matter when and by whom it was created. PresetMagician uses the UUID to check if the preset was actually generated by it, and refuses to overwrite existing files if not (unless configured otherwise). I don't know if NI actually uses the UUID.
     
  5. ble

    ble New Member

    Messages:
    14
    yes, and i try many tamplates, with no result
     
  6. Baer

    Baer NI Product Owner

    Messages:
    34
    Thank you, Felicia, for the speedy reply! I will check out your findings and report back if I can confirm them on my machine too. If possible I would prefer keeping my current dll filenames (quite a few have special characters like "(x64)" or "_") and rather updating image directory names rather than changing the dll filenames. Reason: Despite of the fantastic help of PresetMagician it still took me some time to get all my user presets (thousands) neatly organized with tags, previews etc. I am a bit worried that if I change the filenames of the dll I might break something or have to regenerate all the nksf, previews etc again. On the other hand, for new plugins, it seems that it would be advisable to first check with PresetMagician what the plugin reports as its name and then change the filename of the dll to exactly that and finally to analyze and generate the presets. In that way there is the lowest risk of name/path confusion.

    Questions: If I was to change the dll filenames for my existing plugins like described above
    a) Would I be able to keep the already created nksf files or should I re-create them with PresetMagician?
    b) How is the plugin dll file associated with the nksf? Form the HexEditor view it seems that nksf files do neither contain the plugin ID nor the file name. Are they associated just by the vendor name and reported plugin name? If the latter was then I think I could change the filename (question above) without having to recreate the presets...
    c) Even if I have to recreate the presets: Can I keep the audio previews?
     
  7. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    Uhm, you are not supposed to change your DLL filenames. The conversion just refers to the resulting directory names.

    In theory PresetMagician should merge plugins based on the plugin name (NOT the DLL filename) and the plugin ID. Since this is a bit complicated, it might not work in all cases, but so far I haven't noticed any bugs with it. So no matter if you move or rename the DLL, PresetMagician should detect that.

    The NKS files aren't associated with the plugin DLL, but the plugin ID (see https://presetmagician.gitbook.io/help/faq/nks#nks-preset-files ). I'm not sure if the NKS inspector is visible for end-users in the current PresetMagician version (Tools/Settings -> NKS Inspector) but the next version will have an option to enable developer tools, with which you can use that feature no matter what.

    upload_2019-5-8_18-49-27.png

    If the output NKS filename stays the same, yes. As far as I know Maschine/KK looks in .previews/nameofyourfile.nskf.ogg.
     
  8. Baer

    Baer NI Product Owner

    Messages:
    34
    Ahh, right, I over-read that. This makes sense.

    In V0.6.1 the NKS inspector actually shows this. I think I stopped using it and thus forgot about its existence because it would crash when I click open in HxD. The reason is simply that PresetMagician does not know where to search for my install of HxD... I always open the nksf directly in HxD and hence loose the additional decryption insights from NKS inspector. Looking forward for the next version! Will you include the possibility to enter a path for HxD? Not a priority obviously :) would be just convenient. I can always open it separately too of course.

    Thanks for the explanation of the other parts. I will stick to the plan to just update directory paths for my existing plugins then. Will let you know how it turned out.
     
  9. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    Well in fact the NKS inspector was one of the earliest piece of code I've written for PresetMagician, so I simply hardcoded the path ;) Since I recently bought HHD Hex Editor Neo, I added a config option to configure the hex editor path. Coming in 0.6.2 ;)

    But please consider all dev-stuff as "may crash at any time without warning" ;)
     
  10. Baer

    Baer NI Product Owner

    Messages:
    34
    Sure, that is fully expected. No problem. I am actually surprised how stable PresetMagician is (the "non dev stuff") considering it is still in alpha. Really great work (especially the reverse engineering portion of your work, not "just" the coding)!
     
  11. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    Well I also consider software not being "feature complete" as alpha, and because adding new features quickly often requires refactoring existing parts of the code, things might break in a future alpha version. Okay, it's mainly a precaution ;)

    I'm actually considering going beta soon, even though there are 1001 features I'd like to implement first. However, I also have to see if PresetMagician can generate enough income to make it a full-time job, and the way to check that is to actually release a "1.0" version.
     
    Last edited: May 9, 2019
    • Like Like x 1
  12. BOOM BAP XL

    BOOM BAP XL NI Product Owner

    Messages:
    190
    Wish Nexus or Avenger was compatible :(
     
  13. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    Unfortunately ReFx doesn't provide a demo for Nexus, so I can't develop support for it without buying :( The VPS Avenger demo doesn't support getChunk(). I asked the vendor for a development license, but no response so far ( https://support.presetmagician.com/issues/153 )
     
    • Informative Informative x 1
  14. BOOM BAP XL

    BOOM BAP XL NI Product Owner

    Messages:
    190
    I just sent an email over at Vengeance to hopefully nudge them in the right direction.. I'm guessing that if myself and other Avenger users get onto them about it they might pay a little more attention. Fingers crossed. Shame about Nexus, with it's hundreds of presets your software would have been a HUGE time saver.

    Keep up the good work!
     
  15. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    I created a twitter account for PresetMagician yesterday, where I'll tweet development progress and sometimes random stuff I'm working on if it's related to PresetMagician: https://twitter.com/PresetMagician
     
    • Like Like x 1
  16. Baer

    Baer NI Product Owner

    Messages:
    34
    Quick feedback:
    1. Adding the image directories as per your findings for those plugins with special characters in the dll filename (i.e. removing special characters, concatenating MD5 hash) did the trick. Images now appear when loading the plugin. Great, thank you!!
    2. You wrote: "Note that the meta file must be named the same as the directory." I could not confirm this. It did not make any difference if I renamed the .meta file or not. This is true for both the folders image\<vendor name>\<plugin name>\ as well as image\<plugin name>\
    3. If the vendor name contains special characters the images do not show up in the preset browser. When you load the plugin images do show up (see above). You wrote:
    "Right now, it's unknown if special characters (anything else than a-z, 0-9, dashes, and underscores) must be replaced or ignored. I did not yet encounter a plugin with special characters, as such I couldn't test it."
    One example is the plugin sforzando from the vendor "Plogue Art et Technologie, Inc": https://www.plogue.com/products/sforzando.html
    The comma in the vendor name ruins the party...
     
  17. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    You're welcome!

    That's interesting, maybe I did something wrong during my investigation, or NI has changed the .meta loading and now picks the first .meta file it finds?

    Oh :( Now it would be interesting to find a plugin which has NKS support and contains special chars in either the plugin or vendor name, to see how they solve that problem.
     
  18. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    I just realized that "Plogue Art et Technologie, Inc" do have NKS-enabled plugins, so I downloaded a demo and the folder they create is: "plogue art et technologie inc_b9037cb7926693f3aaa6ba2ffe9b3285". Of course ;) And the md5 hash equals to the vendor name.
     
  19. Baer

    Baer NI Product Owner

    Messages:
    34
    No kidding! What I had not written in my previous post: I already tried exactly this folder name (applying your logic also for the vendor) but it did NOT work. After reading your post I tried again and would still NOT work. I now also changed the subfolder name to the dll filename (in my case from "sforzando" to "sforzando vst_x64" and voila: works! Thus it is important to change the subfolder names to dll filenames in case the vendor name contains special characters.... Who at NI has come up with these rules???

    I have some additional information for you: When an individual plugin is loaded the background color for the right screen of a Mk2 keyboard gets retrieved from dist_database\<plugin name>\color.json. The background color is only loaded when the plugin image for the left screen was found before. If the plugin image for the left screen is not found or if dist_database\<plugin name>\color.json is not found then the background color for the right screen is black.
    Now comes the interesting part: When the background color for the right screen has been loaded successfully for the first time KK stores the color somewhere in its own database. You can find this out by removing the color.json file or even the entire folder. KK will still remember the background color. This even goes so far that if you change color.json after the first successful load the color does not change anymore! Better pick a nice color in the first attempt - lol.
     
    • Informative Informative x 1
  20. Drachenkatze

    Drachenkatze NI Product Owner

    Messages:
    348
    Whoops, I have missed that.

    Well...NKS feels like a hack ;) Most likely scenario: "Hey, we need to implement this in 2 months for the upcoming trade show".

    Ouchies. May I add that information to the NKS FAQ on the PresetMagician site?