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 Jan 31, 2007, 09:27 PM   #1
DriverHeaven Newbie
 
Join Date: Sep 2006
Location: cebu, philippines
Posts: 9
Rep Power: 0
knight23 is on a distinguished road

??? dirac delta function

i need help on how to make a dirac delta function to check the impulse response of some filters i made.

d[n-m] = 1 if n=m and 0 otherwise

any idea on how to make one on dane? thanks!
knight23 is offline   Reply With Quote


Old Feb 1, 2007, 05:06 AM   #2
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!

something like:

Code:
input  n, m
output d

macs d, n, m, -1 
skip ccr, ccr, 8, 1    
macs d, 0x1, 0, 0 ; or macs d, 1 ... if you need a fractional 1 as answer
end
[color=gray](although i can't really see why you need it in dane - isn't it easier to just record an impulse response and analyse it in whatever software you want?)[/color]

Last edited by Max M.; Feb 1, 2007 at 05:12 AM.
Max M. is offline   Reply With Quote
Old Feb 2, 2007, 03:05 PM Threadstarter Thread Starter   #3
DriverHeaven Newbie
 
Join Date: Sep 2006
Location: cebu, philippines
Posts: 9
Rep Power: 0
knight23 is on a distinguished road

Smilie

i'm doing some LMS filters and i just wanted to get the filter coefficients.

Code:
control m; treat m as either 0 or 1
output d
static z=0
temp y, x,n

macs x, 0, 1, m
macs y, x, z, 1; when m = 1, 1st iteration y = 1, succeeding iterations y = 2
macs n, 1, y, -1 
skip ccr, ccr, 0x100, 1; n != 0    
macs d, 0x1, 0, 0
macs z, x, 0, 0
end
thanks max m.! i didn't know how to use the skip ccr thing. whats the difference between a fractional 1 and an integer 1?
knight23 is offline   Reply With Quote
Old Feb 2, 2007, 06:04 PM   #4
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 knight23 View Post
whats the difference between a fractional 1 and an integer 1?
I am guessing that what you really want to know is what the different is between using '1' and '0x1' in your code. This is related to how Dane translates numbers entered in decimal, for different instructions.

For instructions expecting the parameter to be a fractional value:
'1' is translated (by Dane) to 0x7fffffff (fractional 1), and is treated by the DSP as 0.9999999995343387126922607421875 (2's Compliment Value of 2147483647 (0x7fffffff)))
0x1 is not translated, and is treated by the DSP as 0.0000000004656612873077392578125 (2's Compliment Value of 1 (0x1)).
For instructions expecting the parameter to be an integer:
1 is translated (by Dane) to 0x1, and is treated by the DSP as 1 (integer 1).
0x1 is not translated, and is treated by the DSP as 1 (integer 1).
i.e.
Integer parameters are treated as 1's Compliment numbers.
Fractional parameters are treated as 2's Compliment numbers.

If you want to see how Dane translates the decimal numbers used in your code, load the plugin in the DSP and then choose 'Edit Dump' from the context menu.

As far as output goes, 0x1 is the lowest possible (positive) value, and fractional one is the largest possible (positive) value. Also, it should be noted that signals entering the DSP are divided by 4, and signals exiting the DSP are multipied by 4.
Russ is online now   Reply With Quote
Old Feb 2, 2007, 07:41 PM   #5
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!

BTW: I am not completely sure what you are trying to do with your code, but I do not think it is going to do what you want.

'output d' is a static register, so once it changes to 1 in your code, it is going to remain 1 (it has no initial value). Going by your intial question, I am guessing that is not what you want.

'fractional 1' + 'fractional 1' does not equal 2 (fractional 1 is the max value, so the result saturates to fractional 1). When implementing a counter, you should enter the values in hex.

If I understand your intent correctly, you probably want something more like the following:
Code:
control m=0; treat m as either 0 or 1    
output d
static z=0
temp y, x, n
temp tmp_m;  adjusted m

interp tmp_m, 0x0, m, 0x2; scale m range to 0x0..0x1 (0% to 49% : tmp_m=0, 50% to 100% : tmp_m=0x1)
macs d, 0, 0, 0; initialize d to 0
macints x, 0, tmp_m, 1; 
macints y, x, z, 1; when m = 1, 1st iteration y = 1, succeeding iterations y = 2
macs n, 0x1, y, -1 
skip ccr, ccr, 0x100, 1; n != 0    
macs d, 1, 0, 0  
macs z, x, 0, 0
Russ is online now   Reply With Quote
Old Feb 2, 2007, 10:15 PM Threadstarter Thread Starter   #6
DriverHeaven Newbie
 
Join Date: Sep 2006
Location: cebu, philippines
Posts: 9
Rep Power: 0
knight23 is on a distinguished road

just to be consistent...

Code:
macints y, x, z, 1; when m = 1, 1st iteration y = 1, succeeding iterations y = 2
macints n, 0x1, y, -1; n = 0 if y = 1 
skip ccr, ccr, 0x100, 1; n != 0    
macints d, 1, 0, 0  
macints z, x, 0, 0
thanks for all of your help!
knight23 is offline   Reply With Quote
Old Jun 13, 2007, 08:17 AM   #7
DriverHeaven Newbie
 
Join Date: Mar 2005
Posts: 8
Rep Power: 0
jbobchin is on a distinguished road

This is a good plugin to quickly test out the various kx reverbs. I wanted to see if the CLEAX4Reverb was usable as a multichannel reverb but I don't like the "pulsing" decay echoes. Be careful not to blow out your speakers though. Sounds like plugging in your guitar to a live amp! It's safer to turn the volume low and watch the levels dance on ProFX:Peak6.
jbobchin is offline   Reply With Quote
Reply

Thread Tools