# A knob crossfading between samples assigned to it - possible in kontakt?



## TTU (Jun 10, 2017)

I don't want to lay out the samples across the keys, but assign them all to a single knob so I can crossfade between the samples. Is this possible? They would all have the same key. It would be sort of like scanning a wavetable, but not of individual sample/s, but of 2 seconds long (or more) wave files? Would love to hear if this is possible. If it is, if someone can build a prototype so I can experiment, I will be happy to paypal some funds. Cheers.


----------



## Maxime Luft (Jun 11, 2017)

Of course it is 
Basically, you'll have to assign those knobs to a certain MIDI CC via scripting and draw your curves after you clicked on it (Amplifier -> mod -> add modulator -> external sources). 
I think you may do everything in the same group but I would add a new one for each layer. You don't have to repeat that process over and over again, just clic on "Edit all groups" and it should be fine. 
There is only the curve that you'll have to set up individually! I may upload a basic .nki file later today but I'm already late for a grand piano sampling session...


----------



## ScoringFilm (Jun 11, 2017)

Big Bob wrote a script for this:

http://www.vi-control.net/community/threads/help-with-group-crossfade-and-vr_to_ep-function.30013/


----------



## TTU (Jun 11, 2017)

First of all, thank you guys so much for your help so far. I greatly appreciate it. This idea I have is something I've really wanted to do for quite some time. I went the Flow Stone route with an awesome developer who decided to help me and I was able to get about 70% of the way there but we couldn't get past crossfading between the samples -- there was clicking, steppiness, etc. Here is a video to show you what I mean and what the end result should sound close to.



There are 100 samples assigned the knob. Position 1 plays the first samples, mutes the rest. Position two plays the second samples, mutes the rest and so on. In effect the knob is triggering the samples so to speak, but in the process, a nice cross fade/interpolation needs to be implemented to smooth things out. I am hoping Kontakt will be able to do something like this.

I will read and read again what you guys have written as well as the whole forum thread that was alluded. I have no experience in kontakt scripting or any coding skills whatsoever but I will try my best to wrap my head around things. Thanks again guys


----------



## TTU (Jun 11, 2017)

After watching the video, is your guys original advice still be applicable?


----------



## TTU (Jun 13, 2017)

Wow. Ok, lol. I went over the thread, opened up Bob's script and template, skimmed the notes (couldn't understand, literally anything), and tried to make sense of the kontakt gui. I literally have no idea even where to begin...

Maxime Luft's advice seems a bit easier to grasp at this point, yet still is a foreign language.

_"Basically, you'll have to assign those knobs to a certain MIDI CC via scripting and draw your curves after you clicked on it (Amplifier -> mod -> add modulator -> external sources). "
_
I see three things I need to learn how to do:

1. Once I have all the samples in a folder, do I load them all inside kontakt, assign them to a knob instead of using the keymap, then assign MIDI CC via scripting. 
2. When I follow that drop down menu to assign MIDI CC to external source, is that the scripting part or do i need to open up the scripting editor at that point to get things to work.
3. I assume the curves would be the fade curves right, could use help setting that up as well (I am a complete newb)

_"I may upload a basic .nki file later today but I'm already late for a grand piano sampling session..."_

This would be an amazing help! I hope your sampling session went well, sounds quite fun actually. Cheers


----------



## Maxime Luft (Jun 14, 2017)

You may just send me your email address via PM so I'll send you that one file containing a few samples.

Here a quick step by step tutorial

create a new instrument and switch to edit mode

click on group editor 
duplicate your first group as much as needed via right click, each group will contain one sample 
rename your groups

click on mapping editor and then on "Selected groups only"
drag your samples into the map and deactivate the "Tracking" function if necessary
you may click on "mapping editor" to hide it

now go the script editor
click on Preset -> Utilities -> 6 MIDI controllers
click on "edit" and add " make_perfview " one line below "on init" 
you now may click on "script editor" to hide it
at this point you have 6 knobs with midi ccs going from 20 to 25

back to the "group editor":
click on "edit all groups" to deactivate that function, since you want to assign one specific MIDI CC for each group.
Make sure group no. 1 is currently selected
check that one screenshot I attached here in my first post out
the number after "midi cc" should, for the first group, be 20 (for the 2nd: 21, 3rd: 22 etc...) 
click on that logo between the "0" and "Invert"
Preset -> Factory -> Default

repeat that process for the other groups and change the "midi cc" number to their respective one


----------



## TTU (Jul 28, 2017)

Excellent information! Thank you so much for your reply and apologies for the late response. PM sent


----------

