Unify Manual

Your complete reference to PlugInGuru's creative playground!

User Tools

Site Tools


batch-proc

Batch processing for patch files (Unify 1.3.2 and later)

IMPORTANT NOTE: NI has just released Kontakt v6.5, which has changes which render our automated batch re-save system unusable. We are attempting to resolve this issue with NI developer support right now. If you haven't yet updated to Kontakt v6.5, please wait, and use the version you have to process any Unified Kontakt libraries first!

To skip the detailed explanation, click here to go straight to the step-by-step instructions.


Unify v1.3.2 introduced a simple batch-processing feature in the patch browser. This allows you to select a patch library (or perhaps a subset of patches in a library), and have Unify automatically load and re-save all the patches.

Ordinarily, if you re-save a patch right after loading it, new patch will get saved without any changes. However, things are different with a few specific plug-ins, most specifically Kontakt by Native Instruments. To understand why, you need to first understand something about how Unify saves patches, and then understand some important details about Kontakt.

How Unify saves and re-loads patches

When Unify saves a patch, it “asks” each plug-in instance for its current state, which the plug-in returns as a chunk of binary data. Unify does not attempt to process or interpret this state-data in any way; it just saves it into the patch file. When the patch is later re-loaded, Unify creates fresh new instances of all the necessary plug-ins, connects them back up as they were before, and sends to each one, the chunk of binary state-data it had saved. The plug-in instances respond by setting themselves up exactly as they had been, just before Unify saved the patch.

This, by the way, is exactly what any DAW does when saving and re-loading project files, and for most plug-ins, there's not much more to say about it. Problems can arise, however, if the state-data is not complete in itself, but contains references to other resources, such as sample files.

Some of Unify's built-in plug-ins do this, e.g. Guru Sampler saves references to sample files, and MIDIBox saves references to MIDI files. These plug-ins use library-relative file paths to ensure that if a patch is saved on one computer, but used on a completely different computer, the file-references remain valid.

A special problem with NI Kontakt in Unify

Native Instruments' Kontakt is an example of a plug-in which also uses file references in its state-data, but has no way of ensuring that these remain valid when the state is recalled on a different computer.

When you install ordinary Kontakt libraries (i.e., libraries for Kontakt itself, not Unify libraries), you're free to put them anywhere you want on your system. To use those libraries, you use Kontakt's own GUI to select e.g. .nki (Native Kontakt Instrument) files, and doing this tells Kontakt where to find all the related resources, because the .nki file specifies their locations relative to the location of the .nki file.

When you do this inside a host program, such as Unify or a DAW, and that host asks the Kontakt instance for its state-data, Kontakt will include the full path to the .nki and any other necessary resources. It cannot use any kind of relative path, because the path is entirely arbitrary–you chose it when you originally installed those resources on your computer. If that state-data is subsequently loaded into a fresh Kontakt instance on a different computer, where those resources have been saved at a completely different location (or perhaps aren't present at all), the only thing Kontakt can do is pop open a dialog asking you where they are:

(This is the Windows version of the dialog. The Macintosh version is similar, but has an additional “Search Spotlight” button under the “Resolve Automatically” heading.)

  • If you press the “Browse for folder” button and locate the folder containing e.g. the .nkr file, Kontakt will know where to look for the rest of the resources, and will be able to restore its state completely.
    • On a Macintosh, clicking the “Search Spotlight” button will usually work even better, taking advantage of the macOS Spotlight disk-indexing abilities.
  • If you also click the box marked “Keep search mode and selected folders for the current session”, Kontakt will remember the location of the folder you selected, and will be able to use it again when you load the next patch.
    • For most “Unified” Kontakt libraries, this will be enough to allow you to browse through the rest of the patches without seeing the “Content Missing” dialog again.
    • However, Kontakt can't save this information forever. If you quit Unify and start again, you'll have to go through the whole “Content Missing” process again.
    • This is where Unify's batch-resave function comes to the rescue; see below.

Solving the problem using batch re-save

Once Kontakt knows where to look, and is able to restore a previously-saved state correctly, if you then save the Unify patch, Unify will again ask the Kontakt instance for its state, but this time, the binary state-data will be updated to refer to all the resources at their NEW locations, on your computer. As a result, when you re-load the saved patch (even after quitting and re-starting Unify), you won't see the “Content Missing” dialog, because all the file-references embedded in the Kontakt state-data have been fixed.

Hopefully, by now you should be thinking that if you simply load and re-save all the patches in a “Unified” Kontakt library one at a time, making sure to respond correctly the first time you see the “Content Missing” dialog (making sure to click “Keep search mode and selected folders for the current session”), you can fix the whole library. You're absolutely right, and Unify's new batch re-save function can automate the process.

Using batch resave: step by step

1. In Unify's patch browser, select the patch library you need to update.

  • This is very important, to ensure you only re-save patches from that library

2. Manually open any patch.

  • On some systems, the Kontakt “Content Missing” dialog may appear right away.
  • On other systems, you may see a pop-up message like this:

  • This means you must double-click the Kontakt instance to open its GUI, and then you will see the “Content Missing” dialog:

5. Respond to the Content Missing dialog.

  • IMPORTANT: Click the “Keep search mode and selected folders for the current session” box
  • Locate the missing content, and click OK
  • The patch should load and play normally.

4. Click the “ops button” (concentric circles icon) to the left of the “lightning bolt” icon.

  • A small menu headed “Batch operations” appears.

5. From the menu, select “Update multiple Patches”.

  • The top half of the patch browser will change to look like this:

6. Click the “Start” button.

  • Unify will automatically select and load the first patch in the list, then the second, and so on.
  • If you see the “Content Missing” dialog, again, click the red Cancel button immediately and repeat step 5.
  • Eventually, patches should load without issues.

7. Wait while Unify automatically loads and re-saves every patch.

  • Once you're satisfied that this is going smoothly, it's perfectly OK to walk away, go to bed, etc.
batch-proc.txt · Last modified: 2022/02/04 15:10 (external edit)