Week 5: OOey-GUI!
This week I began to put the finishing touches on the instruments- more knobs and some custom graphics!
I realized after some research that the way in which I was implementing the custom knobs last week was somewhat antiquated. That being said, I learned so much about the building blocks of the scripting language in Kontakt and by implementing them in that manner. In Kontakt 6.0 and on, Native Instruments introduced an ancillary program simply called Kontakt Creator Tools. This program allows a developer to quickly create buttons, knobs, switches, etc, and assign those the variable names within the script of the instrument. This saves a lot of time on the front end of scripting as variables no longer need to be declared on the initialization of the instrument. Additionally, the X/Y positioning of the controllers can be manipulated through a simple dialog box rather than through the use of control parameters lines in the script. With the use of this tool, I removed the variable controls from the script, and re-implemented them through Creator Tools.
Unfortunately, these tools can only be used to affect the visual aspects of these controllers. The functionality must be assigned through the scripting methods I previously used. In addition to re-creating the mallet switch and reverb knob, I wanted to add a function to the Musser instrument that is characteristic of a vibraphone. I wanted to add a digital “motor.” On most vibraphones there is an electric motor that spins fans within the resonators below the bars. This serves to create a tremolo effect - The faster than fans spin the faster the tremolo is. To create a functional motor I created another custom knob that controlled the frequency setting on an LFO affecting the volume of the instrument. This was much more complex than creating a knob to control the reverb send.
Firstly, modulators such as envelopes and LFO’s are assigned on a group level, not an instrument level. This means to keep the tremolo constant among all round robins and dynamic levels, the single knob would have to control the LFO for all twelve groups. Secondly, the syntax used to assign a control to a a modulator parameter is more complex than other engine parameters. Because modulators are assigned to groups, they have additional layers of identification that must be found to control them. Unlike the reverb send which is identified by the labels -1 and 7 (-1 referring to an instrument level control, 7 referring to the bus it is on) Modulators are referenced through a written name, a group index, and an ID index. The ID index must be retrieved by referring to the written name. I ran into an issue when the reference of (1,MOTORFREQ) was not working. As it turns out, for a reason I do not yet understand, Group IDs in the script editor must be set to their displayed number minus 1. Group 1 is actually group 0 in the script editor. Once I realized this the knob worked as intended and I had built a functional motor onto the vibes.
The next big task was to truly customize the GUI (graphical user interface) with custom visuals. Though I am no graphic designer, I did my best to create at least a decent template of what the instrument could eventually look like. I used the free Japanese program “Knob Man” to create the purple knob you see on the left. The background was made with my limited photoshop skills, and I added a Musser logo to the top left instrument badge.
Here’s a clip of both the marimba and vibes playing a chorus of “Giant Steps” with some of the new features!
Thanks for reading and listening! Until next time!
Eli Shapiro