Octave +/- 1

Algorithm development and general DSP issues

Moderator: frank

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

Octave +/- 1

Post by adventure_audio » Thu May 17, 2018 2:09 pm

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

frank
Posts: 991
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank » Fri May 18, 2018 10:34 am

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.
Frank Thomson
Experimental Noize

adventure_audio
Posts: 12
Joined: Mon Feb 02, 2015 8:19 pm

Post by adventure_audio » Fri May 18, 2018 11:12 am

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.

frank
Posts: 991
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank » Fri May 18, 2018 5:29 pm

;------ 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
Frank Thomson
Experimental Noize

Digital Larry
Posts: 279
Joined: Mon Nov 12, 2012 12:12 pm
Contact:

Post by Digital Larry » Sat May 19, 2018 9:51 am

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.

adventure_audio
Posts: 12
Joined: Mon Feb 02, 2015 8:19 pm

Post by adventure_audio » Mon May 21, 2018 1:25 pm

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?

potul
Posts: 18
Joined: Tue Sep 26, 2017 12:33 am

Post by potul » Tue May 22, 2018 5:04 am

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.

Post Reply