Spin Semiconductor Forum Index Spin Semiconductor
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Octave +/- 1

 
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development
View previous topic :: View next topic  
Author Message
adventure_audio



Joined: 02 Feb 2015
Posts: 11

PostPosted: Thu May 17, 2018 1:09 pm    Post subject: Octave +/- 1 Reply with quote

Can anyone point out why this code isn't working? Maybe I've been staring at it too long:

Code:
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
Back to top
View user's profile Send private message
frank



Joined: 19 Oct 2005
Posts: 988

PostPosted: Fri May 18, 2018 9:34 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
adventure_audio



Joined: 02 Feb 2015
Posts: 11

PostPosted: Fri May 18, 2018 10:12 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
frank



Joined: 19 Oct 2005
Posts: 988

PostPosted: Fri May 18, 2018 4:29 pm    Post subject: Reply with quote

;------ 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
Back to top
View user's profile Send private message Visit poster's website
Digital Larry



Joined: 12 Nov 2012
Posts: 278

PostPosted: Sat May 19, 2018 8:51 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group