# DEF ideas for Kontakt



## KingIdiot (Jul 24, 2008)

KingIdiot @ Thu Jul 24 said:


> ok heres one idea, the one I think will be easiest to impliment and probably the most effective
> 
> Using impulses:
> 
> ...





Thonex @ Thu Jul 24 said:


> KingIdiot @ Thu Jul 24 said:
> 
> 
> > .
> ...




To be honest, I'm not exactly sure, but I think it AND the PRF are based on very fine filtering concepts. With modulation/shifting being used extensively.

I know DEF has settings based on specific giga instruments. My original guess was it was based on GigaPulses convolution, but Im thinking its actually based on its own dynamic filter.

Imagine using the Kontakt EQs to take one dynamic of a sampled horn (say forte) and make it sound like another dynamic (piano), You'd use the EQ to "shape" the sound from the forte sample, but use a Piano sample as your blueprint. You can then assign one controller to modulate BACK to a zero setting i the EQ giving you a dynamic filter (this is what GPO does). However multiply that process with a filter with man more bands, and possibly some other stuff going on, and you get DEF. This filter allows you to retain more "air" than a general EQ, therefore preserving the room sound much more. Theres more than likely ALOT more to it, since the guys at Giga are pretty smart.


----------



## Thonex (Jul 24, 2008)

KingIdiot @ Thu Jul 24 said:


> Imagine using the Kontakt EQs to take one dynamic of a sampled horn (say forte) and make it sound like another dynamic (piano), You'd use the EQ to "shape" the sound from the forte sample, but use a Piano sample as your blueprint. You can then assign one controller to modulate BACK to a zero setting i the EQ giving you a dynamic filter (this is what GPO does). However multiply that process with a filter with man more bands, and possibly some other stuff going on, and you get DEF. This filter allows you to retain more "air" than a general EQ, therefore preserving the room sound much more. Theres more than likely ALOT more to it, since the guys at Giga are pretty smart.


Thanks KI

hmmmm... ok ... I think I see what you are saying. 

I'll have to brain storm about this for a while. Initial ideas that come to mind are using something like Q clone or Har Bal to match EQs of different dynamics of different instruments at (say) low, med low, med hi and hi registers as well as dynamics and write a script that would "ride" the EQ values accordingly based on pitch and CC or velocity. 

I'm not crazy about using multiple IRs (if it can be avoided) because of CPU and latency.

I guess the best thing is if someone could post an mp3 of an instrument playing something with and without the DEF so we can hear exactly what it's doing.

ok... off to bed... to be continued.

Cheers, 

T


----------



## Moonchilde (Jul 24, 2008)

I've been experimenting a lot with the modulatoin capabilies for FX in the group level. Seems you can do a lot, and you can get some pretty decent groundwork done using just the regular EQ filters. However, this isn't optimal, at least compared to DEF.

What would be great is if you could set up a convo modeled off a piano sample into the group FX and use a modulator to control it. Modulator at 0 maxes the wet, at 127 the dry. But you can't. What you can do is set it up on instrument only. I think you may be able to script a modulator to the Instrument FX to achieve this, but I don't really know much about scripting.


----------



## Thonex (Jul 24, 2008)

Moonchilde @ Thu Jul 24 said:


> What would be great is if you could set up a convo modeled off a piano sample into the group FX and use a modulator to control it. Modulator at 0 maxes the wet, at 127 the dry. But you can't.



I think you may be able to... I'll have to look tomorrow... too sleepy now.. but I think you can. I'll get back to you.

Cheers,

T


----------



## KingIdiot (Jul 24, 2008)

I dont think Qclone would work, Its only going to grab EQ settings, but not model the settings after a specific samplesets frequency response

HAr-bal is something I'd avoid. Its got too many added "coloring" options, and only generalizes the frequency response (tho then again that might be better)

Curve EQ, or something similar would be a better options, however I'm not sure how many bands that plug splits the response into.

The most controlable might be something like a GOOD vocoder in some sort of sidechain mode, but Im just thinking out my ass now, its 140, and I'm being goofy, so I'm not even sure if that'd work.

Also, I think using multiple convo FX wont be too bad if you use jsut a filter response as your impulse. It shouldnt be too resource heavy.

Moonchilde, I believe the concept at its most basic form will work at the Instrument level.


----------



## Moonchilde (Jul 24, 2008)

We actually don't even need scripting to do this. Its easy. Put a convo on to the Sends FX. Then on the Group FX, add a sends. Then add a modulator to the sends and make it CC 1. You can now control convolution with a MIDI CC. Or, for a percussive/non-looped instrument, we only need to add Ext. Source Velocity. Seems simple enough.

My only question is, how do we take the "EQ" model of a piano sample vs a forte sample and convolve it? I have no knowledge of creating convolutions.


----------



## KingIdiot (Jul 24, 2008)

the more I think about it, the more I realize you'll need two impulses. One with a frequency "stamp" and one with an inverted stamp, to cancel the response out.

This is the only way to dynamically apply the filter. Using only one "stamp" and xfading to dry doesnt really give you a smooth dynamic modulation.

it can still be done without scripting of course, but it would jsut be so much ooler if it was a scipt with "presets" that could be added. I know that scripting can load impulses, atleast I'd read about it.


----------



## Moonchilde (Jul 24, 2008)

Actually, you don't. I just tested it out on a regular convolution. At position 127 on the Modwheel, with a reverse ramp curve, it is 100% "dry", and at 0 100% "wet". So, I don't think we need a dry and wet impulse wav. The only problem I get with the Sends FX being modulated, is that it has an annoying "release" being triggered and I have no idea how to get rid of that. It seems to work fine otherwise, and modulates rather nicely between wet and dry.


----------



## Mark Belbin (Jul 24, 2008)

Guys, Thanks for this discussion. Here's my 2c so far.

Convo won't work. Reason? The formant shifts they will impart will be applied instrument wide, and the DEF is calibrated on a note-by-note-basis. A single note's spectral content is so complex that a single IR (or four, for that matter) cannot possibly contain enough non-conflicting filtering properties to accurately and believably impart dynamic filtering on the entire range of even the most narrow-ranged instruments. You'd get the overrall effect of traditional applications of filtering. Unless, of course, you send each zone of a Kontakt instrument to its own IR, designed specifically for its formant properties. I think we'd all agree that this would be way too resource intensive. Convo does have it's uses, but I have too much to say about the other stuff for now...

Using 3-5 bands of EQ with careful automation of center freq, gain, and Q is all it should take. That and some careful spectral analysis of what the DEF does. I'm not very in depth with K2 yet, but I'm assuming some scripting would be needed to restrict the ranges of these bands' parameters on a zone-specific basis.

What the DEF does is applies the same EQ to each note of an instrument discretely, so that an under-the-hood (in GS3, anyway. In GS4 it's incorporated into the GUI) script, written by the user or developer can govern where the extremes of ranges are for the EQ's parameters, and which extremes (plus a midway point) correspond to which MIDI values. Each parameter of each band has these ranges specified for each note, and the whole range of incoming CC values instrument wide is assigned a controller (or velocity), and wham, you've got instrument wide dynamics. The settings are found by comparing the sound of a desired velocity layer to the one that will be used together with the filter to emulate it. Careful recording and meticulous a/b'ing are needed. But enough about how Giga does it. 

So you probably need a fairly simple EQ on all groups which is automated to a single controller or velocity, and a script to dictate the min/max values of each parameter of each band for each zone. I will get to work soon on a more detailed analysis of what the DEF does spectrally, in order to find out how many bands are needed and how far their parameters must be able to go in either direction.

Meantime, if anyone knows how to script the above zone-specific controller data governance (let's call it the CDG script, in Lieu of continuing with DEF, unless anyone's got a better one  ), please give it a try. I'll report back with my findings.

Mark

p.s. Part of what made the DEF special is it's pristine quality. I believe that was the reason they only made it possible on 24-bit samples, and I could actually hear a _tiny_ bit of audio degradation as the DEF was applied, compared to the unprocessed samples, but 9 out of 10 dermatologists would still recommend it. I've heard negative things about K2/3's filtering compared to Giga's, but I don't know first hand. Whatever the case, if the outcome of all this is s#$tty sound, it's not gonna work. Anyone who plays with filtering in _any_ sampler should be very judicious as to the quality of the outcome. All I'm saying is, if you're gonna run with the filtering idea, be careful not to make too much performance/sound quality tradeoff!!


----------



## sevaels (Jul 24, 2008)

Great topic guys,

I've recently heard the DEF applied and was really impressed with the results. I've seen the scripting involved on a code level and it seems to be defining EQ parameters based on note and velocity values.

If thats true it's not unlike your average morphing filter. They became pretty popular among E-mu fans. E-mu called them Z-plane filters but in reality it was a simple EQ that behaved in many ways like *gasp* Vokators morph function (what a cool piece of software that was...).

Anyways, I think this boils down to tedious instrument specific work. A lot like SIPS I don't think a one size fits all mentality will work. Easy tweakability might be the answer.

Nils posted a great new script of his: http://www.vi-control.net/forum/viewtop ... ght=zplane







This basically IS the morphing idea. If you were to define morphs for individual instruments as presets (again in the same way you tweak and tweak with SIPS) you should see similar results.

A long shot from me but maybe it can help.

Sev


----------



## Thonex (Jul 24, 2008)

Thonex @ Thu Jul 24 said:


> Moonchilde @ Thu Jul 24 said:
> 
> 
> > What would be great is if you could set up a convo modeled off a piano sample into the group FX and use a modulator to control it. Modulator at 0 maxes the wet, at 127 the dry. But you can't.
> ...



ok... I checked and you can.

You can definitely have group level aux sends that respond to CCs, ADHSRs, velocities etc. or anything.

You need to put the *Sends* plugin into the *Group Insert FX *slot and then put a *Gainer* plugin in the *Instrument Send Fx* slot. When you do, a "Gainer" knob will appear in the *Group Insert fx* area if you double click on the *Sends* plug.

Here is a pic with the important stuff circled in red. If you copy exactly this... then you will be able to variably control how much of group 1's signal gets sent to Aux 1 with a Mod Wheel (CC1). Make sure the *Return* of the *Gainer* plug (circled in red) is set to *A1* (Aux 1)

http://www.andrewkmusic.com/filearea/Mi ... 0sends.JPG

Not that this will help us with a DEF emulation, but it might... especially if we want to have the Aux sends based at the Group level.

Hope this helps.

Cheers,

T


----------



## KingIdiot (Jul 24, 2008)

Mark, I wasa ctually gonna post about this last night, as I was thiking about it heading off to bed.... but realyl didnt want to get up and geek out more.

I had started to think about it more and realized that the DEF was definitel on a note y note basis. I think there must be an analasys taken for every note and every sample, and then, the info acquired is used to create the "morph" using some intense high quality filtering and possibly more.

so A simple all over filter wont sound nearly asgood as DEF. What would be required is an instument that would have to be edited on the group level making each zone its own group, with a specific EQ for each group... quite a big crazy bit of work


----------



## Thonex (Jul 24, 2008)

Mark Belbin @ Thu Jul 24 said:


> p.s. Part of what made the DEF special is it's pristine quality. I believe that was the reason they only made it possible on 24-bit samples, and I could actually hear a _tiny_ bit of audio degradation as the DEF was applied, compared to the unprocessed samples, but 9 out of 10 dermatologists would still recommend it. I've heard negative things about K2/3's filtering compared to Giga's, but I don't know first hand. Whatever the case, if the outcome of all this is s#$tty sound, it's not gonna work. Anyone who plays with filtering in _any_ sampler should be very judicious as to the quality of the outcome. All I'm saying is, if you're gonna run with the filtering idea, be careful not to make too much performance/sound quality tradeoff!!



Mark,

Do you think you can post an mp3 of a sound that really features the DEF filter and post the same sound (same phrase) without the DEF filter so we can get a clear sonic idea of what is going on?

That would really be helpful. 

.wav would even be better :wink: 

Thanks,

T


----------



## Moonchilde (Jul 24, 2008)

Thonex @ July 24th 2008 said:


> Thonex @ Thu Jul 24 said:
> 
> 
> > Moonchilde @ Thu Jul 24 said:
> ...



Yeah, I figured that out last night. Check the post right before Mark's. My only problem now is a release tail that doesn't seem to go away, and I'm using non-reverb presets like a guitar cab, just for testing purposes.

Mark, yep, I know that a one size fits all convo is no way a sub for DEF, only because of how indepth DEF really is. I do think it would be better than nothing.


----------



## Mark Belbin (Jul 25, 2008)

Sure, Thonex, I'll post some examples shortly. 

In the meantime, for anyone interested in the subject, I'd like to remind you of a tutorial and some giga3 materials on my website. There is a pretty detailed explanation of the process of creating DEF instruments, as well as some instrument files for use in learning.

http://www.wavelore.com/DEF_Tutorial.shtml

I will be attempting to convert the instrument (slide whistle) to K2 shortly. Hopefully it will make a good test instrument for replicating the process in Kontakt. Anyone else who wants to do so before I do is encouraged. I will gladly host any materials that anyone comes up with.

More to come...

Mark

p.s. Might there be a way to use a single multiband eq and script a way to make it's parameters behave differently for each note? That way, the filter calibration process would be one of entering the dsired values for each note in the script. This would be similar to the way it's done in GS3.


----------



## Thonex (Jul 25, 2008)

Mark Belbin @ Fri Jul 25 said:


> p.s. Might there be a way to use a single multiband eq and script a way to make it's parameters behave differently for each note? That way, the filter calibration process would be one of entering the dsired values for each note in the script. This would be similar to the way it's done in GS3.



yes. absolutely.... except the the max multi band eq in K2/3 is 3. However... you can have up to 8 multi band quasi parametric eq's active.


There are various ways to do it. It could be done based on the simple value of the midi note, or based on a values derived from a table based on a midi note... or simply using a modulator (no script needed for this) and using the intensity slider referencing the note range.

I may be naive, but I'm betting we can get pretty darn close to what a DEF filter is doing. 


Thanks for posting your link.... although I don't use Giga anymore (haven't for years) I'll read you explanations so I'm not totally clueless.

Cheers,

T

P.S. I'm finishing up a movie right now... so I won't be able to focus on it for a week or so (only as a nice distraction during breaks :wink: ) but I'm interested as to achieving this for Kontakt.


----------



## Dynamitec (Jul 25, 2008)

Hi T,
sure, ok, i understand what you want to do: you want to use the velocity modulators for modulating let's say gain or frequency of an EQ? This works of course... i thought about modulating the filters with KSP and rebuilding a completly DEF like filter setup in KSP (i mean: i wanted to setup a EQ shape for high velocity and one for low velocity and morph them via KSP). Unfortunately that isn't easily possible. But of course it works if you use the internal Kontakt modulators only. But you are a little bit limited with them (it's not as easy to setup and you can just copy and paste your filter like you could do with a script).

Anyway, maybe i should do some more things directly in Kontakt  I'm so used to "bypass Kontakt" and manage everything that is possible directly via KSP...

Benjamin


----------



## Thonex (Jul 25, 2008)

Dynamitec @ Fri Jul 25 said:


> Hi T,
> sure, ok, i understand what you want to do: you want to use the velocity modulators for modulating let's say gain or frequenzy of a EQ? This works of course... i thought about modulating the filters with KSP and rebuilding a DEF like filter setup in KSP. Unfortunately that isn't possible. But of course it works if you use the internal Kontakt modulators!
> 
> Maybe i should do some more things directly in Kontakt  I'm so used to pass by Kontakt and manage everything that is possible directly via KSP...
> ...



:D 

Taking this 1 step further, I'm guessing that if you control the modulation source parameter's via a script, that in essence the script could dictate the behavior of a EQ on a per not basis.

Anyways... something worth experimenting with.


----------



## Dynamitec (Jul 25, 2008)

Definitly!


----------



## Thonex (Jul 25, 2008)

Dynamitec @ Fri Jul 25 said:


> Definitly!



GREAT!!!!! :D 

Post your script for all of us in 1 hour :lol: :lol: :lol: 

:mrgreen:


----------



## Mark Belbin (Jul 25, 2008)

haha. Yeah Benjamin. We're waiting....

(kidding)

-M


----------



## Dynamitec (Jul 25, 2008)

Hehe, one hour isn't much...  I'll play with this idea at moment

But anyway: i found another problem, you won't be able to use for example expression to change the filter on note basis which would be great for winds for example.


----------



## Thonex (Jul 25, 2008)

Dynamitec @ Fri Jul 25 said:


> But anyway: i found another problem, you won't be able to use for example expression to change the filter on note basis which would be great for winds for example.



Maybe not, but DEF emulation can be a static midi note related EQ curve and then you can always add another EQ or filter modulated by CC to give expression. It may give a realistic illusion. That's the fun part about all this... we have to find creative ways to emulate what happens in nature.


----------



## Dynamitec (Jul 25, 2008)

Good news! It's possible to calculate the amount the external modulator change the EQ...at least i found the correct values for the volume parameter.
That means you'll be able to setup the filter via KSP


----------



## Thonex (Jul 25, 2008)

Dynamitec @ Fri Jul 25 said:


> Good news! It's possible to calculate the amount the external modulator change the EQ...at least i found the correct values for the volume parameter.
> That means you'll be able to setup the filter via KSP



That took you 2 minutes to figure out!!!:shock: :shock: 

You're amazing.... now get back to wok... you only have 58 minutes left to finish K2/3 DEF filter :lol: :lol: 


Seriously though... this is good news.. I knew it could be done using modulators and KSP, but I thought that maybe the NI values would be a pain and we'd have to resort to a table or something tedious.

Thanks Dyn!!


----------



## Dynamitec (Jul 25, 2008)

The volume behavior is easy...it's linear. The oc behaviour isn't that easy but there not that many values... i'm working on the frequency knob right now and you now how much pain THAT is!


----------



## Thonex (Jul 25, 2008)

Dynamitec @ Fri Jul 25 said:


> The volume behavior is easy...it's linear. The oc behaviour isn't that easy but there not that many values... i'm working on the frequency knob right now and you now how much pain THAT is!


*"i'm working on the frequency knob right now and you now how much pain THAT is"*

Yes... :roll: ... and that is what I hate about KSP.. I wish they would just publish a Source to target value table for all parameters... Better yet... they could publish it in Excel :D 

However, For the Freq, there is a trick (I forget what it is) I think you need to put the slider at 100% and if you assign the modulator source as Key Position then the filter Freq is the exact freq of the midi note.

Something to look into.

T


----------



## Dynamitec (Jul 25, 2008)

> However, For the Freq, there is a trick (I forget what it is) I think you need to put the slider at 100% and if you assign the modulator a Rang then the filter Freq is the exact freq of the midi note.



Are you sure? It doesn't seem to work here...


----------



## Thonex (Jul 25, 2008)

Dynamitec @ Fri Jul 25 said:


> > However, For the Freq, there is a trick (I forget what it is) I think you need to put the slider at 100% and if you assign the modulator a Rang then the filter Freq is the exact freq of the midi note.
> 
> 
> 
> Are you sure? It doesn't seem to work here...



I updated my previous post to say Key Position as opposed to range.

It's been a long time, but yes... I'm fairly sure. Maybe not exactly like I said, but something like that.

I'm working on a film now... so I can't experiment... but I will when I get a moment.

Cheers,

T


----------



## Dynamitec (Jul 25, 2008)

Ok, what i found out so far:

you'll need three velocity modulators attached to a EQ gain for example:
- You'll need 300% to go from 0 to 36db (velocity 0 to 127)
- You'll need 200% to go from 0 to 18db (velocity 0 to 127)
- You'll need 100% to go from 0 to 9db (velocity 0 to 127)

So this linear and straight forward. 

You'll need two velocity modulators attached to a EQ bandwith:
Because: you'll need 200% to move the oc knob from 0.33oc to 3oc (velocity 0 to 127).

You'll need two velocity modulators attached to a EQ frequenzy:
Because: you'll need 200% to move the hz knob from
20 to 20khz (velocity 0 to 127).

Unfortunately the last two can be calculated (used within KSP) without a table. I once did a lot of calculations but i have to search the tables to see if i find a correlation.

Cheers,
Benjamin


----------



## synthetic (Jul 25, 2008)

FYI, my iMIDI / DEF tool tutorial and the GS4 editor manual are still on the TASCAM website:

http://www.tascam.com/products/gigastudio_4;9,7,1055,19.html (http://www.tascam.com/products/gigastud ... 55,19.html)



> The Dynamic Expression Filter (DEF) provides a phase corrected, 7th order, morphing filter for adding expressiveness before and after sustaining note-on events. This filter can accurately and continuously morph frequency responses of velocity dynamics even after note-on events have occurred. The filter is driven by either a standard midi continuous controller such as the Mod Wheel, note velocity, a filter
> envelope, or a combination of all three. The morphing response coefficients can be unique for each note region and sub-region, making it possible to create extremely detailed filter profiles. In other words, the DEF can make a sample sound as if it were played at different intensities, allowing for real-time crescendos and diminuendos of a sustaining note.





> Giga’s morphing filters are composed of four independent parameters that affect the overall shape and volume of the filter: cutoff frequency, Q, Q0H, and V0. Each parameter has a range of 0 to 127. The first three parameters affect the timbre of the filter (frequency and Q) while the fourth parameter (V0) is used for volume compensation.
> 
> Cutoff Frequency (Fc)– Determines the initial center frequency for the Q0 Quality factor.
> 
> ...


----------



## Thonex (Jul 25, 2008)

Dynamitec @ Fri Jul 25 said:


> > However, For the Freq, there is a trick (I forget what it is) I think you need to put the slider at 100% and if you assign the modulator a Rang then the filter Freq is the exact freq of the midi note.
> 
> 
> 
> Are you sure? It doesn't seem to work here...



It may have been regarding Sampler Filters and not EQs.... but I believe if you draw a diagonal line in the table (starting at 0, not -127) all the way up to 127 and set the slider to 100% you can get what we need with a sampler filter. 

Again... this was ages ago... someone wrote a thread about it in either NI's forum or here.

Cheers,

T


----------



## Thonex (Jul 25, 2008)

synthetic @ Fri Jul 25 said:


> FYI, my iMIDI / DEF tool tutorial and the GS4 editor manual are still on the TASCAM website:
> 
> http://www.tascam.com/products/gigastudio_4;9,7,1055,19.html (http://www.tascam.com/products/gigastud ... 55,19.html)
> 
> ...



Hi Synth,

I think this is really helpful. I think this will ultimately be possible on Kontakt... we just need to write a script probably in conjunction with a filter/eq preset.


----------



## Dynamitec (Jul 28, 2008)

Hi everybody,

what i found out so far: it's easier to setup your filter in Kontakt directly. It's hard to write a script for this task since you need to setup a lot of things first (add a lot of modulators etc. (more than 20 modulators for one 3 Band EQ) which is very awkward unfortunately).

Btw. you can use the "constant" modulators too! That means you COULD really use them similar to set_engine par via KSP on per voice base. The problem is: the modulator Id depends on the creation order. So it's hard to write a common script for this task. Kontakt 3 has find_mod and find_target which would make this possible more easily but - as i said: Kontakt 3 only. After all: it's easier to tweak the parameters directly in Kontakt to mimic some kind of DEF filter.

Cheers,
Benjamin


----------



## Moonchilde (Sep 6, 2008)

Hey did anything ever come out of this?


----------



## Stevie (May 4, 2009)

Yeah, did there?


----------

