What's new

Need Help with NKA Preset File Browser

DarylWise

New Member
I have a large library that I want to add a NKA Preset File Browser. I know very little about scripting and I was wondering I could possibly pay someone on here to create one for me. Please PM me and we can talk further. Thanks!
 
Hello.
Have you considered snapshots? If you don't know enough about scripting, these are the perfect solution.
You can even organize them into folders in order to create nested menus in the snapshot browser.
Cheers.
 
Hello.
Have you considered snapshots? If you don't know enough about scripting, these are the perfect solution.
You can even organize them into folders in order to create nested menus in the snapshot browser.
Cheers.

Yes I have. And my issue with that is 3rd Party Libraries cannot embed snapshots into the NKI or the Resource Container. So my customers would have to install the Snapshots in the Documents folder I believe. EvilDragon can confirm this as I found out from him.

And I also have done NKI presets but my main issue is that this library is large with groups (275), that each NKI is around 2.5MB. Making initial loading times 5-10 minutes.

Having a NKA preset browser would fix all of this.
 
Yes, the snapshots need to be manually copied which is an inconvenience.

There are a lot of preset browsers around. Some make use of the internal filebrowser.
Others use specialized solutions that allow the user to also create and rename new user presets.
This last solution is not very easy to do when scrolling and out of order saving/deletion is involved.

If you only require preset loading, i'd suggest a file browser as the best solution (menus are not too suited for the job anymore).

Best regards.
 
Last edited:
Yes, the snapshots need to be manually copied which is an inconvenience.

There are a lot of preset browsers around. Some make use of the internal filebrowser.
Others use specialized solutions that allow the user to also create and rename new user presets.
This last solution is not very easy to do when scrolling and out of sync saving/deletion is involved.

If you only require preset loading, i'd suggest a file browser as the best solution (menus are not too suited for the job anymore).

Best regards.

I would really love to have a loading and saving feature. Even if it’s a preset browser with just factory presets if you will without the loading and saving features I would let the users just make their own presets by saving the NKI.

If you or someone could still script a preset browser for me I would appreciate it. I know it will still be quite a job because all the controls need to go into an array I believe. And this library is pretty much a full blown synth with 4 independent Oscillators each with their own controls.

I am willing to pay as well. Can anyone help?
 
I'd like to make one for my own lib. Only thing... I don't know how to do that yet. @DarylWise : you seem to know more than I about the theory of it - I, on the other hand, lack the theory but am not afraid of coding. Maybe we can help each other? Can you (or anybody) point me to documentation about what nka presets are and how they work? I'm sure I could code something once I know the basic principles.
 
The base theory is pretty much the same no matter which method is used.
If you have a load/save button, it would work as follow:

On save, write the values of the relevant controls into an array, preferably in a loop.
At this stage there may be situations where a 2D array is useful in order to stack different groups of controls in predermined array elements.

On load, the reverse happens, with the expection that the functions for each control need to be recalled, so that the preset actually works and doesn't just change the control values.
You could just use a global function for this.

You know, it's hard to say exactly what works better, and where, because this depends a lot on your instrument sctructure (how you set up control arrays, control functions (if you made functions for every control, etc).

But yeah, it's write values, save array... then, load values to controls, apply functions (or set whichever paramenters you defined for the controls).

If you use load_array mode 0, then it's pretty much all there is to it. (you use the dialog box).
The thing is... almost everyone hates mode 0. :D, that's why solutions with menus, buttons, filebrowsers are normally used and require a lot more scripting (specially a custom scrolling solution with buttons).
Even the menu solution is tricky if you try to hide/show the menu entries, while also renaming them based on a ui_text save option...

If you just use a menu with fixed items and names, that could work, but menus are really not the best way to do this, IMHO. If you have a few dozen presets it starts to get clumsy.

PS: Make sure the array has finished loading (async check) before updating controls and recalling functions.
 
Oh, actually, I have one already: can't you just make an array persistent?

You can (int and, if i'm not mistaken, real arrays too). String arrays cannot.

Still, if your idea is having a bunch of persistent arrays around, consider this:

- Preset arrays can grow to huge sizes;
- You'd need to store a lot of these persistent arrays (depending on the number of presets, you'd have a lot of data floating around - imagine 100-500 persistent arrays. It would prove tricky to manage and doesn't seem efficient.)
- No ability to share presets via nkas.
 
You can (int and, if i'm not mistaken, real arrays too). String arrays cannot.

Still, if your idea is having a bunch of persistent arrays around, consider this:

- Preset arrays can grow to huge sizes;
- You'd need to store a lot of these persistent arrays (depending on the number of presets, you'd have a lot of data floating around - imagine 100-500 persistent arrays. It would prove tricky to manage and doesn't seem efficient.)
- No ability to share presets via nkas.
Right. How silly of me :)
 
I didn't actually make a preset manager. I just made Reset, Compare, Copy and Paste buttons, to allow the user to copy settings from one instrument to the other (because mine is a multi-nki library), etc. One single nka file serving as the clipboard, so there is no browser.

It was tedious to have to copy all controls' names several times over, but besides that it's the easiest thing I've ever done.

From what I understood, if you want to make a preset manager you must still save everything in a single array, and a single nka file (otherwise, I'm afraid rigid array names become impossible to deal with) and then provide a browser menu parsing the array, which should be partitioned into a definite number of "memory slots". SublimeKSP's multidimensional arrays may give a little help in that.

Oh, and I don't even know where the file is saved. Since there's only one, I trust Kontakt to find it where it left it. That might mean that factory presets should rather be imbeded in a script - anyway that's how I store the default settings associated with my Reset button.
 
Last edited:
Oh, and I don't even know where the file is saved.

Depends on which array load/save mode you use. See KSP reference. In case of mode 0, it opens up a dialog for saving/loading, by default pointing to the Data folder (relative to the NKR path) or Documents folder (in case of Kontakt Player libraries). In mode 1 it's the same paths, just no dialog.

If you want to be in control of the path where the NKA is stored, use load/save_array_str(), and put it relative to $GET_FOLDER_PATCH_DIR (or $GET_FOLDER_LIBRARY_DIR in case of Player libraries).
 
Note that $GET_FOLDER_PATCH_DIR might work a bit tricky in multis, not sure if your lib is based around multis or not.
 
Top Bottom