Its it possible to have priority given to say the Left channel.
Example:
If no signal detected on the Left channel input then play Right channel output.
If signal detected on Left channel then don
Priority Left and Right Signal Detection
Moderator: frank
No reason you can't do this. Just average the left channel and when it drops below a set level, play the right instead. Sounds like you want to do ducking, using level of one signal to control the level of another signal.
I've a few ideas on the code but am away from the office today so can't try them out.
I've a few ideas on the code but am away from the office today so can't try them out.
Frank Thomson
Experimental Noize
Experimental Noize
Hey JSteele,
Give this a try
this will give priority to the Right channel and then jumps to the Left when no signal. The Signal detection could be tweaked a little better or maybe a little delay to buffer a bit of the left channel to give it some space before letting the Left channel play, Otherwise if the right channel has some low signals it will start stuttering between the two. I haven't got that far in my fiddling.
Give this a try
Code: Select all
equ sigin reg0
equ avg reg1
rdax adcr,1 ; Read Right Channel
wrax sigin,1 ; Write ACC to sigin
mulx sigin ;square ACC
rdfx avg,0.01 ;sub sigin from avg, multipy by 0.01 add to reg and put in ACC
wrax avg,1 ;write average and leave in ACC
skp zro,leftchannel ; Right channel is 0, jump to Left Channel
rdax adcr,1 ; Read Right input
wrax dacr,1 ; Write Right input to Right output
wrax dacl,0 ; Write Right input to Left output
skp gez, end ; Right channel has priority Skip left Channel and End
leftchannel:
rdax adcl,1 ; read left input
wrax dacl,0 ; write Left to Right output
wrax dacr,0 ; write Left to Left output
end: