# Help with Convolution Control



## gmet (Oct 14, 2007)

Hi all,

I edited one of Nickies scripts to control Convolution as an Insert Effect. It is doing all sorts of undesired wonderful things and I think it is probably to do with the Knob (min,max,ratio) and the values set in $set_knob_defval as I couldn't find these documented anywhere. The default values I would like to set are: Pre-Delay 6.7ms, Wet 0.0db, Early Size 70.6%, Late Size 76.1%. 

I have succesfully added a button to load the IR but I also read that the convolution effect itself could be loaded with KSP - is this possible?

Any help would be appreciated.

Justin

[Edit - Updated script at bottom of page]


----------



## kotori (Oct 14, 2007)

Justin M @ Sun Oct 14 said:


> Hi all,
> 
> I edited one of Nickies scripts to control Convolution as an Insert Effect. It is doing all sorts of undesired wonderful things and I think it is probably to do with the Knob (min,max,ratio) and the values set in $set_knob_defval as I couldn't find these documented anywhere. The default values I would like to set are: Pre-Delay 6.7ms, Wet 0.0db, Early Size 70.6%, Late Size 76.1%.



If you would like to find out which values on the 0-1000000 scale these correspond to you can add some debug messages to the 'on ui_control' callbacks. For example, in on ui_control($Early_Size) you can add this:
message('Early_Size=' & $Early_Size)
Then when you know what value you want to use you can pass it to set_knob_defval.



> I have succesfully added a button to load the IR but I also read that the convolution effect itself could be loaded with KSP - is this possible?


No, that's not possible AFAIK (unless there's something new in K3 that I haven't encountered yet).

Nils


----------



## gmet (Oct 14, 2007)

Thanks Nils,

I have now set the required defval values on the 0-1000000 scale but unfortunatley when I load the script all parameters reset to 0. Also when moving the value on the script knobs the convolution values move very slowly (about 5 seconds to respond) - any ideas?

Justin

[Edit - Updated script at bottom of page]


----------



## gmet (Oct 14, 2007)

As a matter of interest I have found when using Kontakt 3 the following command expects the IRs to be placed in:

C:\Documents and Settings\UserName\Local Settings\Application Data\Native Instruments\Kontakt 3

rather than the Kontakt 2 way:

C:\Program Files\Native Instruments\Kontakt 2

Justin



> *on ui_control* ($LoadIR)
> ``_load_ir_sample (_get_folder($GET_FOLDER_INSTALL_DIR) & "IR.wav",0,1)
> ``$LoadIR := 0
> *end on*


----------



## mmosc (Oct 14, 2007)

Justin M @ Sun Oct 14 said:


> Thanks Nils,
> 
> I have now set the required defval values on the 0-1000000 scale but unfortunatley when I load the script all parameters reset to 0.



Justin

You have to explicitly persist the parameters you want to hold their values using the make_persistent() function


----------



## Nickie Fønshauge (Oct 14, 2007)

Also, "set_knob_defval" doesn't initialise the knob. You have to do that explicitly (":="). The defval only comes into effect, when you CTRL+click the knob.


----------



## gmet (Oct 15, 2007)

Here is the script for anyone that is interested:

This is now hosted on http://scoringfilm.wordpress.com/ (my blog).


----------



## Yuroun (Sep 21, 2010)

Justin M @ Mon Oct 15 said:


> Here is the script for anyone that is interested:



Looks interesting. I played a bit with it, but I want to rework this script so that the user can select an Impulse from a list instead of the load button. Anyone idea's how accomplisch that? I'n new to Kontakt scripting.


----------



## gmet (Sep 21, 2010)

Yuroun,

This was three years ago!, however I think I implemented it in this script.

J


----------



## Yuroun (Sep 21, 2010)

Justin M @ Tue Sep 21 said:


> Yuroun,
> 
> This was three years ago!, however I think I implemented it in this script.
> 
> J



Thanks for the link. 

I started yesterday with scripting and I want to build a control panel for my instruments. In that panel I want a convolution reverb menu, so that's why I found this old script of yours :D 

I'm just trying things out en try to find my way in Kontakt script. I used to be a programmer (Cobol, Assembler, Pascal, ASP, Delphi), so it won't take alot of time to get used to this kind of language. But Kontakt scripting is alot different then building a database or generate reports. :wink:


----------

