# Convolution Samples and loading the factory wav files....



## Lindon (Nov 3, 2011)

OK so I'm thinking about adding the convolution effect to one of my instruments.

I'd like to be able to swap in and out the factory wav file (impulses) and of course KSP will let me load_IR_sample()

However the example in the manual seems to be problematic, it includes this in the file-name slot:

<<<K4IR.nkx>>/K4 Samples/Concert Hall A.wav

This then would seem to work for K4 but not for K5. Is this assumption correct?

and 

<<<K5IR.nkx>>/K5 Samples/Concert Hall A.wav would thus work for K5 but not for K4 users...hmm, bad for me as my instrument is supposed to work on K4.2 and above....and have no way in KSP of knowing what version of Kontakt the user has installed.

So, and despite it seeming like a mighty silly solution, I went looking for the wav files themselves, resolving to copy those I wanted into my resource folder and address them directly (despite these files already being on the users machine), and all the directories show up empty...clearly its all tied up in this .nkx file which is doing some sort of redirection...

so my questions:

1. does anyone know a version independent way to load impulses into an instrument using KSP?
2. If not does anyone know where ACTUALLY these factory wav files are being kept?

regards

Lindon


----------



## mk282 (Nov 4, 2011)

Forget about what you read in the manual.

Use the Resource folder! It has three subfolders: "ir_samples", "pictures", "scripts". Put all your IRs in the "ir_samples" folder.

Then, it's piss-easy to load it from the script:


```
load_ir_sample(<IR name>,<slot ID>,<insert/send ID>)
```

So, you don't need to use get_folder() at all, you don't have to know the path, just pack it all to NKR and you're done!


P.S.: You're not allowed to use NI's factory IRs in a commercial library anyways, so don't worry about how you'd use them. :D


----------



## Lindon (Nov 6, 2011)

Hmm, well that doesn't seem to answer my question.

Obviously if I use my own impulses I'll load them into the relevant directory structure in Resources, but that's not what I'm trying to do. In fact I'm trying NOT to use anything other than the factory impulses...on the subject of which...

I cant see why I cant use the NI impulses, I'm not including them in my library, I'm just pointing at the ones the end-user has already installed in their legit version of Kontakt.

Any one know how to address(load) these impulses?


----------



## mk282 (Nov 6, 2011)

If you're not using the factory samples in a commercial product, I gather you'd have to have individual K4 and K5 NKIs which have the script slightly changed to reflect the different folder path.

To find out the correct path to the IR that's packed in the K4IR.nkx or K5IR.nkx, it's sort of easy - just load the preset for the Convolution module, and then hover over the impulse name to see the full path. Then you'd use the syntax NI used in their factory scripts.

But you'd still have to have separate NKIs for K4 and K5, since there's no way to know which version of Kontakt is running from KSP...


----------



## polypx (Nov 7, 2011)

This page of the manual seems to imply you can get at the factory IRs, attached.
The bottom where it says "GET_FOLDER_FACTORY_DIR.

cheers, Dan.


----------

