Page 1 of 1

Octave +/- 1

Posted: Thu May 17, 2018 2:09 pm
by adventure_audio
Can anyone point out why this code isn't working? Maybe I've been staring at it too long:

Code: Select all

delayd mem 4096 ; Down delay 
temp mem 1 ; Temp location for partial calculations 
;
SKP RUN ,START
;
wldr RMP0,16384,4096 
wldr RMP1,-8192,4096 
;
START: LDAX ADCL 
; Write it to left delay and clear ACC 
wra delayd,0 
; 
CHO RDA, RMP0,REG | COMPC,delayd
CHO RDA,RMP0,0,delayd+1
WRA temp,0
CHO RDA,RMP0,RPTR2 | COMPC,delayd
CHO RDA,RMP0,RPTR2,delayd+1
CHO SOF,RMP0,NA | COMPC,0
CHO RDA,RMP0,NA,temp
WRAX REG0,0
;
CHO RDA,RMP1,REG | COMPC,delayd
CHO RDA,RMP1,0,delayd+1
WRA temp,0
CHO RDA,RMP1,RPTR2 | COMPC,delayd
CHO RDA,RMP1,RPTR2,delayd+1
CHO SOF,RMP1,NA | COMPC,0
CHO RDA,RMP1,NA,temp
WRAX REG1,0
;------ Pot 0
;------ Pot 1
;------ Crossfade
RDAX REG1,1
RDAX REG0,-1
MULX POT0
RDAX REG0,1
WRAX REG2,0
;------ Crossfade
RDAX REG2,1
RDAX ADCL,-1
MULX POT1
LDAX ADCL
WRAX REG3,0
;------ Output
RDAX REG3,1
WRAX DACL,0

Posted: Fri May 18, 2018 10:34 am
by frank
Your pitch routine is fine but the mix routines make no sense to me. Comments in the code stating what you are trying to do help. Without comments there is nothing I can suggest.

Posted: Fri May 18, 2018 11:12 am
by adventure_audio
Pot 0 controls the crossfade between -1 octave and +1 octave i.e. REG0 and REG1.

Then I am writing that output to REG2. Then I want Pot 1 to control the wet dry mix between ADCL and REG2. I am writing that to REG3 and sending that to DACL.

Posted: Fri May 18, 2018 5:29 pm
by frank
;------ Crossfade
RDAX REG2,1
RDAX ADCL,-1
MULX POT1
LDAX ADCL <<<<<<<<<<<<< should be: RDAX ADCL, 1
WRAX REG3,0
;------ Output
RDAX REG3,1
WRAX DACL,0

Posted: Sat May 19, 2018 9:51 am
by Digital Larry
Freaked me out there, thought there was a bug in that SpinCAD block but I checked the source and I don't think so - don't see LDAX in there and I've used the crossfade block a fair amount.

Posted: Mon May 21, 2018 1:25 pm
by adventure_audio
Ok cool. It works now but here is the weird thing. I have two of the same unit that both work with some other stock reverb code. But when I flash the 24LC32A with this code, it works in one but does not work in the other.

Again, a different reverb code worked in both. But with this octave code, only one consistently works. A creeping suspicion I have is because I am overclocking the FV-1 with a 68kHz crystal in order to make the pre delay on the octave a little shorter. Do you think that has something to do with it?

Posted: Tue May 22, 2018 5:04 am
by potul
adventure_audio wrote:Ok cool. It works now but here is the weird thing. I have two of the same unit that both work with some other stock reverb code. But when I flash the 24LC32A with this code, it works in one but does not work in the other.

Again, a different reverb code worked in both. But with this octave code, only one consistently works. A creeping suspicion I have is because I am overclocking the FV-1 with a 68kHz crystal in order to make the pre delay on the octave a little shorter. Do you think that has something to do with it?
Difficult to say with this information. I would verify the connection of both channels in the 2 hardware units. This code uses only Left channel for both input and output. This could be a reason why other code works well, but this one fails.