Page 1 of 1

(1-k)*sample[addr]

Posted: Tue Jul 06, 2021 2:23 pm
by khalilbms
hello
what means (1-k)*sample[addr] ??
thank you

Re: (1-k)*sample[addr]

Posted: Tue Jul 06, 2021 4:52 pm
by frank
Without seeing the code, the context, etc. there is no way to really answer the question.

Re: (1-k)*sample[addr]

Posted: Wed Jul 07, 2021 1:26 am
by khalilbms
; Untitled
; null
; Pot 0:
; Pot 1:
; Pot 2:
;
;
; ----------------------------
;------ Input
;------ Pot 2
;------ Pot 1
;------ Pitch Shift
SKP RUN ,1
WLDR 0, 8192, 4096
LDAX ADCL
WRA 0,0.0
RDAX POT1,0.2500000000
WRAX RMP0_RATE,0.0000000000
CHO RDA,2,REG | COMPC,0
CHO RDA,2,0,1
WRA 4097,0.0
CHO RDA,2,COMPC | RPTR2,0
CHO RDA,2,RPTR2,1
CHO SOF,2,COMPC | NA,0.0
CHO RDA,2,NA,4097
WRAX REG0,0.0000000000
;------ Pitch Shift
SKP RUN ,1
WLDR 1, -10544, 4096
LDAX ADCL
WRA 4099,0.0
RDAX POT2,-0.3217773438
WRAX RMP1_RATE,0.0000000000
CHO RDA,3,REG | COMPC,4099
CHO RDA,3,0,4100
WRA 8196,0.0
CHO RDA,3,COMPC | RPTR2,4099
CHO RDA,3,RPTR2,4100
CHO SOF,3,COMPC | NA,0.0
CHO RDA,3,NA,8196
WRAX REG1,0.0000000000
;------ Output
RDAX REG0,1.0000000000
WRAX DACL,0.0000000000
RDAX REG1,1.0000000000
WRAX DACR,0.0000000000






this is the code but i am beginner so i would like understand this code ligne by ligne please !

thank you

Re: (1-k)*sample[addr]

Posted: Wed Jul 07, 2021 7:56 am
by frank
That code is generated by SpinCAD so you will have to ask them, since they did not put comments in the code it would take a long time to examine and write up what it is doing. I suggest you read the Spin assembly language PDF and examine what each instruction is doing.

Re: (1-k)*sample[addr]

Posted: Thu Jul 08, 2021 7:18 am
by potul
Where do you see the (1-k)*sample[addr] piece of code? Not in the snippet you pasted.

Re: (1-k)*sample[addr]

Posted: Thu Jul 08, 2021 9:15 am
by khalilbms
Image

this code created by SPINCAD TO ASM

I want an explanation regarding the code created by the spind cad.

and about your question , this ligne for explaine the interpolation no !!
CHO RDA,3,REG | COMPC,0 ; (1-k)*sample[addr]

Re: (1-k)*sample[addr]

Posted: Mon Jul 12, 2021 2:29 am
by Sweetalk
Go to the main Spin web page, and in the FV1 section there's a PDF "Basic of LFO's in the FV1", there's the answer to your question. :D

Re: (1-k)*sample[addr]

Posted: Mon Jun 27, 2022 11:42 am
by Digital Larry
Anyone with questions about SpinCAD, please visit the DSP section at diystompboxes.com.

At the moment I have updated my development system and have fixed a couple bugs, for the first time in 4 years, so now's a good time.

DL