delay program with infinite repeats, no 100percent feedback

Software questions and issues with the FV-1

Moderator: frank

Post Reply
sandromatik
Posts: 27
Joined: Wed May 18, 2011 11:47 am

delay program with infinite repeats, no 100percent feedback

Post by sandromatik »

Hi Frank and everyone here.
I just received my programming board,
copying and pasting bits of code, I come up with this program posted below.
It kind of works, but the problem here is that when I change delay pointer in "HOLD mode", the program keeps repeating ALL the delay ram..
It moves the read pointer, but that does not change the actual delay time,
(as it normally does when reading ADCL and writing it to delay RAM)
I can t figure out why it works like I described..
Any idea on how to fix this is welcome,
thanks in advance
Sandro


Code: Select all

;DELAY copied from eeprom prog5, with infinite loop
;no feedback and filter

;POT0     infinite repeat switch, when activated program does not write 
;adcl to delay memory and keeps repeating its RAM content
;POT1     delay read pointer

mem	delay	       32767

equ	pfil1	        reg0
equ	pfil2	        reg1
equ	nxtadd	reg2
equ	interp	reg3
equ	temp	        reg4
equ	dout1	reg5
equ	dout2	reg6
equ   hold          reg7


;check pot0 value to choose between "hold" or normal delay
 
clr
rdax	pot0,1		;read pot value
sof	0.1,-0.1	        ;trimm pot0 range in order to use it with SKP GEZ
wrax	hold,1		;write hold register, keep in ACC
skp   gez,3                ;skip next 3 lines if ACC is positive


;read input and write to delay:

clr
rdax	adcl,1	        ;read left input	
wra	delay,0		;write result to delay

;prepare read pointer based on pot1 setting:

rdax	pot1,1		;read pot value
sof	0.98,0.02	        ;limit delay range
rdfx	pfil1,0.001 	;filter pot value
wrax	pfil1,1		;write filter register, keep in ACC
rdfx	pfil2,0.001
wrax	pfil2,1
wrax	addr_ptr,0 	;load address pointer with first read position
rmpa	1		        ;read memory from pointer position
wrax	dout1,0		;store first value, clear ACC

;now get second  value:

or	%00000000_00000001_00000000	
rdax	pfil2,1		;get pointer back and add
wrax	addr_ptr,0	        ;load pointer again
rmpa	1
wrax	dout2,0		;store second value, clear accumulator

;now get an interpolation value:

rdax	pfil2,1
and	%00000000_00000000_11111111
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0
sof	-2,0		
sof	1.999,0		;shift 15 paces
wrax	interp,0	        ;save in register

;now crossfade between delay read values using interp value:

rdax	dout2,1
rdax	dout1,-1
mulx	interp		;crossfade with interp
rdax	dout1,1

wrax	dacl,1		;write result to left DAC
sandromatik
Posts: 27
Joined: Wed May 18, 2011 11:47 am

Post by sandromatik »

When the "hold" or "infinite repeats" function is activated (with pot0),
the program stops writing ADC data in to the delay ram, and this works pretty well.
My problem now is that the read pointer also stops changing the delay time...! :-)

it just moves forward or backward following the pot,
but the delay time does not change.
It just keep reading the entire delay ram in loop even with the shortest settings of delay time (pot1)

when "hold" is off, the delay behaves normally.

How would you fix this ?
Do I need something to control the "readable" delay ram when hold is activated...?
or somethign else??

thank you very much
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Well, it is operating as expected. If you want to only hear a portion then when in hold you will want to read from the pointer and write to the head of the delay. But if you change the length of the pointer while in hold it will cause a glitch in the looped audio. If you want to hold and change the delay time when in hold then you need to do much more complex address manipulation.
Frank Thomson
Experimental Noize
sandromatik
Posts: 27
Joined: Wed May 18, 2011 11:47 am

Post by sandromatik »

Thanks Frank.

Please, which would be the basic structure for a program capable of changing time when in hold?
I mean, in a few words, just to have something to start from.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Really no way to describe it in only a few words and I do not think the FV-1 is capable of it. The FV-1 is based on a completely circular memory architecture, to adjust delay length during hold would require a combination of circular and static pointers.
Frank Thomson
Experimental Noize
sandromatik
Posts: 27
Joined: Wed May 18, 2011 11:47 am

Post by sandromatik »

I see, OK thanks Frank
Post Reply