Page 1 of 1

variable xover

Posted: Sun Feb 07, 2010 2:44 pm
by djmalan
I try to vary the kfl values of act xover example ,but I got an error message like ;cofficient out of range :D
original;

equ kfl 0.48 ;XOVER low freq
equ kql 0.5 ;XOVER low q
equ kfh 0.6 ;XOVER high freq
equ kqh 0.85 ;XOVER high q
equ kflext 0.01 ;bass extension frequency
equ kshext -0.5 ;bass extension shelf
I try to change;

equ kfl reg26 ;XOVER low freq
equ kql 0.5 ;XOVER low q
equ kfh 0.6 ;XOVER high freq
equ kqh 0.85 ;XOVER high q
equ kflext 0.01 ;bass extension frequency
equ kshext -0.5 ;bass extension shelf[/quote]
;prepare pots for control:
rdax POT0, 1.0
sof 0.48, 0.01
wrax kfl, 0

I gave different numbers as a coifficient without pot control ,than it worked.I think there is a different way to vary freq.Does someone know...

Posted: Mon Feb 08, 2010 1:23 pm
by frank
If you change the equ from a fixed value to a register you will also have to change the code where it is used to expect to use a register.

Posted: Mon Feb 08, 2010 1:43 pm
by djmalan
;do crossover, 24dB Linkwitz-Riley alignment
;Low pass filter for woofer:

rdax lf1a,kfl
rdax lf1b,1
wrax lf1b,-kfl
rdax lf1a,kql
rdax eqin,0.05
wrax lf1a,0

rdax lf2a,kfl
rdax lf2b,1
wrax lf2b,-kfl
rdax lf2a,kql
rdax lf1b,1
wrax lf2a,0
Is this a wrong usage?

Posted: Mon Feb 08, 2010 2:49 pm
by frank
if 'kfl' is a register, then yes, that is wrong. rdax expects that to be a fixed coefficient in that place. Look at 'mulx' to multiply acc by a register.

Posted: Mon Feb 08, 2010 4:00 pm
by livingston
djmalan, check out this thread which is asking kind of the same question. If "kfl" represents a multiply (as in the RDAX code which loads a register and multiplies by the coefficient) then you can make a pot control for the Q by just doing

;prepare pots for control:
rdax POT0, 1.0
sof 0.48, 0.01
wrax res,0 ;make sure you equate res to a register

rdax lf1a,1
mulx res
rdax lf1b,1
wrax lf1b,-1
mulx res
rdax lf1a,kql
rdax eqin,0.05
wrax lf1a,0


That's the general idea anyway.

Posted: Mon Feb 08, 2010 5:06 pm
by djmalan
Thanks Frank ,thanks livingstone I remember now. :oops: exuse for vasting time.
I like examples ...

Posted: Mon Feb 08, 2010 5:45 pm
by frank
Never a waste of time, we try to help as much as possible :)

Active Xover program

Posted: Thu Mar 18, 2010 2:40 am
by pappurp
Hi,

I am very new to DSP Programming. I am unable to understand how the the values for kfl and kql come from in the following code:

equ kfl 0.48;XOVER low freq
equ kql 0.5 ;XOVER low q
equ kfh 0.6 ;XOVER high freq
equ kqh 0.85 ;XOVER high q
equ kflext 0.01 ;bass extension frequency
equ kshext -0.5 ;bass extension shelf

Please help.

Thanks