Unify Manual

Your complete reference to PlugInGuru's creative playground!

User Tools

Site Tools


Key Zones

Unify v1.8 supports the concept of Key Zones, where specific note-ranges can be highlighted with colors on the Show MIDI view in the footer area of the Unify GUI, like this:

Individual zones have names, which appear when the mouse is hovered over the zone, as shown below:

Unify will display the zone-name text centered within the zone it possible, or shifted to ensure that the full name is visible, like this:

When a patch has key-zones defined, the ops menu for any INST or MIDI layer will include a “Key Zone” sub-menu, from which you can choose the name of any zone, to quickly set that layer's key-range to correspond to that zone.

Note: the remainder of this page describes an advanced topic. You must be comfortable with creating and editing plain-text files to be able to use this technique.

Defining key-zones using a text file

To define a group of key-zones, to which any patch in a library may optionally refer (see below), you must create a plain-text file (extension .txt) in the Key Zones folder for that library. (If no Key Zones folder exists, you will need to create it.) Here is an example, which you can download and use as a template for your own zone files:

Four Zones.txt
# This is a comment. Comments and blank lines are ignored.
    # extra space before, after, and between elements also ignored.
# Each non-blank, non-comment line defines one zone. Format is lokey hikey color name, where
    # lokey/hikey can be note numbers or names
    # color can be
        # 6 hex digits RRGGBB
        # or a standard color name like "pink"
        # 8 digits AARRGGBB (to specify per-color alpha)
        # optionally followed by blank space and a decimal alpha value e.g. 0.5
    # name is everything from 1st nonblank character after color, to end of line
# If you want to use note-names instead of numbers, include a line like this:
	Middle C is C3
    # (just has to contain the word "middle" and any digit)
# Default alpha is 0.5, but if you want something different, include e.g.
    Alpha 0.6
    D0  e1      hotpink 0.35    All the way left
    c3  a#3     #1100f0         Zone A
    C4  B4      aaFF0080        Middle Zone
    96  106     yellow          All the way right
# Optional: custom key-down colour instead of default green
    keyDown lightcoral
# Optional: custom mouse-over colour instead of default yellow
    mouseOver pink 0.5

Basically, the file is a sequence of lines, each of which defines one zone. Each zone is defined by its start and end note, its color, and its name.

  • The start note and end note can be specified either as MIDI note-numbers (range 0-127) or using note names like C#4 or Bb6. (See below for details.)
  • The color can be specified either as a 6-digit hexadecimal color (format rrggbb, with our without a leading “#”) or using a standard HTML color-name. (See e.g. https://www.w3schools.com/colors/colors_names.asp.)
    • 6-digit hex strings and standard color-names will have an implied alpha (transparency) of 0.5. You can change this default by adding a line like “Alpha 0.6” as shown.
    • To specify the alpha (transparency) for an individual color, either use a standard 8-digit hex string (format aarrggbb), or add a decimal fraction like “0.6” after the color (separated by a space).
  • The name runs from the first non-blank character after the color, to the end of the line.

MIDI note-numbers are unambiguous, but are not as human-friendly as note-names like C#4. Unfortunately, such note-names are inherently ambiguous, because there are multiple conventions for the octave-number part:

  • Apple/Logic Pro uses C3 to mean MIDI note #60 (middle C)
  • Roland uses C4 instead
  • FL Studio uses C5

Because of this, Unify allows you to put a line like “Middle C octave number is 3” into your zones text-file, to specify which convention you're using.

  • Any line which starts with the word “middle” (possibly preceded by blank space, case not significant) and at least one digit will be interpreted this way. Unify will use the first digit it finds on the line; it must be 3, 4 or 5.
  • If you don't include such a line, Unify will use the middle-C octave selected in the Settings view as the default, but you should always specify the octave-numbering convention if you intend to share your zones file with anyone else, because not everyone uses the same setting.

If your chosen zone colors are such that the default key-down highlight color (green) and/or the default mouse-over color (yellow) don't provide enough contrast, you can optionally specify these colors as shown above, with or without alpha. (Opaque colors are recommended for key-down, semi-transparent colors are best for mouse-over.)

Finally, you can include any number of blank lines and comment lines (starting with “#”), and use spaces and/or tabs however you wish, to make your file more legible. If you specify a custom “key-down” color, it will also be used for the sustain-pedal-down indicator bar in the Show MIDI view.

Selecting a key-zone file when saving a patch

The patch-save dialog in Unify v1.8 includes two new buttons as shown below.

  • If you're creating the very first patch in a new library, save the patch without selecting a zones or variations file first, to create the necessary library folder. You will then have to create the Key Zones sub-folder manually, in the Mac Finder or Windows Explorer, and put your zones file into it.
  • Click the “Key Zones” button to select the key-zones file you created from a pop-up menu:
    • The first item allows you to Clear the key-zone file selection (if you decide you don't want to use one)
    • After this, you will see a list of all .txt files in your library's Key Zones folder, from which you can select.
    • Below, you will see a list of .txt files in the Key Zones folder of the Unify Standard Library, which you may also select.
    • If you hold down Option/ALT when clicking the button, there will also be an Open… item near the top. This will pop pop up a standard file-open dialog, so you can navigate to any location to find the zones file you want. Note this will make your patch non-portable to other machines.

Note: If you have already created the Key Zones folder and zones file(s) within it, you can load a zones file without saving your patch if you wish. Click Save, choose the zones file as described above, and then click Cancel to close the patch-save dialog without actually saving.

key-zones.txt · Last modified: 2022/02/11 19:24 by shane