Can a triangle LFO be used in chorus?

Software questions and issues with the FV-1

Moderator: frank

Post Reply
Pando
Posts: 3
Joined: Wed Nov 21, 2018 10:31 am

Can a triangle LFO be used in chorus?

Post by Pando »

Hello, I need to create a chorus that uses triangle, not sine LFO. This is to ensure that there is always a movement in sound (sine is not ideal as there is a brief pause when the waveform reverses direction). It is replicating a BBD-based vintage chorus that has a triangle LFO.

In code examples there is a ramp LFO that can be converted to a triangle waveform, but how can this waveform be used in a chorus?

cho rdal,rmp0 ;read LFO saw wave, accumulator value will range from 0 to 0.5
sof 1,-0.25 ;offset by -0.25, giving a saw wave that ranges from -0.25 to +0.25
absa ;flip negative to positive, creating triangle wave 0 to +0.25
sof 1,-0.125 ;make it bipolar -0.125 to +0.125 for chorus

When using CHO RDA, only SINx or RMPx are accepted. Is it possible to use the ramp-converted-to-triangle in the accumulator somehow?

Thank you
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: Can a triangle LFO be used in chorus?

Post by frank »

Short answer is no, you cannot use a wave in the acc as the source wave.

Long answer is you would have to do all the steps in a chorus yourself using a triangle wave you generate then splitting the address and coefficient portions, reading in the values from memory and interpolating them using the coefficient.
Frank Thomson
Experimental Noize
Pando
Posts: 3
Joined: Wed Nov 21, 2018 10:31 am

Re: Can a triangle LFO be used in chorus?

Post by Pando »

Thank you, Frank, for your quick reply. So as I understand it, I will need to recreate the functionality in code normally contained within a single CHO instruction.

I'm trying to find some coding examples how to accomplish this, as I just started learning this chip. Are there any online that may be similar that points in the general direction?

Many thanks
igorp
Posts: 65
Joined: Tue May 19, 2015 6:10 am
Location: RU

Re: Can a triangle LFO be used in chorus?

Post by igorp »

Ramp LFO (DDS) is only several lines of code, then it can be mirrored to triangle, then you can use servo technique to move pointer
Pando
Posts: 3
Joined: Wed Nov 21, 2018 10:31 am

Re: Can a triangle LFO be used in chorus?

Post by Pando »

igorp wrote: Fri Nov 23, 2018 3:38 am Ramp LFO (DDS) is only several lines of code, then it can be mirrored to triangle, then you can use servo technique to move pointer
Yes, but the servo technique uses RMP which I can't use to move the pointer (need to use the triangle in the ACC).
The proper technique still eludes me how to do that.
igorp
Posts: 65
Joined: Tue May 19, 2015 6:10 am
Location: RU

Re: Can a triangle LFO be used in chorus?

Post by igorp »

Servo uses RMP to get precise data addressed by any address source. Triangle DDS can be used too. You may use RMP1 if RMP0 is used.
Or write own DDS and do not use hardware RMPs. DDS LFO example is below.
Pot_char - your rate pot, RRR = DDS register.

Code: Select all

; some Astronaut-3 snippets
	or 	0x600		; [Scale] Подсчет приращения по потенциометру
	mulx 	pot_char
	mulx 	pot_char
	wrax 	temp, 0
	or 	0x08		; minimal rate 0x4 T=8sec, 0x1 T=32 Sec
	rdax	temp , 1

	rdax	RRR,1	; DDS
	and	0x3FffFF
	wrax	RRR,1	; Ramp 0..0.5
	sof	-2 , 0.5 .   ; -0.5 .. +0.5
	absa			; triangle output [0..0.5] OK

DamianGr
Posts: 2
Joined: Wed Jun 12, 2019 2:01 pm

Re: Can a triangle LFO be used in chorus?

Post by DamianGr »

igorp wrote: Thu Jan 31, 2019 6:37 am Servo uses RMP to get precise data addressed by any address source. Triangle DDS can be used too. You may use RMP1 if RMP0 is used.
Or write own DDS and do not use hardware RMPs. DDS LFO example is below.
Pot_char - your rate pot, RRR = DDS register.

Code: Select all

; some Astronaut-3 snippets
	or 	0x600		; [Scale] Подсчет приращения по потенциометру
	mulx 	pot_char
	mulx 	pot_char
	wrax 	temp, 0
	or 	0x08		; minimal rate 0x4 T=8sec, 0x1 T=32 Sec
	rdax	temp , 1

	rdax	RRR,1	; DDS
	and	0x3FffFF
	wrax	RRR,1	; Ramp 0..0.5
	sof	-2 , 0.5 .   ; -0.5 .. +0.5
	absa			; triangle output [0..0.5] OK

Nice code . The Triangle looks good on my osciloscope. However, I do not understand for any treasures how to scale the amplitude of the waveform to use it in the servo delay. Trying to create an effect similar to Dimension D. I have two delay lines using Ramp0 and Ramp 1 with 4096 samples each. Let's say that Pot0 is to scale the depth of modulation(0-1), or the amplitude of the triangle. How do you calculate a multiplier to calibrate a triangle to modulate RAMP0 in the range of 0 4096?
DamianGr
Posts: 2
Joined: Wed Jun 12, 2019 2:01 pm

Re: Can a triangle LFO be used in chorus?

Post by DamianGr »

Here is my code :
mem chordel 4096

equ temp REG16
equ RRR REG17
equ triangle REG18
equ inv_triangle REG19
equ mod_depth REG20
equ in_signal REG0
equ dly1_out REG1
equ dly2_out REG6
equ rate_pot POT0


;------ Input
;------ Mixer 2:1
RDAX ADCL,1.0000000000 ;read left
RDAX ADCR,1.0000000000 ;read right
WRAX in_signal,0.0000000000 ;sum and put into reg0

;------ read pot modulation depth
rdax pot1,1 ; mod depth pot1
mulx pot1
mulx pot1
wrax mod_depth,0

;------triangle generator

or 0x600 ; [Scale] ??????? ?????????? ?? ?????????????
mulx rate_pot
mulx rate_pot
wrax temp, 0
or 0x08 ; minimal rate 0x4 T=8sec, 0x1 T=32 Sec
rdax temp , 1

rdax RRR,1 ; DDS
and 0x3FffFF
wrax RRR,1 ; Ramp 0..0.5
sof -2 , 0.5 . ; -0.5 .. +0.5
absa
wrax inv_triangle,1
mulx mod_depth ; triangle output [ ] OK
wrax triangle,0
rdax inv_triangle,1
sof -1,0.5
mulx mod_depth
wrax inv_triangle,0


;------ Servo 1
SKP RUN ,1
WLDR 0, 0, 4096
CLR
RDAX in_signal,1.0000000000
WRA 0,0.0
CHO RDAL,RMP0
RDAX triangle, -1
WRAX RMP0_RATE,0.0000000000
CHO RDA,RMP0,REG | COMPC,0
CHO RDA,RMP0,0,1
WRAX dly1_out,0.0000000000

;------ Servo 2
SKP RUN ,1
WLDR 1, 0, 4096
CLR
RDAX in_signal,1.0000000000
WRA chordel+1,0.0
CHO RDAL,RMP1
RDAX inv_triangle,-1
WRAX RMP1_RATE,0.0000000000
CHO RDA,RMP1,REG | COMPC,chordel+1
CHO RDA,RMP1,0,chordel+2

[/code]
igorp
Posts: 65
Joined: Tue May 19, 2015 6:10 am
Location: RU

Re: Can a triangle LFO be used in chorus?

Post by igorp »

you need one buffer for servo and two triangle LFOs with shifted 180 degrees phase

so, starting coefficient or RRR1 must be 0, for RRR2 - 0.25
Post Reply