Adding the original back in with the affected signal
Moderator: frank
Adding the original back in with the affected signal
Hey guys,
So I have some algorithms I like, but I can't seem to add the original signal back in with the effected. I assume that this could be done by storing the original signal in a register and then reading it out and adding it with the affected. However, in trying this I get the clipping light to continually activate and no sound to be heard. Any suggestions will be great. O and just so you guys know I am new to the chip but have assembly experience.
~Brandon
So I have some algorithms I like, but I can't seem to add the original signal back in with the effected. I assume that this could be done by storing the original signal in a register and then reading it out and adding it with the affected. However, in trying this I get the clipping light to continually activate and no sound to be heard. Any suggestions will be great. O and just so you guys know I am new to the chip but have assembly experience.
~Brandon
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
You should post your code, so we can see what you're doing exactly. But you don't need to save the original to a register, you can just read it again at the end, like:
rdax adcr,1 ;read input
;do some stuff, generate effected signal
mulx pot0 ;volume for effect
wrax effect,0 ;create effect register, clear accum
rdax adcr,.5 ;read clean again
mulx pot ;clean volume
rdax effect,.5 ;read in effect
wrax dacr,0 ;write to output
rdax adcr,1 ;read input
;do some stuff, generate effected signal
mulx pot0 ;volume for effect
wrax effect,0 ;create effect register, clear accum
rdax adcr,.5 ;read clean again
mulx pot ;clean volume
rdax effect,.5 ;read in effect
wrax dacr,0 ;write to output
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
Ok, so I tried to incorporate the dry volume, but now all I get is unaffected signal. Here is some code:
equ effect reg14 ; Setting up register
;Processing
rda del1+2630, .5 ;sum outputs as taps from reverb ring
rda del2+1943, .7
rda del3+3200, 1
rda del4+4016, 1.5
wrax dacl, 0.0
;
Note, the increasing coeff. are for reverse reverb
;Clean blend
mulx POT2
wrax effect, 0
rdax adcl, .5
rdax effect, .5
wrax dacl, 0.0
equ effect reg14 ; Setting up register
;Processing
rda del1+2630, .5 ;sum outputs as taps from reverb ring
rda del2+1943, .7
rda del3+3200, 1
rda del4+4016, 1.5
wrax dacl, 0.0
;
Note, the increasing coeff. are for reverse reverb
;Clean blend
mulx POT2
wrax effect, 0
rdax adcl, .5
rdax effect, .5
wrax dacl, 0.0
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
Here's your problem in red. This line writes the effect to the left output (WRAX DACL) and the "0.0" part of that line clears the effected signal from the accumulator. You don't want to do either of those things. You need the effected signal to be in the accumulator before you write it to the "effect" register in order to use that code I posted, and also you don't really want to write to the same output twice (I actually don't know what effect this has, but there's no reason to do it and it could potentially screw things up).B.C. wrote:Ok, so I tried to incorporate the dry volume, but now all I get is unaffected signal. Here is some code:
equ effect reg14 ; Setting up register
;Processing
rda del1+2630, .5 ;sum outputs as taps from reverb ring
rda del2+1943, .7
rda del3+3200, 1
rda del4+4016, 1.5
wrax dacl, 0.0
;
Note, the increasing coeff. are for reverse reverb
;Clean blend
mulx POT2
wrax effect, 0
rdax adcl, .5
rdax effect, .5
wrax dacl, 0.0
Also, you removed the clean volume control, so if you take out the red line from above, it should work, but you won't have control over the clean volume. To do a mix control, which pans from 100% reverb to 100% clean, you do this:
Code: Select all
equ effect reg14 ; Setting up register
;Processing
rda del1+2630, .5 ;sum outputs as taps from reverb ring
rda del2+1943, .7
rda del3+3200, 1
rda del4+4016, 1.5
wrax effect, 0
;Clean blend
RDAX effect,-1 ;read 'A' signal, with opposite sign
RDAX adcl,1 ;read 'B' signal, add to the A signal
MULX pot0 ;multiply by the xfade coefficient (pot derived)
RDAX effect,1 ;add back the A signal with correct sign
wrax dacl,0
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US
-
- Posts: 131
- Joined: Sun Nov 15, 2009 3:37 pm
- Location: New Orleans, LA US