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 21, 2005, 12:07 PM   #1
DriverHeaven Newbie
 
Join Date: May 2005
Posts: 3
Rep Power: 0
Metallist is on a distinguished road

??? Help me please with LOG function

Help me please with LOG function
See example:

[color=blue]input[/color] in;
[color=blue]output[/color] out;
[color=blue]control[/color] volume=0x19999999, exponent=0x2ccccccc;
[color=blue]temp[/color] t
[color=lime];code[/color]
[color=magenta]log[/color] t, in, exponent, 0x0;
[color=magenta]macs[/color] out, 0x0, t, volume;
[color=blue]end[/color]
[color=#0000ff][/color]
[color=white]Situation: when moving exponent slider the shape of output signal does not change smooth, but unevenly(bouncely).[/color]
[color=#ffffff]Problem: WHY DOES IT HAPPEN SO ?????[/color]
[color=#0000ff][/color]
[color=white]I am sorry for my English if my spelling isn't right[/color]
Metallist is offline   Reply With Quote


Old Jun 21, 2005, 12:26 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!

For one thing the range of the Max Exponent parameter is 0x1 to 0x1F (1 to 31), while the control's range is 0x0 to 0x7FFFFFFF (fractional values), so I am unsure what would happen when you use the instruction with invalid parameters.
Russ is online now   Reply With Quote
Old Jun 21, 2005, 12:35 PM   #3
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 Metallist
Help me please with LOG function
See example:

[color=blue]input[/color] in;
[color=blue]output[/color] out;
[color=blue]control[/color] volume=0x19999999, exponent=0x2ccccccc;
[color=blue]temp[/color] t
[color=lime];code[/color]
[color=magenta]log[/color] t, in, exponent, 0x0;
[color=magenta]macs[/color] out, 0x0, t, volume;
[color=blue]end[/color]

[color=white]Situation: when moving exponent slider the shape of output signal does not change smooth, but unevenly(bouncely).[/color]
[color=#ffffff]Problem: WHY DOES IT HAPPEN SO ?????[/color]

[color=white]I am sorry for my English if my spelling isn't right[/color]
the "exponent" is what usually is called "resolution", it is a number between the 1-31 and the highier it is the better is the approximation of the log function!
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote
Old Jun 21, 2005, 02:41 PM Threadstarter Thread Starter   #4
DriverHeaven Newbie
 
Join Date: May 2005
Posts: 3
Rep Power: 0
Metallist is on a distinguished road

Thanks. I solved a problem when I multiplied the value of exponent slider by 0x1F. And now when slider ranges from 0 to 2147483647, then exponent ranges from 0 to 31.

[color=white]I am sorry for my English if my spelling isn't right[/color]
Metallist is offline   Reply With Quote
Old Jun 21, 2005, 04:22 PM   #5
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
... Are u doing something like yhis?

Quote:
input inl, inr
output outl, outr
static resolution=0x0, tmp=0x0
control amount=0
macs resolution, 0, amount, 0x1f

macints tmp, 0, inl, 0x4
log tmp, tmp, resolution, 0x0
macs outl, 0, tmp, 0.25

macints tmp, 0, inr, 0x4
log tmp, tmp, resolution, 0x0
macs outr, 0, tmp, 0.25


end
__________________

http://www.rossanodembech.it
radiocolonel.it is offline   Reply With Quote
Old Jun 21, 2005, 06:45 PM Threadstarter Thread Starter   #6
DriverHeaven Newbie
 
Join Date: May 2005
Posts: 3
Rep Power: 0
Metallist is on a distinguished road

Yes, you're right.
But there is one bound by 5 dB at 52% of "amount" slider.

But now it isn't very big problem for me.
But it is still interesting, why there is such bound.
Metallist is offline   Reply With Quote
Reply

Thread Tools