Simple Vibrato

Algorithm development and general DSP issues

Moderator: frank

Post Reply
Philcaster
Posts: 4
Joined: Mon Feb 24, 2020 2:12 pm

Simple Vibrato

Post by Philcaster »

A friend asked me to put a vibrato patch on an FV-1 pedal I made for him. Surprisingly, I didn't see any ready to go patches online, so I made my own. This is about as simple as it could be, basically just following the AN-0001 document. I was surprised by how much I enjoyed this effect too, since writing it for him it's on my own pedal and I use it quite a bit.

Code: Select all

;
; Phil's vibrato code (simple, based on AN-0001)
;
;pot0 = speed
;pot1 = depth
;pot2 = nothing

mem delay 32767

;-----setup sine wave-----
skp run, endsetup 
wlds sin0, 50, 64 		;freq = 2Hz [kf=2^17*(2piF/R)], Delay Length = 32 samples [Ka = N*32768/16385]
endsetup:    

;-----read pot0 (rate)-----
ldax pot0		                     
sof 0.4, 0.1			;limit range 0.1 to 0.5 (2Hz to 10Hz)
wrax sin0_rate, 0		;write sin0 rate


;-----read pot1 (depth)-----
rdax pot1, 0.003		;limit pot1 range 0 to 0.003 (Ka(dec) = Ka/32768.  So Ka range is 0 to 98.3 (0 samples to 49 samples)
wrax sin0_range, 0		;write sin0 range


;-----do pitch shift-----
ldax adcl
wra delay, 0		;write input to delay head

cho rda, sin0, sin|reg|compc, 100	; 
cho rda, sin0, sin, 101			;interpolate between sin output of 100 and 101 (no chance of 49 samples colliding with delay head)

wrax dacl, 0				;write pitch vibrato to output
Post Reply