You can get a good approximation to a triangle wave using this formula
( 1 - abs(sin(t)) ) ^ 0.564476
The power is chosen to give best linearity based on the value at the halfway point.
Due to the limited floating point ranges on the FV-1, I had to slightly tweak the numbers.
Here's the code
Code: Select all
CHO RDAL,SIN0 ; Read sin0 LFO value (-1 to +1)
ABSA ; Take absolute value
SOF -0.999,0.999 ; ACC = 0.999( 1 - abs(sin(t)) )
LOG 0.564831,0
EXP 1,0 ; ACC contains triangle wave (0 to 1)