trying to make a feedback loop - connect the input to the output. It can be done with hardware I know but I would like to do it with code. any idea? looking to have one of the pots control the level of feedback.
thanks!
feedback loop
Moderator: frank
Just write the final output to a register as well as the DAC then in the code read the register where you want the feedback.
Frank Thomson
Experimental Noize
Experimental Noize
thats what im trying but when I have the knob controlling the feedback also controls the effect level when I try that
heres the relevant part of the code im working on
heres the relevant part of the code im working on
Code: Select all
ldax adcl
rdax fbk,1
wra delayl,0
cho rda,RMP0,REG|COMPC,delayl
cho rda,RMP0,,delayl+1
wra temp,0
cho rda,RMP0,RPTR2|COMPC,delayl
cho rda,RMP0,RPTR2,delayl+1
cho sof,RMP0,NA|COMPC,0
cho rda,RMP0,NA,temp
wrax fbk,0
rdax fbk,1
mulx pot1
wrax dacl,0
Do you want the pot to control both? If not then do the mulx at the top where you read the feedback not at the bottom where you write it to a register. Basically:
.
.
rdax fbk,1
mulx pot1
wra delayl,0
.
.
.
wrax fbk, 1.0
wrax davl, 0
.
.
rdax fbk,1
mulx pot1
wra delayl,0
.
.
.
wrax fbk, 1.0
wrax davl, 0
Frank Thomson
Experimental Noize
Experimental Noize
ok Ive got this and im still having the same problem. no sound with pot1 turned all the way down
Code: Select all
lldax ADCL
rdax fbk,1
mulx pot1
wra delayl,0
cho rda,RMP0,REG|COMPC,delayl
cho rda,RMP0,,delayl+1
wra temp,0
cho rda,RMP0,RPTR2|COMPC,delayl
cho rda,RMP0,RPTR2,delayl+1
cho sof,RMP0,NA|COMPC,0
cho rda,RMP0,NA,temp
wrax fbk,1
wrax DACL,0
Look at the first three lines of your program and think about what is happening to the accumulator.
Frank Thomson
Experimental Noize
Experimental Noize
aha! got it! thanks a million frank
Code: Select all
ldax adcl
rdax fbk,.6
mulx pot1
rdax adcl,1
wra delayl,0
cho rda,RMP0,REG|COMPC,delayl
cho rda,RMP0,,delayl+1
wra temp,0
cho rda,RMP0,RPTR2|COMPC,delayl
cho rda,RMP0,RPTR2,delayl+1
cho sof,RMP0,NA|COMPC,0
cho rda,RMP0,NA,temp
wrax fbk,1
wrax DACL,0
Close, and will sound almost right but remove the first 4 lines and replace with:
ldax fbk
mulx pot1
rdax adcl,1
ldax fbk
mulx pot1
rdax adcl,1
Frank Thomson
Experimental Noize
Experimental Noize