|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Newbie
Join Date: Sep 2006
Location: cebu, philippines
Posts: 9
Rep Power: 0 ![]() |
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!
|
|
|
|
|
|
#2 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
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 Last edited by Max M.; Feb 1, 2007 at 05:12 AM. |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Sep 2006
Location: cebu, philippines
Posts: 9
Rep Power: 0 ![]() |
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 |
|
|
|
|
|
#4 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
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. |
|
|
|
|
|
#5 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,561
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Sep 2006
Location: cebu, philippines
Posts: 9
Rep Power: 0 ![]() |
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
|
|
|
|
|
|
#7 |
|
DriverHeaven Newbie
Join Date: Mar 2005
Posts: 8
Rep Power: 0 ![]() |
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.
|
|
|
|
![]() |
| Thread Tools | |
|
|