What's new

Exporting / converting a .nkp table preset into an array of values, how?

KrisY

Noob in frenzy loop
Is there a way to export or convert a .NKP table preset into numbers from 0-100 values, one value per column, with a row count of 128? So, basically I want to get a spread sheet of the values in the table and use that in an array, in the end.

(either by loading a preset and saving it in ksp, or by any/all other means, like shell-script or alike)

A .nkp preset file contains:
(when opening it in Sublime Text 3)

  1. 4007 0000 0000 0000 0100 0000 6873 696e
  2. 0100 0000 0000 0000 6bc0 1c25 87b8 46a6
  3. a3b8 878a 32f6 4906 9600 0000 0000 0000
  4. 4453 494e 7600 0000 0100 0000 4800 0000
  5. 0000 0000 4453 494e 6a00 0000 0100 0000
  6. 1800 0000 0000 0000 4453 494e 0100 0000
  7. 0100 0000 0100 0000 0100 0000 0100 0000
  8. 0100 0000 0000 0000 0000 0000 0000 0000
  9. 0d62 6585 0100 0000 0770 1000 0000 0000
  10. 0100 0000 0100 0000 0000 0000 0000 0000
  11. 0000 0000 0300 0000 3000 3000 3000 0000
  12. 0000 0000 0000 0000 0000 0000 0000 0100
  13. 0000 0100 0000 0000 0000 4453 494e 7500
  14. ... ... and then the rows continue...

There´s 8 columns in every row. When looking through the presets in my user folder, I see that it´s not one row per staple/bar in the table. Its random, or any number of rows in the document. So I guess it´s not a formula that is used anywhere else, ey?

Is it possible to get any usable format for a spreadsheet or a 2D array?

Would like to use a specific preset as a release trigger counter model, with each number set to one 128th of XXX seconds, split into percentages. But really, it has much more applications than that.

Thanks upfront!
 
Perhaps you missunderstood the issue. Indeed it is not an array. And that was not suggested either. I want to put an .nkp table preset into an array. So, the values of the table becomes the array values.

But maybe there is already a good way to convert a .nkp preset (table preset) into an array, using KSP?
 
Yes, check the Kontakt reference manual, section about modulation shapers. There are some shortcuts for saving/loading modulation shaper tables to/from txt files.
 
That's cool. I didn't realise you could do that. (SHIFT-click on the ACTIVE button export, SHIFT-COMMAND-click to import.)

Interesting that the output is floating point too, I'd always assumed it was 127 to 127, but you can be much more precise than the GUI suggests.
 
Yes, check the Kontakt reference manual, section about modulation shapers. There are some shortcuts for saving/loading modulation shaper tables to/from txt files.

Thanks! Great, but I cannot find it in the manual. Are you referring to "load_array_str() / load_array()"?

I managed to export one through the instructions from polypx´s entry though, but need the explanation first.
 
That's cool. I didn't realise you could do that. (SHIFT-click on the ACTIVE button export, SHIFT-COMMAND-click to import.)

Interesting that the output is floating point too, I'd always assumed it was 127 to 127, but you can be much more precise than the GUI suggests.

Yeah, never knew that. Cool, and very useful. Now I would be able to make certain find/replace actions to just re-order text into a simple array, then reference the values as time-based points.
 
Yes, check the Kontakt reference manual, section about modulation shapers. There are some shortcuts for saving/loading modulation shaper tables to/from txt files.

Yeah, never knew that. Cool, and very useful. Now I would be able to make certain find/replace actions to just re-order text into a simple array, then reference the values as time-based points.

Sorry, jumped the gun there. I looked in only the KSP manual. :/ You clearly said "Kontakt reference manual". Thanks for the tip, found it. KONTAKT 5 - Application Reference - 308:

INFO BOX:
When using this Table mode of editing the modulation shape, you have the option to import and export the table data as a text file. To open the export dialog, [Shift]-click the Active button; and to open the import dialog, use [Shift] + [Ctrl] on Windows or [Shift] + [Cmd] on Mac OS X.

A cutout of Sublime Text 3, viewing a .txt export of a table:

(0 = minimum, 1 = maximum values)

Screen Shot 2019-02-11 at 03.04.51.png
 
Last edited:
Top Bottom