Unify Manual

Your complete reference to PlugInGuru's creative playground!

User Tools

Site Tools


Keeping Unify's patch database clean with scrub.xml

Part-way through 2020, we realized that a large number of presets in the Standard Library had inconsistent capitalization. We also realized that it's so easy to make simple errors when entering Tag/Category text for new patches, that end-users would likely make the same kinds of mistakes all the time.

To address this problem without having to actually update hundreds of Unify patch files, we devised a simple system whereby Unify actually rewrites these patch-metadata items as it rebuilds the patch database. These rules live in a small text file called scrub.xml and are described below.

What must be emphasized is that Unify applies these rules when writing to the patch database; it does NOT change anything in the patch files themselves. This means that if you don't like the result, you can simply edit the scrub.xml file (to change or delete some of the rules) and rebuild the database.

Location and format of the scrub.xml file

The scrub.xml file lives in Unify's main Libraries folder, which itself is in your main Unify data folder. To locate it easily, go to Unify's Settings view and click the “Open…” button. This will open the main Unify data folder in the Finder (Mac) or Explorer (Windows). Locate the Libraries sub-folder and double-click to open it. You'll see more folders, one for each Unify library, and a few other files, one of which is scrub.xml.

scrub.xml is a “plain-text file” and MUST be opened using a true text-editor app such as Notepad on Windows (or any “programmer's editor” app such as Notepad++, Sublime Text, etc.). On a Mac, you can use TextEdit, but you MUST make sure you have it set to plain text mode. See this page in the manual for more about plain-text files.

scrub.xml is an XML file. Please DO NOT attempt to edit it unless/until you are familiar with the XML file format.

Structure of the scrub.xml file and rules

Here is the exact contents of the scrub.xml file distributed with Unify v1.3.2:

<?xml version="1.0" encoding="UTF-8"?>
  <Fixed word="Arp"/>
  <Fixed word="BPM"/>
  <Fixed word="DDL"/>
  <Fixed word="FM"/>
  <Fixed word="FX"/>
  <Fixed word="LFO"/>
  <Fixed word="MegaMagic"/>
  <Fixed word="RX2"/>
  <Fixed word="PD"/>
  <Fixed word="SuperMacho"/>
  <Rewrite word="Drums" as="Drum"/>
  <Rewrite word="Hihats" as="Hihat"/>
  <Rewrite word="Chords." as="Chord"/>
  <Rewrite word="Chords" as="Chord"/>
  <Rewrite word="Hits" as="Hit"/>
  <Field name="tags" fixed="1" rewrite="1"/>
  <Field name="category" fixed="1" rewrite="1"/>

The top-level XML tag is Rules, and inside it are a series of child tags representing individual rewrite rules, as follows:

  • <Fixed> specifies that a particular word is always to be rewritten with the specified capitalization.
  • <Rewrite> specifies that a particular word is always to be rewritten exactly as specified.
  • <Field> indicates that a named field in the “Presets” table is subject to the <Fixed> and/or <Rewrite> rules.
scrub.txt · Last modified: 2022/02/04 15:10 (external edit)