Unwanted Distortion in Delay

Software questions and issues with the FV-1

Moderator: frank

Post Reply
adventure_audio
Posts: 12
Joined: Mon Feb 02, 2015 9:19 pm

Unwanted Distortion in Delay

Post by adventure_audio »

I am experiencing some weird distortion that I cannot track down on the delay tails. I feel like my gain on something is too high but I cant figure out what. Instead of a clean blend I am adding an octave blend. Thoughts?

Code: Select all

; Guitar Echo 
; HK July 2009 
; version 2.0 
; modified by Christian Terjesen / Adventure Audio Feb 2016
; 
; mono in mono out 
; pot0 = feedback amount (from no feedback = slap back to infinite feedback) 
; pot1 = delay time (50 ms to 1 second with 32 kHz x-tal) 
; pot2 = octave mix 
; 
; only 20 thicks 

;declare memory spaces: 

mem   del   32767

;declare register equates: 

equ   dout  	reg0 
equ   kfbk   	reg1 
equ   dry_in   	reg2
equ   oct		reg3 
equ   octreg   	reg4

;get feedback value from pot0: 

wrax   kfbk,0 
rdax   pot0,1 
wrax   kfbk,0

;get address pointer from pot1: 

rdax   pot1,1 
and   %01111110_00000000_00000000   ;don't make jumps too small 
sof   61/64,3/64         ;50 ms to 1 second 
wrax   addr_ptr,0 

;get output from delay: 

rmpa   1 
wrax   dout,0 

;put input signals into delay, allowing for feedback: 

rdax   dout,1 
mulx   kfbk    
rdax   adcl,0.5 
wrax  dry_in,1 
wra   del,0

;octave
rdax dout,1
absa
wrax oct,1

rdax   oct,1 
mulx   kfbk    
rdax   adcl,0.5 
wrax  octreg,1 
wra   del,0

; mix octave using pot2 

rdax   dout,1 
rdax   octreg,-1 
mulx   pot2 
rdax   octreg,1 

;form mono output:

wrax dacl, 0
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Code: Select all

;octave
rdax dout,1
absa
wrax oct,1 
Why are you doing an absa? Try removing it
Frank Thomson
Experimental Noize
adventure_audio
Posts: 12
Joined: Mon Feb 02, 2015 9:19 pm

Post by adventure_audio »

That is my octave up effect. Which seems to be working but I get a lot of unwanted distortion. Is there anything else that sticks out to you? Maybe something with the gain staging of the coefficients?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

While that can work you are going to get a lot of distortion from it. There are a few other things like:

Code: Select all

rdax   dout,1
mulx   kfbk   
rdax   adcl,0.5
wrax  dry_in,1
wra   del,0

;octave
rdax dout,1
absa
wrax oct,1

rdax   oct,1
mulx   kfbk   
rdax   adcl,0.5
wrax  octreg,1
wra   del,0 
You write to 'del' twice in there so you basically overwrite the first write with the second value.

And you do:

Code: Select all

wrax oct,1

rdax   oct,1
Which basically doubles the value. That might be your intent due to the absa but you need to be careful anytime you use gain in a system with feedback.

I think you need to clean up the code first, do just the delay then add in the feedback and when that is all correct add in the octave part.
Frank Thomson
Experimental Noize
adventure_audio
Posts: 12
Joined: Mon Feb 02, 2015 9:19 pm

Post by adventure_audio »

I am basing my delay off of this and it works very well. But instead of having a mix between dry/wet, I would like to blend the octave up delay with the regular delay.

Code: Select all

; Guitar Echo 
; HK July 2009 
; version 2.0 
; 
; mono in mono out 
; pot0 = feedback amount (from no feedback = slap back to infinite feedback) 
; pot1 = delay time (50 ms to 1 second with 32 kHz x-tal) 
; pot2 = dry - wet mix 
; 
; only 20 thicks 

;declare memory spaces: 

mem   del   32767 

;declare register equates: 

equ   dout   reg0 
equ   kfbk   reg1 
equ        dry_in    reg2 

;get feedback value from pot0: 

wrax   kfbk,0 
rdax   pot0,1 
wrax   kfbk,0 

;get address pointer from pot1: 

rdax   pot1,1 
and   %01111110_00000000_00000000   ;don't make jumps too small 
sof   61/64,3/64         ;50 ms to 1 second 
wrax   addr_ptr,0 

;get output from delay: 

rmpa   1 
wrax   dout,0 

;put input signals into delay, allowing for feedback: 

rdax   dout,1 
mulx   kfbk    
rdax   adcl,0.5 
rdax   adcr,0.5 
wrax      dry_in, 1 
wra   del,0 

; mix dry and wet using pot2 

rdax   dout,1 
rdax   dry_in,-1 
mulx   pot2 
rdax   dry_in,1 

;form mono output: 

wrax   dacl,1 
wrax   dacr,0 

Maybe I am going about the process incorrectly. How could I integrate an octave up into this code? I would need another mem block for the octave up delay so it wont write over the del (as you explained before).

Using the SpinCAD software, I was able to generate an octave up code:

Code: Select all


;Octave
RDAX ADCL,1
ABSA
WRAX REG0,0
;Output
RDAX REG0,1
WRAX DACL,0
Notice the absa line I was using before. This works great as an octave up but how do I apply this to the delay tails and write that to a new memory block?

Any input would be greatly appreciated!
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

You don't need another memory block, the result from absa is the octave up so just do the mix between the delay and the absa result.
Frank Thomson
Experimental Noize
Aaron
Posts: 54
Joined: Wed Mar 04, 2015 8:10 pm
Location: Oklahoma

Post by Aaron »

You can get a little cleaner octave up by squaring your input as opposed to taking the absolute value. You will need to add some gain before squaring.

Code: Select all

rdax     dout,1      ;get dout
sof     -2,0         ;increase gain
sof     -2,0         ;
sof     -2,0         ;
sof     -2,0         ;
wrax     oct,1       ;save to oct
mulx     oct         ;square oct
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

The SpinCAD "Octave Fuzz" is indeed just an ABSA and creates a lot of distortion. If you want an octave up pitch shift, get that over in the Pitch menu. Totally different sound.
Post Reply