Roast my delay
Posted: Mon Dec 18, 2023 7:53 am
Hi team,
My first hand-coded project is a simple delay. I am very new to DSP programming. I've put the code here. Please, critique it and let me know what best-practices I am missing. I already want to improve it by putting a low-pass filter on the Time adjustment (recently learned in another thread).
My first hand-coded project is a simple delay. I am very new to DSP programming. I've put the code here. Please, critique it and let me know what best-practices I am missing. I already want to improve it by putting a low-pass filter on the Time adjustment (recently learned in another thread).
Code: Select all
del1 mem 32767
skp run, START
START:
;put pot0 in ADDR_PTR
sof 0,0
RDAX pot0,1
WRAX ADDR_PTR,0
;clear accumulator
sof 0,0
;delay
rdax adcr,1.0
wra del1,1.0
RMPA 1
MULX pot2 ; decay remainging volume further based on POT2
wra del1,1.0 ; write delayed sound to start of delay ram again (repeats)
RMPA 1
MULX pot1 ; set 'volume' of delay signal in ACC based on POT 1
; add original signal at full volume
rdax adcr,1.0
wrax dacr,0