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 Jun 16, 2005, 08:29 PM   #91
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
Quote:
By the way, have you read the kx effects programming guide?
... YES, I have the newest one with the plots of log and exp, but u know sometime i need to ask some to solve confusion in my head. I bought a PC on October 2003... and i'm already able to do a lot of things, i record, do the radio, my site and i learned most of things by myself in this short time,
I really appreciate the help U and Max, Russ are giving me!!!
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote


Old Jun 17, 2005, 12:39 PM   #92
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
... Hy Guys, I was making tries with the fuction I posted two days ago:

Quote:
amount should be in [-1..1]


x = input in [-1..1]
y = output
k = 2*amount/(1-amount);

f(x) = (1+k)*x/(1+k*abs(x))
i tried to set a static k and to change some to avoid overflow and i came up with this that seems to work:

Quote:
macints a, 0, in, 0x4
tstneg abs, a, a, 0
macs b, 0.25, abs, 0.75

macints tmp_sign, 0, a, b ;
limit tmp_sign, tmp_sign, 0x3, 0x1 ;
log tmp1, a, 0x1F, 0x1 ; This is
log tmp2, b, 0x1F, 0x1 ;
macsn tmp2, tmp2, 1, 1 ; the division approx
macsn tmp3, tmp1, tmp2, 1 ;
exp result, tmp3, 0x1F, tmp_sign ; i found on the guide

macs out, 0, result, 0.25;
Let me know what u think!
__________________

http://www.rossanodembech.it

Last edited by radiocolonel.it; Jun 18, 2005 at 02:56 AM.
radiocolonel.it is offline   Reply With Quote
Old Jun 18, 2005, 02:02 AM   #93
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
exclamation

.... Ok, since nobody replied to the above post I tried to work on what i wanted to do and i came up with something that for me is working and u can control the amount of "companding" so u can use it on both low and stronger sources.
If i made some rough error in the code let me know, i'll be glad to learn from my mistakes!!!

http://www.radiocolonel.it/kx/ColHQ_Compander.zip
__________________

http://www.rossanodembech.it

Last edited by radiocolonel.it; Jun 18, 2005 at 02:58 AM.
radiocolonel.it is offline   Reply With Quote
Old Jun 21, 2005, 05:30 AM   #94
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!

Quote:
Originally Posted by radiocolonel.it
Let me know what u think!
Sorry, I was busy the last few days and only had time for quick replies.
That code looks good to me. It looks as though you are doing:
f(x) = x / ( 0.25 + (abs(x) * 0.75) )

And your new version looks like:
x = input sample, y = amount
f(x,y) = x * ( 0.25 + (y * 0.75) ) / ( 0.25 + (abs(x) * (y * 0.75)) )

I do not see any problems with the code, and trying it out, it seems to work pretty good.

-Russ
Russ is online now   Reply With Quote
Old Jun 21, 2005, 05:53 AM   #95
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!

Quote:
Originally Posted by Tiger M
By the way, have you read the kx effects programming guide?
Speaking of the kx effects programming guide, where did it go (the new version)? I just noticed that the whole thread about the guide is gone.
Russ is online now   Reply With Quote
Old Jun 21, 2005, 06:53 AM   #96
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!

Sorry, after further examination I did notice a problem that is causing the output to be phase inverted.
You should be using limitn instead of limit.

i.e.
limitn tmp_sign, tmp_sign, 0x3, 0x1;

-Russ
Russ is online now   Reply With Quote
Old Jun 21, 2005, 11:13 AM   #97
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
Quote:
Originally Posted by Russ
Sorry, I was busy the last few days and only had time for quick replies.
That code looks good to me. It looks as though you are doing:
f(x) = x / ( 0.25 + (abs(x) * 0.75) )

And your new version looks like:
x = input sample, y = amount
f(x,y) = x * ( 0.25 + (y * 0.75) ) / ( 0.25 + (abs(x) * (y * 0.75)) )

I do not see any problems with the code, and trying it out, it seems to work pretty good.

-Russ
Thank so much for your interest and help!
Yes that is the formula i used f(x)=(0.25+k)*x/(0.25+k*abs(x)) k=0.75*amount (i just wrote it differently)

I'm so glad i've been able to make this little plugin!
In almost 6 months i made a lot of progresses in dane programming, at the beginning i was just able to make volume controls!
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote
Old Jun 21, 2005, 11:16 AM   #98
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
Quote:
Originally Posted by Russ
Sorry, after further examination I did notice a problem that is causing the output to be phase inverted.
You should be using limitn instead of limit.

i.e.
limitn tmp_sign, tmp_sign, 0x3, 0x1;

-Russ
Thanks! I'll correct my code now!

I uploaded the last version of the programming guide on my site so u can download it:

http://www.radiocolonel.it/kx/KX_Programming.html
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote
Old Jun 21, 2005, 11:25 AM   #99
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!

Quote:
Originally Posted by radiocolonel.it
Thanks! I'll correct my code now!

I uploaded the last version of the programming guide on my site so u can download it:

http://www.radiocolonel.it/kx/KX_Programming.html
No problem, glad I could be of some help.
As for the guide, I do not currently need it (I probably even have a copy of it here somehwere myself), I was just wondering what happened to it. In any case, I am glad that it is still available from your sight.
Russ is online now   Reply With Quote
Old Jun 21, 2005, 12:35 PM   #100
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

The code is good, it works nice, the problem is that you can never get a perfectly smooth curve with using log and exp in any situation (division,roots etc.), so it's better to do things the traditional way.
Tiger M is offline   Reply With Quote
Old Jun 21, 2005, 12:38 PM   #101
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
Quote:
Originally Posted by Tiger M
The code is good, it works nice, the problem is that you can never get a perfectly smooth curve with using log and exp in any situation (division,roots etc.), so it's better to do things the traditional way.
I understand, this is because it is an approximation.
I'm so glad it works! At the end i've been able to make some is working!!!

This happened because of help of u guys!
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote
Old Jun 21, 2005, 01:09 PM   #102
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!

Do you realize that the guide on your site is missing the graph's?
Russ is online now   Reply With Quote
Old Jun 21, 2005, 01:17 PM   #103
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
Quote:
Originally Posted by Russ
Do you realize that the guide on your site is missing the graph's?
I don't know, it works on me, try now if it is better
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote
Old Jun 21, 2005, 01:18 PM   #104
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!

Ok, now I see them
Russ is online now   Reply With Quote
Old Jun 21, 2005, 02:58 PM   #105
DriverHeaven Lover
 
radiocolonel.it's Avatar
 
Join Date: Jan 2005
Location: Italy
Posts: 192
Rep Power: 0
radiocolonel.it is on a distinguished road

Donator
... Ok, now it works again! http://www.hardwareheaven.com/images/s...big%20grin.gif
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote
Reply

Thread Tools