# Cutoff freq values



## paoling (Sep 3, 2011)

Hi to all!
I'm trying to understand how to convert an hertz value for the cutoff frequency to an EP value. The awesome math library from Big Bob has a EqFreq_to_ep function but the range of the cutoff frequency is a bit different from the EQ one. 
How could I resolve this issue?


----------



## Big Bob (Sep 4, 2011)

Right now my time is very limited but, you may get something useful out of this posting.

http://www.vi-control.net/forum/viewtop ... modulation

Unfortunately, the concluding thread (the link at the end of the above thread) was a casualty of a forum glitch awhile back. However, its emphasis was on key-position modulation anyway. You might be able to use the approximate formulae in the above thread to cobble together a pair of format conversion functions.

If I get some time later, I'll try to look into this a bit more.

Rejoice,

Bob


----------



## paoling (Sep 4, 2011)

Thank you so much BB! I've will try something starting by the thread you showed me 

Have a nice day!

Paolo


----------



## paoling (Sep 4, 2011)

Ehm, no, I carefully read your post but some points are definitively out of my capacity; I'd like to implement a poor man version of the formula you wrote (even with the 7-6% error) as a function in the math library, but I can't understand how to translate the formula 
f = 1225*2**(4.155*N) - 25 where N = (ep - 500000)/500000 

into the similar structure of your math library EqFreq_to_ep(F,N) 
N := (2338*N + 116)/233 - 433675

(what are those "**"? (i suppose it's a kind of square?) - can I remove the point and divide for 1000?)
Sorry for my incompetence :-/


----------



## paoling (Sep 4, 2011)

Oh by the way, Kontakt 5 has a plenty of new filters. Everyone as a different engine parameter setting for the cutoff value (even if some are really more similar to the EQ parameters).
Oh and there's the ability to fine tweak them with keyboard inputs!


----------



## Big Bob (Sep 4, 2011)

paoling @ Sun Sep 04 said:


> Oh by the way, Kontakt 5 has a plenty of new filters. Everyone as a different engine parameter setting for the cutoff value (even if some are really more similar to the EQ parameters).
> Oh and there's the ability to fine tweak them with keyboard inputs!



Yes, and I suppose they'll all have different and obscure relationships between freq and ep :lol: 

I may have a little time tomorrow to look at this and if I do, I'll try to post some sort of simple math library function for you but, be patient 8) 

Rejoice,

Bob

BTW I used ** to mean exponentiation (I think that's Fortran notation), maybe I should have used the more-familiar Basic operator ^. Sorry if that confused you :roll:


----------



## Big Bob (Sep 5, 2011)

Hi Paolo,

The basic formulae that *should relate *filter cuttoff frequency, Fc, to the corresponding engine parameter, ep, are as follows:

(1) Fc = Fmin*2^(Kr*ep/1000000)

(2) ep = 1000000/Kr*Lg(Fc/Fmin)

where 2^ denotes the binary exponential and Lg denotes the binary log. Kr is a constant computed with:

(3) Kr = Lg(Fmax/Fmin)

Note that I said *should relate *because NI may or may not be using a pure exponential function. At least it doesn't perfectly track with their displayed values. But, right now at least, I don't have a better function for you.

So, before I massage these formulae into a suitable format for the Math Library, would you like to check them out with a desk calculator and K4? For example, the LP filters seem to use Fmax = 21.8K and Fmin = 43.6, so Kr would be about 8.96. Why don't you try calculating a few ep values for some representative Fc values and see if these formulae seem to track K4 (K5?) accurately enough for your purposes.

I'll await your feedback before proceeding.

Rejoice,

Bob


----------



## paoling (Sep 5, 2011)

Thank you so much, give me a little of time to experiment with, and I'll be able to give you a (I hope) complete report for this and the other filters in Kontakt.
I sincerely admire your mathemathical skills, I'm used to find things with lots of trial and error


----------



## paoling (Sep 5, 2011)

Oh! I add that Kontakt knobs tends to approximate the values for better displaying, so 1700 Hz and 1745 Hz are shown in the same manner as 1.7k Hz; so I don't know if the filter cutoff resolution is able to track that different hertz value. I will try to test it intersecting two BP with the resolution set to the maximum value.


----------



## paoling (Sep 5, 2011)

Hi Bob, these are my first calculations using the LP Cutoff frequency. 
semplifying the structure, 1000000/8.96= 111607,142

So the expression is 111607*lg(Fc/43,6)

Substituing the desired Hertz value in the expression give these EP values and corrisponding Hertz values in Kontakt's filter cutoff knob.

Fc input -----EP-------Fc output

50---------22053------51.7
60---------51410------64.4
70---------76230------77.1
80---------97731------89.8
90--------116695------102.4
100-------133660------115
110-------149006------127.7
120-------163017------140.3
130-------175905------152.9
140-------187837------165.5
150-------198.946-----178

These are my calculations. As you see the values differ a lot when the input Fc is increasing.

If we divide the input for the output we obtain this series:
50/51.7= 0.967
60/64.4= 0.931
70/77.1= 0.907
80/89.8= 0.890
90/102.4= 0.878
100/115= 0.869
110/127.7= 0.861
120/140.3= 0.855
130/152.9= 0.850
140/165.5= 0.845
150/178= 0.842

Don't know if these last calculations help, I've tried to multiply the corriponding ep number for those results and the values are closer, but not exactly the desired.

:-(


----------



## paoling (Sep 5, 2011)

Anyway I will explore these further...  Thank you so much


----------



## Big Bob (Sep 5, 2011)

Well your data sort of confirms my original statement, viz

Either they don't use a pure exponential or their displayed value formatting routine is a rather poor approximation or both.

Unfortunately, NI has not chosen to tell us what function they are using overall and I don't want to take anymore time trying to reverse-engineer whatever they are doing. :? 

However, I suggest that you examine the tracking a little more broadbrush. For example, use Fc values of 200, 500, 1000, 5000, 10,000, etc. Then after you see how well or how poorly this function tracks over the broader range, you can decide whether this approximation will or won't be useful for your application. On the other hand, if you're only interested in a narrow range, say from 50 to 200Hz, I could recast the formulae to cover that reduced range more accurately. But, if you need to cover the full Fc range, I'm afraid this is about the best I can do for you.

If you think you can use it, let me know and I'll recast it for the Math Library but, if it's not accurate enough, I guess we're done :lol: 

Rejoice,

Bob


----------



## paoling (Sep 5, 2011)

Ok, I've reverted your function in order to calculate how much the Fcmin in the final part of the equation should change in order to have the corrected results in the displayed value.

I'm doing this for the LP filter, although I'd need to work on a BP filter, but I'm confident that I will try to adapt what I'm learning here to the other filter too.
Pratically I've selected a frequency into Kontakt, then I read its EP value. 
Then I did the reversal function (i'm not sure

This is my sketchpad about the results I found.
the first number is the frequency of the filter, Fc (pay attention that the 1000+ tends to be approximate, since the knob displayed value can corrispond to different ep values).
the second value is the relation between it and the Fc/Fmin
and the value in the parenthesis is what the Fmin should be in order to give back the correct ep for having the desidered knob value.

50/x=1,1153 (44,83) at 50
100,7/x=2,033 (49,53)
179,3/x=3,4629 (51,77) at 179,3
248,3/x=4,723 (52,57) - 250000 ep
307,4/x=5,8 (53)
602,6/x=11,24 (53,61)
817,2/x=15,22 (53,69)
1000/x= 19,06 (51,22) at 1000
1100/x= 21,38 
1200/x=22,04 (54,44)
1300/x=23,02 (55,27)
1400/x=25,34 (55,24)
1500/x=27,42 (54,704)
1700/x=31,34 (54,24)
1800/x=33,3 (54)
1900/x=35,16 (54,03)
2000/x=37,14 (53,8533)
5400/x=105,42 (51,22) - 750000
5000/x=97,42 (51,46) at 5000
15000/x=323,75 (46,33) at 15000
20000/x=449,213 (44,52) at 20000

Wow, I just discovered that the LP1, LP2 and LP4 give all different values; exciting..
Paolo


----------



## paoling (Sep 5, 2011)

Oh, by the way; look at the display of the filter. If you have a value at around 500 hertz, Kontakt will show it at 1 Khz value.. -.-

:roll:


----------



## paoling (Sep 5, 2011)

OH, if some values are not totally correct it's because I made a mistake and swithed to another filter in the middle of my calculations. (they are "overally" correct :-P


----------



## paoling (Sep 6, 2011)

Just for clarity, my specific need is to sync some BP modulators to keyboard notes. I'd like to have a resonable range of working values starting from the very low hertz values (like 55 and so) and reaching the upper partz of the spectrum.. I will post some updates about my experiments...


----------



## paoling (Sep 6, 2011)

Regarding BP4 values here what I found, modifying the formula you gave me

Fmin = 36.1
Fmax =18100
So Kr = 8,969775
1000000/8,969775= 111485,516
111486*lg(Fc/(Fmin*a))

"a" is a value that change in relation to the position of the knob, I just need to find it's highest peak, but it should range between 1 and 1.18. It has a kind of parabolic behaviour, reaching its highest peak around 1000 hz, it has a very rapid rise and it stay above 1.16 in the centre of the knob action.
I will further investigate this. Remember that THIS is for BP4, since I need this special function for a project.

Paolo


----------



## Big Bob (Sep 6, 2011)

Of course you realize that tweaking Fmin with some empirically derived curve is somewhat in the nature of a 'band-aid' :lol: But, if you can get some combination of a math function and a correction table, that may do the job for you.

While you're taking all this data, you may want to consider posting a tablulation of NI's *reported* Fc versus ep with around 20 or so data points spaced more or less uniformly over the full filter range. If you post such a table or tables, I'll put them aside and some day, I may take another whack at trying to 'reverse-engineer' what NI is doing.

The other thing that you (and anyone else that grapples with this issue) can do is to put as much pressure on NI as you can to start publishing the internal conversion functions that they are using. I haven't got the faintest idea of why they have kept us in the dark with this.

Once we know what the functions are, it would be easy to add a whole bunch of format conversion routines to the Math Library. Its the reverse-engineering part that takes all the time.

Rejoice,

Bob


----------



## paoling (Sep 6, 2011)

Ok I'll do my part of the job about it; and I suspect that NI doesn't want to reveal them because they know that they messed around with values. :-P

Thank you, I'll post the values sooner..!


----------



## Big Bob (Sep 10, 2011)

Hi Paolo,

I just took another quick look at the peculiar function NI is using for Fc vs ep for the various filters and I have a question for you.

Do you have any scientific evidence that the displayed Fc values are correct?

The reason I ask this is that the most natural relationship between Fc and ep would be a simple exponential. This is the case for EQ Freq and I can't imagine why they would have chosen some highly complex function for the filters. So, I'm wondering if the deviation from exponential might be the consequence of a poor display conversion function?

The EQ Freq vs ep tracks a simple exponential quite accurately whereas the filter Fc doesn't but all these observations are based on NI's_* reported *_Fc values. So, do you have any evidence that the reported (ie displayed) Fc values are correct?

If the displayed values are correct, then about the only way to provide format conversion routines that will track it accurately will be to use a small lookup table and exponential interpolation.

If you think the displayed values are accurate, let me know and I'll try to add a bunch of format-conversion functions to the library.

Rejoice,

Bob


----------



## Big Bob (Sep 10, 2011)

To clarify my last post, let me use a specific example. Consider the LP filters. Ostensibly they cover an Fc range from 43.6 Hz to 21.8 KHz. If we can believe these numbers and we fit an exponential curve to these two end points, when ep=500000 the exponential function will yield about 975 Hz whereas NI reports an Fc value of 1200 Hz. Now, the question is, is the deviation due to an error in the displayed value or is the error due to NI using something other than an exponential function, or both?

Of course a secondary question is can we believe that the end point Fc values are 43.6 and 21.8K?

Have you tried something like using a variable-frequency sine-wave and sending it through the filter to see what the attenuation is at the supposed corner frequency? It should be down about 3db per pole in the case of an LP filter. Or, are your ears good enough to confirm that when ep = 500000, the actual Fc is nearer 1200 than it is to 975?

Rejoice,

Bob


----------



## polypx (Sep 10, 2011)

I just did a quick test in K5, which has filters that will self resonate. Ladder 4 set to 3.0kHz actually resonated around 3015 Hz, and when set to 6.0 kHz resonates at 5958 Hz. I realize these are TINY differences, but do they in any way correlate with your expectation?


----------



## paoling (Sep 10, 2011)

Hi Bob and Polypx, I'm going to check with a white noise sound, Kontakt filter and then an analyzer how Fc displayed values and LP actual outpu correlate; and then, I think that the lookup table thing with interpolation is the most pratical solution.
Thank you for helping me


----------



## Big Bob (Sep 10, 2011)

Thanks for the info Dan but I don't think such small discrepancies will account for the peculiar deviation from a pure exponential. If the 'reported' Fc value is essentially correct, then NI must be using some fairly complex function that is not easily reverse engineered. Therefore the simplest way to provide functions that will track accurately will be a small lookup table (about 10 entries), and exponential interpolation (since the function is _*nearly*_ exponential).

So, I'll proceed on the basis that the displayed Fc value is a good approximation to the actual Fc value. However, if anyone discovers any major discrepancies, please let me know.

I should also mention that I don't have K5 yet, so I can only provide format-converters for the filter set in K4. If you want me to include additional filters, you will need to provide a data set for each filter that follows a different Fc function.

For the data I will need, obtain the value of _*reported*_ Fc for each of the following ep values.

0, 100K, 200K, 300K, 400K, 500K, 600K, 700K, 800K, 900K, and 1M

Meanwhile, I'll work on the K4 filters as time permits.

Rejoice,

Bob

BTW Do you have V402 of the Math Library? If not, you need to upgrade. I plan to include the new format converters in V403 which I will release as an upgrade to V402. ie I probably won't redo the User and Technical Guides (but I'm not sure about that yet).


----------



## paoling (Sep 10, 2011)

Hi Bob, I tried with an analizer and the values displayed by Kontakt are quite right (the analizer I used was not so incredible :-P).

Some things to keep in mind:
Kontakt 4 and Kontakt 5 legacy filters give back slightly diffent EPs for the same displayed Fc value. 
If you shift-click and move a Kontakt knob, even if you read the same approximated value, you are moving along different EP values and so the Fc frequency vary inside the approximated range. Ex. 1.2k can correspond to 1151 to 1250 hertz, and you can actually move the knob inside this range even if the display remains the same.
But..! Fortunately Kontakt 5 knobs provide the ability to input the values with the keyboard, so I can easily provide you a complete table with the EPs you said to me.
But in this way we don't know if 1.2K is 1151 or 1250

But! If we can reverse the table, we could get very very fine results, since I can say precisely what EP corresponds to a precise Hertz value.
Let me know you can work with this kind of table.


----------



## paoling (Sep 10, 2011)

the first value is LP4 the second is for BP4/HP4.
EPs - Fc values

0: 43.6 - 36.1
100K: 91.2 - 75.5
200K: 179.3 - 148.5
300K: 342.2 - 283.4
400K: 642.9 - 532.5
500K: 1.2K - 990.3
600K: 2.2K - 1.8K 
700K: 4.0K - 3.3K
800K: 7.2K - 5.9K
900K: 12.6K - 10.5K
1000K: 21.8K - 18.1K


----------



## Big Bob (Sep 10, 2011)

Yes, these values agree with my data for the LP and HP filters. However, does K5 still have a different range for the 2-pole high pass? In K4, the HP2 filter covers the range from 37.3 to 18.7 KHz (instead of 36.1 to 18.1 KHz). I think this is just a factor of 1.033149171 applied to the Fc but I haven't verified this yet. It would be a shame to have to use a different set of lookup tables just for HP2.

As to the N versus Freq, the data is more useful the way I asked for it. I don't think you need be too concerned about the range of N values that produce the same displayed Fc .. it should all come out in the wash :lol: 

To be continued ...


Bob


----------



## Big Bob (Sep 10, 2011)

I had a little more time to investigate all the K4 filters and this isn't going to be too difficult to implement converters for. Here's what needs to be done.

1. Implement the LP filters using a 10-element lookup table and Exponential interpolation. This will give us ep_to_LPFreq.

2. Reverse the tables and do logarithmic interpolation to provide LPFreq_to_ep.

3. Scale the frequency of the LP filters to obtain the HP, BP, and BR filter converters.
It turns out that these filters are related to the LP filters by simple constant factors in frequency.

4. The Ladder, Pro and 3x2 filters already track a pure exponential function (like the EQ freq) so they will be easy to implement.

Steps 1, 2, and 3 have already been done and as soon as I have a little more time for this, I'll do the 4-stage ladder, Pro, and 3x2 filters. 

Then all that remains will be the new K5 filters. Until I see the data for those, I don't know what will be involved. But, if the Lad/Pro filters are representative we can hope that NI did them with a simple exponential relationship.

To Be continued ...

Rejoice,

Bob

BTW The LP converters now track NI's function with less than +/- 0.5% error for the ep_to_LPFreq and less than 1% error for the inverse function. I presume that will be accurate enough?


----------



## paoling (Sep 11, 2011)

Hi Bob, I tried with K5 legacy LP4 to insert by hand the hertz values that give me the most accurate and expected EPs. Since Kontakt knob display is not so accurate, with hand input I can spot the exact value we need to match the EPs. So I think you can use these values for the table, to match a better resolution. If you want I can calculate EPs for 50k 150k 250k, and so. 
VALUES FOR LP
EP - Fc
500K: 1195.5
600K: 2201
700K: 4007
800K: 7185
900K: 12648
1000K: 21802 (the first value corresponding to EP 1000K)


----------



## Big Bob (Sep 11, 2011)

Hi Paolo,

Since these more accurate values are within 0.5% of the displayed values, I don't think that using these values will make much difference in the overall accuracy of the converters. However, I'll plug them in for a test drive when I get a chance but we may just be 'gilding the lily' :lol: 

Meanwhile, as soon as I finish the Lad/Pro and 3x2 filters, I'm going to post a demo instrument so you can play with the new format-conversion routines. That way you should be able to get a better feel for the overall accuracy and determine if it will be useable as is for your application.

What you really need to do is to post the tabulation for whatever new K5 filters you want me to include converters for. Remember, I don't have K5 so I have no idea what will be involved until you furnish some data.

To be continued ...

Bob

BTW Do any of you guys reading this thread have any actual experience with trying to run K5 under Windows XP? I really don't want to go to Win 7 so if K5 won't run under XP, I probably won't update to K5.


EDIT: I forgot to suggest that you might want to use value_edits for testing instead of knobs. Even in K4, they can be set to any value you want.


----------



## Big Bob (Sep 12, 2011)

Hi Paolo,

Here's the Demo Instrument that I promised. This includes all the K4 filters and an updated EQ converter. I made the converter routines to use frequency scaled by 10 for better precision on the low end. Therefore, I updated the EQ converters to also use 10xF. When I release V403 of the Math Library, I'll include a means to compile the legacy versions of the EQ converters.

To run the demo, use the drop-down menu to select the filter type. When you set the *ep* value-edit the appropriate *ep_to_Freq *routine is invoked and the *Freq* output is displayed in the Freq value edit. Similarly, if you set the *Freq* value-edit, the appropriate *Freq_to_ep *routine is invoked and the *ep* output is sent to the ep value-edit. In either case, the *ep* value is sent to the actual filter and NI's reported value is displayed on the NI = label.

I'm including the KSE source code for the demo script, even though you won't be able to compile it yet (until I release V403 of the library). However, it still might be useful to you to get a better handle on why the demo does what it does, etc.

I think the overall accuracy is now quite good but, you'll have to be the judge of that.

Let me know if you have any problems running the demo. Also, do you plan on posting data for any K5 filters? If so, please do them soon because my window of free time to work on this may not be open much longer.

*BTW You may or may not know that you can double-click a value-edit box and then enter any value you want from the keyboard.*

Rejoice,

Bob

Thanks for the suggestion Ken, but, I'd like to hear from someone who is running the full version of K5 under XP.


----------



## Tod (Sep 13, 2011)

Hi my friend,

What version of K4 do you have? I thought I had the latest K4 but I couldn't load your nki. I got a message that the nki was made by a newer version. 



Big Bob @ Mon Sep 12 said:


> *BTW You may or may not know that you can double-click a value-edit box and then enter any value you want from the keyboard.*



It also works for Copy/Paste, both in or out which comes in handy now an then. :D 

Tod


----------



## Big Bob (Sep 13, 2011)

> It also works for Copy/Paste, both in or out which comes in handy now an then.



Hey Tod old friend, thanks for pointing that out to me. I wasn't aware of the copy/paste thing and I could have used it many times in the past. Good tip.

As to my version of K4, the About dialog shows 4.2.3.4914

God Bless,

Bob


----------



## Tod (Sep 13, 2011)

> As to my version of K4, the About dialog shows 4.2.3.4914



Okay, I downloaded K4.2.4, has there been any problems with that update that you or anyone else might know about?

Heh heh, based on the past I'm a little skeptical. :D 

God bless you too Bob.

Tod


----------



## Big Bob (Sep 13, 2011)

Hi Tod,

I don't know about 4.2.4 (didn't even know there was a later version than mine). As to 4.2.3.4914, I haven't experienced any problems but I have been mostly concentrating on scripting things.

Rejoice,

Bob

*Hey Paolo, what happened to you? Are you planning on posting K5 filter tables or not? If I don't see them pretty soon, I'm going to release V403 and move on to other things. I need some feedback my friend. *:roll:


----------



## paoling (Sep 15, 2011)

I'm very sorry for the delay, BB I've answered to you by PM, I will see if tonight I will find the time to post the results.
I also use the demo of K5, but it let me check out values. I'm on Win7 so I can't say about Kontakt compatiblity with XP.
Paolo


----------



## Big Bob (Sep 15, 2011)

OK my friend. I'm just glad you're OK.

Take your time and I'll hold off releasing V403 until I get your feedback. However, I may not be able to include any converters for K5 unless I get the needed data pretty soon. If anyone else reading this thread has K5 and you'd like converters to be included in the next Math Library update, please post the data for the filters you want to be included.

The data I need are the displayed frequencies for each decade of engine parameter ie 0, 100K, 200K, 300K ... 900K, 1M.

Rejoice,

Bob


----------



## paoling (Sep 21, 2011)

Hi, today I have a bit of time and I think I can provide you the tables for everything in Kontakt 5. See you later!


----------



## Big Bob (Sep 21, 2011)

And, what about the filter converters I already posted? Especially the LP/BP/HP stuff. Are these converters now sufficiently accurate for your purposes?

By all means post the K5 data if you can but, I may not be able to include converters for them in V403 because my time is more limited now. I'll know more about that after I see the data but, converters for the K5 stuff may have to wait for the next library update after V403.

Please let me know though about the K4 converters I already posted for you.

Rejoice,

Bob


----------



## paoling (Sep 21, 2011)

SV FILTERS
0	26
100K	50.4
200K	98
300K	190.4
400K	370
500K	718.9
600K	1.4k
700K	2.7k
800K	5.3K
900K	10.2K
1000k	19.9K

AR FILTERS
0	8.2
100K	16.9
200K	43.7
300K	100.9
400K	233.1
500K	538.6
600K	1.2
700K	2.9k
800K	6.6K
900K	15.4K
1000K	35.5K

DAFT FILTERS
0	26
100K	53.4
200K	110
300K	226.5
400K	466.2
500K	959.7
600K	2.0k
700K	4.1k
800K	8.4K
900K	17.2K
1000K	35.5K

PRO 53 FILTERS
0	26
100K	46.2
200K	82.4
300K	146.8
400K	261.6
500K	466.2
600K	830.6
700K	1.5K
800K	2.6K
900K	4.7K
1000K	8.4K

PAR FILTERS
0	2.6
100K	7.3
200K	20.6
300K	58.3
400K	164.8
500K	466.2
600K	1.3K
700K	3.7K
800K	10.5K
900K	29.8K
1000K	84.4K


----------



## paoling (Sep 21, 2011)

For what I have seen your example is pure awesomeness; I will try to write down the basic of the instrument I have in mind. It is basically a kind of multifilter per note played; the formula for converting midi notes to hertz values is simple but involves to provide a sufficient accuracy a form of square root, if I don't get wrong; so I will instead use a kind of predefined lookup table of the frequencies for every midi note.
I will keep you informed about that. 
Thank you so much,

Paolo


----------



## Big Bob (Sep 21, 2011)

Just to be clear about it, are you saying that I can release the K4 converters *as is *in V403 of the Math Library?


EDIT: I just took a quick look at the K5 filters and, with the possible exception of the AR filters, I should be able to include them in V403 since they appear to track a simple exponential curve. I kind of thought that might be the case since the later filters for K4 were all tracking pure exponentials. Actually, only the LP/BP/HP filters were following some odd function that needed special fitting.

Please recheck the data for the AR filter at N = 100K. If I use a pure exponential it would return a value of around 18.9 instead of the value you show as 16.9. All the other data points track OK except this one. Maybe you made a typo?

Rejoice,

Bob


----------



## paoling (Sep 21, 2011)

Yes I made a typo. Your instrument works very well. Just two things: I've noticed that the ep_to_frequency and frequency_to_ep functions give back slightly different results, this is surely for some approximation by the kontakt engine.
for example for LP, 642.9 --> 400000
but 400000 -->643.2
The error is very slight!!! So I'm only reporting that for you; I think that the Math library is something by you that you decided to share as a gift to our comunity, so I don't feel myself in the right place to decide whether or not it should be released.
Oh..! A little suggestion: since Kontakt 4 filters are called Legacy filters in Kontakt 5, I suggest you to adopt a similar name for the library functions; the so called "standard" filters in Kontakt 5 are the SV ones, so to mantain backward compatibility and avoid confusion in this already messy NI's filter world, I suggest to think a little about the naming of the functions 


Thank you so much,

Paolo


----------



## Big Bob (Sep 21, 2011)

> Just two things: I've noticed that the ep_to_frequency and frequency_to_ep functions give back slightly different results, this is surely for some approximation by the kontakt engine.
> for example for LP, 642.9 --> 400000
> but 400000 -->643.2



These small errors are due to a number of factors including the all-integer arithmetic limitation.


> I think that the Math library is something by you that you decided to share as a gift to our comunity, so I don't feel myself in the right place to decide whether or not it should be released.



I will definately be releasing V403 in the next few days but, I just wanted you to have a chance to find any problems *before* I release it.


> A little suggestion: since Kontakt 4 filters are called Legacy filters in Kontakt 5, I suggest you to adopt a similar name for the library functions; the so called "standard" filters in Kontakt 5 are the SV ones, so to mantain backward compatibility and avoid confusion in this already messy NI's filter world, I suggest to think a little about the naming of the functions



I'm not quite sure what you are asking for here. The converter names are already pretty long so I hate to add any more qualifiers such as *legacy_ep_to_LPFreq*
etc. However, I supporse I could regroup them in the library and divide them into Legacy and K5 groups. However, right now since I don't have K5 yet, I'm kind of reluctant to do that. Besides, I've started working on V450 which will use the new KSE return-value functions. This will result in a significant renaming of the converter functions. So, I think I'll just release V403 with the old V402 format.

I'm also attaching an updated Demo Instrument for you to test. I've added the 4 new K5 filter types. However, since I don't have K5, I couldn't load actual filters. But, you will be able to verify the ep vs freq and vice versa against your posted table values. The only thing is that the NI= label will not show the correct value since I merely used the first four K4 filters in place of the new ones.

Please exercise this new demo carefully to see if you can spot any gross error (I only tested the K5 filters superficially). I'll hold off releasing V403 for a few days to give you one last chance to correct something if you find a problem.

Rejoice,

Bob


----------



## paoling (Sep 22, 2011)

Hi Bob, I'm trying your K5 converter and they work pretty well, probably more accurate than the actual legacy filters. 
If you want I can test this part of your library as a kind of beta testing, while trying to design my instrument; I'm not sure that I've understood how to use the KSE part, with a kind of precompiled lookup functions (if I don't get wrong). I have used your 2.15 version since I failed using the new routines. (but I will learn them).

My previous intensive use of your library was to control volume in a much complete way, replacing velocity modulators, that aren't completely under user control, with the ATFade function.


----------



## Big Bob (Sep 22, 2011)

> Hi Bob, I'm trying your K5 converter and they work pretty well, probably more accurate than the actual legacy filters.



OK. I will post V403 today in a new thread. I have also revised the User's Guide Addendum and readme files to cover the additions since V402.

http://www.vi-control.net/forum/viewtop ... 5e12af14bb



> I'm not sure that I've understood how to use the KSE part, with a kind of precompiled lookup functions (if I don't get wrong). I have used your 2.15 version since I failed using the new routines. (but I will learn them).



Using V402/V403 is not really any more complicated than using V215. If you don't need the high-speed versions of the routines, just supply an option list of zero for SetMathMode. All such things are very clearly documented in the User's Guide Addendum but, you do need to read it :lol: 



> If you want I can test this part of your library as a kind of beta testing, while trying to design my instrument;



By all means, please let me know if you find anything amiss with V403 and I wish you the best with your project.

Rejoice,

Bob


----------



## geronimo (Nov 1, 2011)

An idea of ​​newbie . :wink: 
A command by MIDI LEARN to the knob on the relevant parameter (filter) and the insertion of a command message in the script might help to display the true value?
My two cents . :oops:


----------



## Big Bob (Nov 2, 2011)

geronimo @ Tue Nov 01 said:


> An idea of ​​newbie . :wink:
> A command by MIDI LEARN to the knob on the relevant parameter (filter) and the insertion of a command message in the script might help to display the true value?
> My two cents . :oops:



Try increasing it to 'three cents worth', I'm afraid I'm not following what it is you are asking for :lol:

Rejoice,

Bob


----------



## geronimo (Nov 2, 2011)

Yes, I think my idea is "utopian". :cry:


----------

