# EvilDragon introduces (pt. 5) - Trigger FX!



## EvilDragon (Jul 27, 2010)

Now you all know this from Heavyocity Evolve (and Evolve Mutations), this is an amazing feature and I am bringing it to you (for the most part, at least)!

There are some things you should know about this script, though:

* Group FX will work only on group 1.
* All triggering is done by bypassing the FX - some FX introduce some clicks when bypassed (for example AET filter, but I think it's a rare occurence that you'd want to trigger AET from keyboard).
* When you load the script, you MUST set up First and Last values to the first and last playable key of your instrument. This is to preserve the blue keys when redrawing the movable keyswitches. The caveat here is if you have non-contiguously arranged zones (that is, if you have empty keys between any two zones), they will all be redrawn as blue keys, so you wouldn't know which keys can and which cannot be pressed.
* Trigger FX keyswitches change color depending on which FX section you're triggering - cyan for Group FX, green for Insert FX, yellow for Send FX
* In case you change FX configuration, you need to click Apply in the Script Editor again to refresh the names of the buttons.
* C# and D# keys are your "kill" keyswitches, which bypass all the active FX in case you have sticky FX. Sticky FX is when you press some trigger FX keys, then switch to another FX section (for example, from GFX you select IFX), and old FX remain turned on - latched. To bypass all the currently active FX just use "kill" keyswitches.
* F# changes to Group FX, G# changes to Insert FX, A# changes to Send FX
* You are not able to bypass (or even see the button for) Send Levels effect - this is a prerequisite for Send FX to work.
** This script is Kontakt 4 ONLY!*

That being said, here's the script (paste into Nils' editor and compile, then paste to Kontakt):

http://pastebin.com/raw.php?i=4jZEUP3g

(script is 12000+ characters and over 700 lines long, hence pastebin link)


----------



## EvilDragon (Sep 1, 2010)

Slight bump - nobody likes this? :(


----------



## manyfingers (Sep 1, 2010)

hey hey! i'm sure i will..i'm new to k scripts to still in the process of learning so will let you know how i get on! cheers for sharing this!

chris


----------



## reddognoyz (Dec 6, 2010)

Hey Thanks for bringing this. Did you write it for Heavyocity originally? I just bought the Evolve Mutations 2 but haven't had a chance to try them out. 

I gotta tell you that the idea of even pasting in a script is really daunting to me. I did a lot of digging around in samplers around the time the Akai 3200 was the bomb. Since then I'm more of an end user. Do you think I'd be jumping in way over my head to try and implement this script??

I am f'ing amazed at what's happening with K4 though, it's so cool when you see scripting that yields a customizable simple intuitive user gui like trigger fx. Or, you know, space invaders. K4: it's a sampler! it's 1980's game console!


----------



## EvilDragon (Dec 6, 2010)

Nope I didn't write it for Heavyocity.  However the script was inspired by Evolve, for sure. 


Actually, lemme make it real simple for you: 

1. Download the attached .NKP file
2. Place it in the folder with the rest of script presets

PC: "Start"->"Run"->type "my documents"->Native Instruments->Kontakt 4->Presets->Scripts
Mac: do something similar, I don't know the correct location. 

3. Start Kontakt 4
4. Load up your instrument, throw in some effects and set them up to your liking, then bypass them all
5. Open Script Editor in Kontakt, select the first slot (but any other will do, too)
6. Click on the "Pre." button, then select "User->Trigger FX".

That's it!


----------



## dadek (Dec 6, 2010)

Thanks Evil!!!


----------



## wolf (Jul 24, 2013)

Dear EvilDragon,

I love the idea of this script and it's working in Kontakt 5 as far as I can tell. Thanks for creating it. However, I get a click when activating/deactivating almost every plugin. Is it possible to have the FX ramp up/down very quickly to avoid that click?

Also, could you update the script to include the new K5 plugins (or tell a scripting noob like me how to do it)?


----------



## mk282 (Jul 28, 2013)

Clicks cannot be dealt with ramping, as it's just a bypass toggle (on/off), not a continuous value. NI has messed up a bit when coding effects so they produce clicks when bypassed. Nothing can be done about it AFAIK.

From the looks of the script, to change it to be K5 compatible, you need to do two changes: change the assignments of !FX and !Filter arrays, to this:


```
declare !FX[32]
	!FX[ 0] := "- no FX -"
	!FX[ 2] := "Compressor"
	!FX[ 3] := "Limiter"
	!FX[ 4] := "Inverter"
	!FX[ 5] := "Surround"
	!FX[ 6] := "Saturation"
	!FX[ 7] := "Filter"
	!FX[ 8] := "Lo-Fi"
	!FX[ 9] := "Stereo"
	!FX[10] := "Distortion"
	!FX[11] := "Send Levels"
	!FX[14] := "Phaser"
	!FX[15] := "Flanger"
	!FX[16] := "Chorus"
	!FX[17] := "Reverb"
	!FX[18] := "Delay"
	!FX[19] := "Convolution"
	!FX[20] := "Gainer"
	!FX[21] := "Skreamer"
	!FX[22] := "Rotator"
	!FX[23] := "Twang"
	!FX[24] := "Cabinet"
	!FX[25] := "AET Filter"
	!FX[26] := "Tape Sat"
	!FX[27] := "Trans Master"
	!FX[28] := "Solid G-EQ"
	!FX[29] := "Solid Comp"
	!FX[30] := "FB Comp"
	!FX[31] := "Jump"

	declare !Filter[109]
	!Filter[  2] := "Legacy LP1"
	!Filter[  3] := "Legacy HP1"
	!Filter[  4] := "Legacy BP2"
	!Filter[  6] := "Legacy LP2"
	!Filter[  7] := "Legacy HP2"
	!Filter[  8] := "Legacy LP4"
	!Filter[  9] := "Legacy HP4"
	!Filter[ 10] := "Legacy BP4"
	!Filter[ 11] := "Legacy BR4"
	!Filter[ 12] := "Legacy LP6"
	!Filter[ 13] := "Phaser Filter"
	!Filter[ 14] := "Vowel A"
	!Filter[ 15] := "Vowel B"
	!Filter[ 16] := "Pro 53"
	!Filter[ 17] := "Legacy Laddr"
	!Filter[ 19] := "3x2 Versatile"
	!Filter[ 22] := "1-band EQ"
	!Filter[ 23] := "2-band EQ"
	!Filter[ 24] := "3-band EQ"
	!Filter[ 30] := "Ladder LP1"
	!Filter[ 31] := "Ladder LP2"
	!Filter[ 32] := "Ladder LP3"
	!Filter[ 33] := "Ladder LP4"
	!Filter[ 34] := "Ladder HP1"
	!Filter[ 35] := "Ladder HP2"
	!Filter[ 36] := "Ladder HP3"
	!Filter[ 37] := "Ladder HP4"
	!Filter[ 38] := "Ladder BP2"
	!Filter[ 39] := "Ladder BP4"
	!Filter[ 40] := "Ladder Peak"
	!Filter[ 41] := "Ladder Notch"
	!Filter[ 50] := "SV LP1"
	!Filter[ 51] := "SV HP1"
	!Filter[ 52] := "SV LP2"
	!Filter[ 53] := "SV BP2"
	!Filter[ 54] := "SV HP2"
	!Filter[ 55] := "SV LP4"
	!Filter[ 56] := "SV BP4"
	!Filter[ 57] := "SV HP4"
	!Filter[ 58] := "SV Notch 4"
	!Filter[ 63] := "SV Par LP/HP"
	!Filter[ 64] := "SV Par BP/BP"
	!Filter[ 65] := "SV Ser LP/HP"
	!Filter[ 70] := "Daft LP"
	!Filter[ 71] := "Daft HP"
	!Filter[ 90] := "Formant I"
	!Filter[ 91] := "Formant II"
	!Filter[100] := "AR LP2"
	!Filter[101] := "AR BP2"
	!Filter[102] := "AR HP2"
	!Filter[103] := "AR LP4"
	!Filter[104] := "AR BP4"
	!Filter[105] := "AR HP4"
	!Filter[106] := "AR LP2/4"
	!Filter[107] := "AR BP2/4"
	!Filter[108] := "AR HP2/4"
```


----------



## chimuelo (Jul 28, 2013)

Hey thanks. I might start trying to use NI FX now. Don't need them, but it's a PITA bypassing them.


----------



## wolf (Jul 28, 2013)

thanks for that update! I'll try it out. 

Bummer about the NI FX implementation causing clicks. So I take it how for example Heaviocity implements them requires more elaborate scripting.


----------



## chimuelo (Jul 28, 2013)

I afraid all this has done is confirmed my reason for avoiding Native FX.
Having dedicated audio chips like UAD and Scope makes glitchy static Native stuff strictly for non realtime use.


----------



## mk282 (Jul 29, 2013)

chimuelo, that is not correct. It is perfectly possible to do non-glitchy effect bypassing natively. It's just that NI didn't do it for ALL effects in Kontakt (for some, there are no clicks whatsoever). Dedicated hardware like UAD and Scope have absolutely NOTHING to do with this issue - it's all just code, doesn't matter which hardware runs it!


There is a workaround being employed (which you can witness in George Duke Soul Treasures library, Heavyocity did NOT use this in workaround anywhere AFAIK), where in the last Insert FX slot you have a limiter set up, which is shortly enabled before and after the trigger FX bypassing-unbypassing. This would need a much more elaborate change of this generalized TFX script, though.


----------



## hellish_victor (May 22, 2017)

Good job EvilDragon. A version of Trigger FX with the keyswitches on toggle mode will be awesome (or even better, to have the option to enable or disable this).


----------



## EvilDragon (May 22, 2017)

That is left as an excercise for the user  It's pretty simple, though.


----------

