Migration Guide

Converting Kontakt Instruments to Gorilla Engine

A complete guide to porting your existing sample-based instruments to VST/AU/AAX with Gorilla Engine.

Overview

Native Instrument's Kontakt is an industry-standard platform. Many developers want to import their existing instruments into Gorilla Engine to create standalone VST/AU/AAX plugins. This guide covers the conversion process.

Exporting Data

Option A: NI Creator Tools (Lua Script)

Use the provided Kontakt ToGE.lua script within NI Creator Tools.

  1. Load instrument in Kontakt.
  2. Run the Lua script in Creator Tools.
  3. Copy the output to a text file.
  4. Save the text document with the location and filename specified at the end of the copied text – this ensures the relative paths to the sample files are correct.
  5. Save as .inst and load in Gorilla Editor.

Important: Clear the text output before exporting another instrument.

Exportable Parameters

Group Zone Sample
  • Name
  • Volume
  • Tuning
  • Root Note
  • Key Range
  • Velocity Range
  • Start
  • Loop Start
  • Loop End
  • End

Option B: Chickensys Translator

Convert NKI files up to Kontakt version 4.0 format using Chickensys Translator, which Gorilla Editor can import directly. This method preserves more parameters like Pan and Keytracking.

Additional Exportable Parameters

Group Zone
  • Pan
  • Keytracking
  • Pan
  • Key Range Fades
  • Vel Range Fades

Scripts

Script text can be copied from Kontakt's Script Editor and pasted in Gorilla Editor's Script Module or saved in a text file which can be automatically reloaded by Gorilla Editor when it is updated.

While Gorilla Engine uses its own script language, many features and functions of Kontakt scripting are also understood, so it is possible to re-use major parts of an existing Kontakt instrument's script.

Note that some functions work differently between Kontakt and Gorilla Editor, so for example while there is no way to load individual convolution impulses using the instrument script, there is a way to switch between multiple impulses. Anything relating to the UI layout and colors of a Kontakt instrument will have no effect in Gorilla Editor because UI layout is handled separately.

Key Differences

  • Replace set_engine_par() with set_module_param() because module and parameter locations differ from Kontakt.
  • Replace get_engine_par() with get_module_param().
  • make_persistent() is not used. Properties are saved automatically.

About the Persistence function

The make_persistent function is not used in Gorilla Engine. When an instrument is loaded the script "on init" callback is executed, then any property values ("UI controls" in Kontakt) that were saved with the instrument are set.

Your instrument's state should be represented fully by its exposed properties. For example, don't have one property for selecting a group to edit and another property for adjusting that group's release time. This is because recalling the values of those two properties will not set the values in all the groups. It is however possible to save array data from scripts into "data file" modules in the instrument.

Not Currently Implemented

  • UI layout and appearance (handled via JS)
  • Floating point (real value) math
  • "on listener" callbacks at regular beat/time intervals (use "trigger_new_event" instead)
  • MIDI File writing and some reading functions
  • Getting keyboard colors/settings
  • Loading effects/filters via script (use "set_effect_order" instead)
  • Multi-script for controlling multiple instruments

Supported Parameters

  • Groups & Zones
  • Sample Maps
  • Root Keys
  • Velocity Ranges
  • Volume & Pan
  • Loop Points

Manual Re-creation

These elements cannot be automatically exported and must be rebuilt in Gorilla Editor:

  • Modulation Routing
  • Insert Effects
  • Send Effects
  • Filters
  • UI Layout (JavaScript)

Obsolete Kontakt Functions & Constants

The following script functions and constants (as of Kontakt 6.4) are Kontakt specific. They will have no effect in Gorilla Engine. The numbers in the brackets indicate the recommended equivalent in GorillaScript.

Everything related to UI appearance or interaction can be done using our JavaScript based UI layer. In Gorilla Engine files like e.g., IRs, MIDI files, arrays are build into the instrument itself using Gorilla Editor. If required it is possible to load files via JavaScript and insert their content into instruments. Communication with Creator Tools do not translate to Gorilla Engine and Kontakt multiscript is currently unsupported.

by_track()
change_listener_par() [6]
CONTROL_PAR_ALLOW_AUTOMATION [9]
CONTROL_PAR_AUTOMATION
CONTROL_PAR_NUM_ITEMS [10]
CONTROL_PAR_SELECTED_ITEM_IDX
dont_use_machine_mode()
EFFECT_TYPE_ [1]
ENGINE_PAR_* [2]
ENV_TYPE_ [1]
EVENT_PAR_CUSTOM
EVENT_PAR_ZONE_ID
FILTER_TYPE_* [1]
find_mod() [5]
find_target() [5]
get_control_par_arr()
get_engine_par_disp() [1]
get_engine_par() [1]
get_sample() [1]
get_loop_par() [1]
get_zone_par() [1]
get_key_triggerstate()
get_keyrange_*
get_menu_item_str()
get_menu_item_value()
get_menu_item_visibility()
get_ui_wf_property()
get_voice_limit() [1]
GROUPS_AFFECTED
GROUPS_SELECTED
INTMOD_TYPE_ [1]
is_zone_empty() [1]
LFO_TYPE_ [2]
make_instr_persistent()
make_persistent()
mf_copy_export_area() [4]
mf_get_buffer_size()
mf_get_event_par()
mf_get_id()
mf_get_mark()
mf_insert_event() [4]
mf_remove_event() [4]
mf_reset() [4]
mf_set_* [4]
MOD_TARGET_INVERT_SOURCE [2]
NI_CB_TYPE_PERSISTENCE_CHANGED
NI_SIGNAL_* [6]
NI_VL_TMPRO_HQ
NI_VL_TMPRO_STANDARD
NO_SYS_SCRIPT_
NUM_OUTPUT_CHANNELS
NUM_ZONES
on persistence_changed
on ui_update [8]
output_channel_name()
PLAYED_VOICES_INST
PLAYED_VOICES_TOTAL
read_persistent_var()
REF_GROUP_IDX
remove_keyrange()
RESET_CONDITION() [3]
reset_rls_trig_counter()
SET_CONDITION() [3]
set_engine_par() [2]
set_control_par_arr()
set_control_par_str_arr()
set_key_pressed()
set_key_pressed_support()
set_keyrange()
set_listener() [6]
set_menu_item_*
set_num_user_zones()
set_script_title() [2]
set_snapshot_type()
set_loop_par() [2]
set_voice_limit() [2]
set_zone_par() [2]
show_library_tab()
START_CRITERIA_* [2]
ui_mouse_area [8]
ui_panel [8]
UI_WAVEFORM_
UI_WF_PROP_
ui_wavetable
ui_xy [8]
VALUE_EDIT_MODE_NOTE_NAMES [7]
wait_async()
will_never_terminate()
zone_slice_idx_loop_end()
zone_slice_idx_loop_start()
zone_slice_loop_count()

[1] Use get_module_param() instead

[2] Use set_module_param()

[3] Set defines in instrument module

[4] Use on_midi_drag

[5] Use get_module_param(), find_module_param()

[6] Use on new_event

[7] Use prop_stepped

[8] Implement in the UI instead

[9] Set PROP_SET_BY

[10] Read PROP_MAX

“Native Instruments” and “KONTAKT” are trademarks of Native Instruments GmbH.
UJAM’s Gorilla Engine is neither affiliated with nor endorsed by Native Instruments.