Creating the Performance View and Setting the Height and Width

What is the Performance View?

In Kontakt Scripting, the “performance view” is the graphic user interface, or GUI/UI, that the performer will be interacting with. Typically it contains controls that adjust effects, the samples themselves, or basic parameters like volume or pan. If you look at any commercially available Kontakt instrument, you will be looking at their custom designed performance view, with all of the controls they felt you needed to make the most out of their sample library.

Before any controls can be added though, the performance view needs to be created using the on init callback (see this article). Once the view has been created, a height and width will also need to be created before you will be able to see any wallpapers you may have set or controls you have declared.

 

Creating the Performance View

In the example below, the performance view has been created, a colour set and a height and width added. Different versions of Kontakt have different maximum height and width values, so it is important to check these before creating your instrument. For Kontakt 6, the maximum height and width is 750px by 1000px. For Kontakt 5 and below, the maximums will be different, so ensure you check the KSP Reference Manual for details if you are working with these versions.

 
 
on init 

	make_perfview     {Creating the performance view/UI.}
	set_ui_height_px (750)     {Setting the UI Height in pixels.}
	set_ui_width_px (1000)     {Setting the UI Width in pixels.}
	set_ui_color(9000000h)     {Setting the UI colour using 9<hex_code>h.}

end on
 
Previous
Previous

How to Write Comments in Your Kontakt Script