HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > Effects and the DSP


Reply
 
Thread Tools
Old Sep 27, 2011, 12:37 PM   #1
HardwareHeaven Newbie
 
Join Date: Jun 2011
Posts: 10
Rep Power: 0
Violoncello is on a distinguished road

How to compile kx Effects

Hello Guys,
my problem is the following: I'm in the need of a quite large number of parametric EQs. The standard out-of-the-box peaking eq plugin works just fine, but when using it multiple times I run out of DSP resources.

Using UFX is no option for me, cause I'm using Win7 x64 (Master Mixer works like a charm btw.).

So I looked at the source of the Peaking EQ Plugin and found, that it should be possible to create a new plugin based on the existing, which offers 5 or even more single peaking eqs (in mono) while saving many registers.

I think I understand the things (in the code) I would need for doing this. I used to program some little tools back in my youth.

But this is long ago and now I need help at the basic point: How to compile the EQ_Peaking.cpp along with the bunch of related h-files? In the end, I guess, I would need to get a *.kxl-file to load into kx-drivers?

I have an old Visual C++ 6 on my PC and gave it a shot, but compiling didn't work. So I would like to know: Which program I must use (in which way) to get working effect plugins?

Thanks for your help
Violoncello is offline   Reply With Quote


Old Sep 27, 2011, 08:54 PM   #2
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Re: How to compile kx Effects

Your best bet is to use VCExpress along with the WDK/WinDDK.

See here (posts 53 and 55).
The above info will need to be modified to reflect whatever version of VCExpress and WDK you use (path's, etc).
Russ is offline   Reply With Quote
Old Sep 28, 2011, 02:32 AM   #3
HardwareHeaven Lover
 
Join Date: Aug 2007
Posts: 138
Rep Power: 33
jaromanda is just really nicejaromanda is just really nicejaromanda is just really nicejaromanda is just really nice
System Specs

Re: How to compile kx Effects

VCExpress doesn't (easily) compile 64bit ...
__________________
Feed your head.
jaromanda is offline   Reply With Quote
Old Sep 28, 2011, 09:58 AM   #4
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: Re: How to compile kx Effects

Quote:
Originally Posted by jaromanda View Post
VCExpress doesn't (easily) compile 64bit ...
WDK compiler does. You will need WDK anyway if you're for VCExpress because of MFC headers/libraries (basicaly VCExpress is just a GUI IDE for WDK compiler in our case)
__________________
Max M. is offline   Reply With Quote
Old Sep 28, 2011, 10:02 AM   #5
HardwareHeaven Lover
 
Join Date: Aug 2007
Posts: 138
Rep Power: 33
jaromanda is just really nicejaromanda is just really nicejaromanda is just really nicejaromanda is just really nice
System Specs

Re: Ответ: Re: How to compile kx Effects

Quote:
Originally Posted by Max M. View Post
WDK compiler does. You will need WDK anyway if you're for VCExpress because of MFC headers/libraries (basicaly VCExpress is just a GUI IDE for WDK compiler in our case)
I did not know that - will have to look into all of that so i can shuffle off this 32bit coil
__________________
Feed your head.
jaromanda is offline   Reply With Quote
Old Sep 29, 2011, 12:41 PM Threadstarter Thread Starter   #6
HardwareHeaven Newbie
 
Join Date: Jun 2011
Posts: 10
Rep Power: 0
Violoncello is on a distinguished road

AW: How to compile kx Effects

Firstly, thank you for your advices! I tried them out, but I didn't get along very well. But for the moment it's ok - maybe I will jump into this when I have some boring time (unlikely).

I now wrote my own IIR-Plugin in Dane and tuned the performance; it now needs just 5 + (7 * [Number of filter steps]) Registers and 6*[Number of filter steps]) Instructions (mono - stereo would be just 2 additional Registers per step).
That gives me a decent number of Peaking EQs in the 512 registers of my Audigy2ZS, which was my goal.

There's no frontend to the filter; I have created a little Excel sheet which calculates the filter coefficients. Then I copy them directly into the filter code file. That's ok for me.

If someone would code a frontend for DSP to choose from IIR Filters and calculate the coefficients, we would have one more decent KX Plugin .

In case someone's interested in the code:

Code:
    input in;
    output out;
    
    ;filter coefficients
    static b0_1=0.481211083877581, b1_1=-0.943019938328317, b2_1=0.463832264803109, a1_1=0.943019938328317, a2_1=-0.445043348680689;
    static b0_2=0.500190892419578, b1_2=-0.999423819761777, b2_2=0.499318557741597, a1_2=0.999423819761777, a2_2=-0.499509450161175;
    static b0_3=0.391705873203728, b1_3=-0.066878090382742, b2_3=-0.133308774349389, a1_3=0.066878090382742, a2_3=0.241602901145660;
    
    ;buffers
    static x1_1=0, x2_1=0;
    static x1_2=0, x2_2=0;
    static x1_3=0, x2_3=0;
    static y2=0;
    
    static scal=2;

    temp t;

; Code
     ;Filter #1
     macs      0, 0, in, b0_1; accum = in * b0
     macmv      x2_1, x1_1, x2_1, b2_1; accum += x2 * b2
     macmv   x1_1, in, x1_1, b1_1; accum += x1 * b1
     macmv      0, 0, x2_2, a2_1; accum += (y2 * a2)
     macs      t, accum, x1_2, a1_1; t = accum + (y1 * a1)
     macints t, 0, t, scal; t *= scal
     
     ;Filter #2
     macs      0, 0, t, b0_2; 
     macmv      x2_2, x1_2, x2_2, b2_2;
     macmv   x1_2, t, x1_2, b1_2;
     macmv      0, 0, x2_3, a2_2;
     macs      t, accum, x1_3, a1_2;
     macints t, 0, t, scal;
     
     ;Filter #3
     macs      0, 0, t, b0_3;
     macmv      x2_3, x1_3, x2_3, b2_3;
     macmv   x1_3, t, x1_3, b1_3;
     macmv      y2, out, y2, a2_3;
     macs      t, accum, out, a1_3;
     macints out, 0, t, scal;
More filter steps can be added by multiplying Filter #2 and adjusting the Register names.

Cheers
Violoncello is offline   Reply With Quote
Old Oct 2, 2011, 09:11 AM Threadstarter Thread Starter   #7
HardwareHeaven Newbie
 
Join Date: Jun 2011
Posts: 10
Rep Power: 0
Violoncello is on a distinguished road

AW: How to compile kx Effects

Update:
I learned that Excel is not as precise as required for the coefficient calculation. As I was tired of copying so many coefficients anyway I wrote some little tool in Basic which does all the calculations and generates the complete DSP-Code for any number of filters. So I just need to copy and paste the code in Dane, save it and load it into KX.

So I need not to worry about some strange compilers required for making KX Plugins .

If someone else is in the need of huge numbers of IIR-Filters and is interested in my code generator tool, feel free to PM me.
Attached Thumbnails
How to compile kx Effects-codegenerator.gif  
Violoncello is offline   Reply With Quote
Old Nov 14, 2011, 11:34 AM   #8
HardwareHeaven Addict
 
Join Date: Jan 2008
Location: germany, sb0090
Posts: 259
Rep Power: 0
stylus02 will become famous soon enoughstylus02 will become famous soon enough

Re: AW: How to compile kx Effects

nice little program.

if your solution works fine for you, why not. we all are doing different things to make the dsp do things that we want. i used an excel table to calculate some delay times for my reverb. the first adsr- envelope of kx- modular was a crazy if-then-jump- code in dane, the keyboard unit used kx- automation for mapping midi to note values. (i thought i had found out a new dsp- feature "lookup table", while using a delay line for that. nobody was notably exited, except myself. )

beside that: for compiling i use win xp with sp3, vcexpress edition 2008 (free), wdk7 (free).
to compile something you should start with the demo- plugin in the demo folder of your kx- driver version. it makes a simple volume controller. later you can study some filter plugins for calculating some coefficients and learn how to push them to dsp- registers using set_dsp_register();

stylus
__________________
http://kxm.dyndns.org

Last edited by stylus02; Nov 14, 2011 at 11:49 AM.
stylus02 is offline   Reply With Quote
Old Nov 22, 2011, 07:51 AM   #9
HardwareHeaven Lover
 
WxMan1's Avatar
 
Join Date: Dec 2007
Posts: 221
Rep Power: 40
WxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud ofWxMan1 has much to be proud of

Re: How to compile kx Effects

You guys should be gut-enuff w/what you got. If you can get your hands on a licensed copy of VS 2005 you be smokin' hot (with the IDE).



One of these days I'm going to finger out what you guys be talkin' 'bout.



Compile issues pertain to the particular platform you want to compile to. The more capability and knowlege you have concerning the IDE the greater the likelyhood of success.



You will need to understand what the target platform will be (32x, 64x and what OS). You will need to understand whether a "module" will need to be compiled as DLL in order for your code to be portable and to make that DLL portable across platform / OS (and whether that DLL will need exporting or not).

Thanx for the code you presented.

My current project is sieving through the registry bee-hive w/respect to installed programs, finding WAU installations; move associated files to another location and create reparse points back in the Windows directory (as if nothing happen).

None of that is an issue (all done). What is at issue is the sieving through the regisry and finding the associated reg links to those files being moved.

O.k.. I don't understand what you're doing and neither do you me. So we're even, eh?



It would seem to me that the issue is that we're working on differing scales, i.e., hdw vs registry entries....
WxMan1 is offline   Reply With Quote
Old Nov 26, 2011, 10:49 PM   #10
HardwareHeaven Addict
 
Join Date: Jan 2008
Location: germany, sb0090
Posts: 259
Rep Power: 0
stylus02 will become famous soon enoughstylus02 will become famous soon enough

Re: How to compile kx Effects

do you talk about registry entrys of kx dll's?

what we talking about is the "making of a kx - plugin" or compiling it (how a programmer would say).
__________________
http://kxm.dyndns.org
stylus02 is offline   Reply With Quote
Reply

Thread Tools