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 May 11, 2005, 07:58 PM   #1
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,676
Rep Power: 64
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Noise Sharpening plugin

It is based on Mr. ssamadhi97 of the Foobar2000 forums plugin named foo_dsp_delta that has noise sharpening. Some people were looking for such a plugin. It simply adds the derivative of the input to the output. I haven't seen his code but I think my plugin does the same thing.

50% on my plugin is the same as 100% on Mr. ssamadhi97 plugin.
100% on my plugin is the same as 200% on his plugin.

Here it is (Paste this into notepad and save as a *.da file) :

Code:
; New microcode
name "Noise Sharpening";
copyright "Copyright (c) 2004. by Tril";
created "05/11/2005";
engine "kX";
; comment "";
guid "b0639f05-8c92-4445-ac83-3795797bcef8";
; -- generated GUID
 
input inL, inR;
output outL, outR;
control Sharpen=0.5;
static pL, pR; previous Left, previousRight
static dL, dR; derivative Left, derivative Right
static bL, bR; buffer Left, buffer Right         
 
; code 
macs bL, inL, 0, 0; bL = inL
macs bR, inR, 0, 0; bR = inR
macints dL, bL, pL, 0xffffffff; dL = bL - pL
macints dR, bR, pR, 0xffffffff; dR = bR - pR
macs outL, 0, dL, Sharpen; outL = dL * Sharpen
macs outR, 0, dR, Sharpen; outR = dR * Sharpen
macints outL, 0, outL, 2; outL = outL * 2
macints outR, 0, outR, 2; outR = outR * 2
macints outL, bL, outL, 0x1; outL = bL + outL
macints outR, bR, outR, 0x1; outR = bR + outR
macs pL, bL, 0, 0; pL = bL
macs pR, bR, 0, 0; pR = bR
end
I used outL and outR many times to save declaring two temp variables.

Last edited by Tril; Dec 22, 2006 at 09:06 PM. Reason: added "Paste this into notepad and save as a *.da file"
Tril is offline   Reply With Quote


Old May 11, 2005, 08:29 PM   #2
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Interesting, I'm a bit puzzled about the code:

macs dL, bL, -1, pL;
macsn outL, bL, -1, outL;

Why have you used such a code?
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old May 11, 2005, 08:46 PM Threadstarter Thread Starter   #3
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,676
Rep Power: 64
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Do you mean that I could have used
macsn dL, bL, 1, pL;
macs outL, bL, 1, outL;

I heard Russ talking about 1 not being exactly 1 (0.999..) and -1 being exactly -1.

I don't exactly remember when that applied. Since then, I got into the habit of using -1 instead of 1 in my code when possible. The code does the same thing and it's not really harder to understand.

EDIT :
I think the code I posted does not work exactly as it should. If I put the slider at zero, when bypassed and not bypassed it should sound the same. It may not be a good idea with the current code to use outL and outR many times or maybe the mistake is elsewere.

Last edited by Tril; May 11, 2005 at 08:52 PM.
Tril is offline   Reply With Quote
Old May 11, 2005, 11:08 PM   #4
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

it is giving me an "error: invalid plugin library" (I copy and pasted the latter code into the kx editor and saved it as a *.da... any ideas why it wont register?)
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old May 11, 2005, 11:43 PM   #5
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!

make sure that there's a new line after "end" in a saved file
Max M. is offline   Reply With Quote
Old May 12, 2005, 01:53 AM   #6
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

Good call; thanks max!
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old May 12, 2005, 01:58 AM   #7
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

Tril; this plugin works perfectly from what I can see (hear). Thank you for your work on this. It is very much appreciated.
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old May 12, 2005, 04:53 AM   #8
HardwareHeaven Junior Member
 
Join Date: Oct 2002
Posts: 81
Rep Power: 0
iron2000 is on a distinguished road
System Specs

Thanks Tril, will be trying this out.
__________________
Win7 x64 // Xonar DX // HD 2600 PRO // Maxthon 2
iron2000 is offline   Reply With Quote
Old May 12, 2005, 07:08 AM Threadstarter Thread Starter   #9
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,676
Rep Power: 64
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

I'm glad I could help. What this plugin does is simple so it was not too hard to implement.
Tril is offline   Reply With Quote
Old May 12, 2005, 03:29 PM   #10
Long Time ***** Friend
 
thomasabarnes's Avatar
 
Join Date: Jan 2003
Location: USA
Posts: 1,375
Rep Power: 0
thomasabarnes will become famous soon enough
System Specs

Quote:
Originally Posted by Tril
I'm glad I could help. What this plugin does is simple so it was not too hard to implement.
Man, what can I say? You programmers are awesome! This plugin works like DFX Audio Enhancement (for WMP, WinAMp, etc), and such applications. DFX, for example, cost $30.00. It has five different sliders for adjusting the percentage of fidelity, stereo ambience, 3D surround effect, dynamics and such, but it uses software processing which uses CPU power, and can sound artificial at times.

Fantastically, this plugin you wrote uses hardware for processing, sounds like pure sound audio enhanement , and it's free! So, it's more favorable, even though it doesnt have sliders to adjust the different audio enhancement areas as the commercial products. Yet, the audio enhanement acheived by this plugin you wrote is clear and definitely and improved sound!

Maybe you rewrote and edited the 2nd code above because the 0 % and bypass function does seem to have the same level no effect to me.

I think NappyLaddy may be pleased to see this.

Thanks for another nice additional plugin.
__________________

May a song always touch you in a positive way.
SONAR X1D Expanded, Windows 7 Pro 64Bit, MOTU UltraLite MK3, 150 GB HDD, 250 GB HDD, 1 TB x2 HDD 7200 rpm

My Music Production: Top 40, Contemporary Christian, Pop/Rock, Decent Rap, Inspirationals, and Children Songs

Last edited by thomasabarnes; May 12, 2005 at 03:42 PM.
thomasabarnes is offline   Reply With Quote
Old May 13, 2005, 07:19 AM   #11
DriverHeaven Newbie
 
Join Date: Feb 2005
Posts: 10
Rep Power: 0
TemporarySaint is on a distinguished road

Thanks very much for this plugin Tril. I was using a WinAmp noise sharpening plugin before this and in my opinion this sounds much better and its easier to use. Great Work!

Temp
TemporarySaint is offline   Reply With Quote
Old May 13, 2005, 08:33 AM   #12
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,561
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!

Quote:
Originally Posted by Tril
I heard Russ talking about 1 not being exactly 1 (0.999..) and -1 being exactly -1.
Well its a tricky subject, and it is not just +1, it is basically all positive fractional numbers that you let Dane translate for you. So it depends somewhat on what the instruction is intended to do, and what other values are being used. Generally I try to avoid the issue by entering the values in hex myself (when it is a number that can be represented exactly) rather than letting Dane do the translation. Additionally, do not forget that with macints, the 'Y' parameter is an integer, so you can use +1/-1 (0x1/0xffffffff) as the 'Y' parameter with macints. Although you can reverse the roles of macs/macsn instrucutions (as you did above), I pretty much use macints instead of macs/macsn anytime 1 is involved (as the 'X' or 'Y' parameter).

i.e.
macints R, A, X, 0x1; R = A + X
macints R, A, X, 0xffffffff; R = A - X
macints R, A, 0x80000000, 0x1; R = A - 1
macints R, A, 0x80000000, 0xffffffff; R = A + 1

In any case, you should use whichever method you find easier to understand when looking over your own code, etc.

-Russ

BTW: I noticed a mistake in the first code you posted.
macsn outL, bL, -1, outL;
macsn outR, bR, -1, outL; <------- Should be outR
Russ is online now   Reply With Quote
Old May 13, 2005, 09:39 AM Threadstarter Thread Starter   #13
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,676
Rep Power: 64
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

Quote:
Originally Posted by Russ
BTW: I noticed a mistake in the first code you posted.
macsn outL, bL, -1, outL;
macsn outR, bR, -1, outL; <------- Should be outR
You are right. That's why it did not work correctly. I thought that the mistake was related to using outL and outR as temp variables but it was not. I'll use them. It will save two GPRs.

Russ, what you are saying is interesting. I always tought that the integer in macints could only be positive as that is what I saw in the examples of the guide.

I'll correct the first code I posted, delete the second code and modify the first one a little to use macints. It's not really necessary but I'll still do it.
Tril is offline   Reply With Quote
Old May 14, 2005, 01:25 AM   #14
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

Thanks for standing by (updating and providing future support) your plugins Tril.
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old May 14, 2005, 03:20 AM Threadstarter Thread Starter   #15
S-3D enthusiast
 
Tril's Avatar
 
Join Date: Sep 2004
Location: Canada
Posts: 1,676
Rep Power: 64
Tril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud ofTril has much to be proud of
System Specs

If you look at the equations you see that what this plugin does is really simple. It substracts the last sample from the current sample and adds that to the current sample. It's impressive that such a basic operation can change the sound so much.
Tril is offline   Reply With Quote
Old May 14, 2005, 03:55 PM   #16
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!

yep, it's a plain high-shelving filter with boost (0...15dB) above Fs/8 (~6kHz)
Max M. is offline   Reply With Quote
Old Jun 26, 2005, 01:20 AM   #17
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

This is cool, it's noticable. I can't test it right now loudly...See, this is the kind of that would just get lost in the threads after a while. I wish a person would host a site with all the submitted plugs listed..but anyway...thx tril.
ROBSCIX is offline   Reply With Quote
Old Nov 29, 2006, 03:57 PM   #18
DriverHeaven Junior Member
 
Join Date: Jun 2006
Posts: 46
Rep Power: 0
Ananas is on a distinguished road

Thank you for the plugin, can someone compile it to 3538 series

As i get "wrong plugin library" error with 3538, i"ll be grateful if someone can fix this problem
Ananas is offline   Reply With Quote
Old Nov 29, 2006, 04:24 PM   #19
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

did you make sure you added an extra line after the 'end' in the KX editor?
It doesnt need compiling - as its 'dane' only code.
Maddogg6 is offline   Reply With Quote
Old Dec 21, 2006, 10:11 PM   #20
HardwareHeaven Junior Member
 
Join Date: Mar 2006
Posts: 37
Rep Power: 0
DDRRE is on a distinguished road

Hmmm...
First time I'm glad someone necroposted in a thread.
Nice plugin. I used to have 2 highshelves:
1) 6000Hz-24000Hz +12.0dB 0.7 Slope
2) 12500Hz-24000Hz +12.0dB 0.9 Slope

But this one is even better as a treble booster. But it doesn't only boost.. it makes MP3s sound like CD audio tracks. Some sort of a crystallizer.
DDRRE is offline   Reply With Quote
Old Dec 22, 2006, 02:33 PM   #21
HardwareHeaven Addict
 
Join Date: Jul 2006
Posts: 283
Rep Power: 39
silvertones is a jewel in the roughsilvertones is a jewel in the roughsilvertones is a jewel in the roughsilvertones is a jewel in the rough

How do I get this?
silvertones is offline   Reply With Quote
Old Dec 22, 2006, 02:46 PM   #22
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

Paste this into notepad and save as a *.da file

; New microcode
name "Noise Sharpening";
copyright "Copyright (c) 2004. by Tril";
created "05/11/2005";
engine "kX";
; comment "";
guid "b0639f05-8c92-4445-ac83-3795797bcef8";
; -- generated GUID

input inL, inR;
output outL, outR;
control Sharpen=0.5;
static pL, pR; previous Left, previousRight
static dL, dR; derivative Left, derivative Right
static bL, bR; buffer Left, buffer Right

; code
macs bL, inL, 0, 0; bL = inL
macs bR, inR, 0, 0; bR = inR
macints dL, bL, pL, 0xffffffff; dL = bL - pL
macints dR, bR, pR, 0xffffffff; dR = bR - pR
macs outL, 0, dL, Sharpen; outL = dL * Sharpen
macs outR, 0, dR, Sharpen; outR = dR * Sharpen
macints outL, 0, outL, 2; outL = outL * 2
macints outR, 0, outR, 2; outR = outR * 2
macints outL, bL, outL, 0x1; outL = bL + outL
macints outR, bR, outR, 0x1; outR = bR + outR
macs pL, bL, 0, 0; pL = bL
macs pR, bR, 0, 0; pR = bR
end
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old Dec 22, 2006, 03:33 PM   #23
HardwareHeaven Addict
 
Join Date: Jul 2006
Posts: 283
Rep Power: 39
silvertones is a jewel in the roughsilvertones is a jewel in the roughsilvertones is a jewel in the roughsilvertones is a jewel in the rough

Thanks
In notepad I typed in kx on the next line after end to enable the plug to register
silvertones is offline   Reply With Quote
Reply

Thread Tools