Audio input as delay modulation source?
Posted: Thu Mar 23, 2017 6:34 am
Hi
So I'm trying to use the incoming audio signal to modulate a vibrato effect (instead of using an LFO).
My idea was to set sin0 to 0Hz, write the audio to sin0_range and use the cosine (max at zero?) as the modulation source for the vibrato (delay).
My code does not create any vibrato, but here it is anyways:
In not at all sure where to go from here as I can't seem to find any resources on modulating the delay directly.
Any suggestions?
So I'm trying to use the incoming audio signal to modulate a vibrato effect (instead of using an LFO).
My idea was to set sin0 to 0Hz, write the audio to sin0_range and use the cosine (max at zero?) as the modulation source for the vibrato (delay).
My code does not create any vibrato, but here it is anyways:
Code: Select all
; Self modulation FM
;
; Pot0 = SMOD Level
; Memory declarations:
mem chodel 1024
; Registers:
equ temp reg0 ; Temporary value reg
skp run, START
; lfo freq amp
wlds SIN0, 0, 0 ; Write & Load sin0 at 0Hz
START:
; Input to chorus:
ldax adcl ; Read left input
wra chodel, 1 ; Write to head of chorus delay line, keep value in acc
; Prepare modulation source:
sof -2, 0 ; compress and (potentially) clip signal
sof 0.03, 0.5 ; Range 0.5 +/- 0.03
mulx pot0 ; Add depth ctrl
mulx pot0 ; Square depth ctrl
wrax sin0_range, 0 ; Load into sin0 range register, clear ACC
wrax sin0_rate, 0 ; Load 0 into sin0 rate reg, clear ACC
; Do chorus lines:
cho rda, SIN0, COS|REG|COMPC, chodel^
cho rda, SIN0, COS, chodel^+1
wrax dacl, 0 ; Write result to left output
Any suggestions?