Reading from the middle of a delay

Algorithm development and general DSP issues

Moderator: frank

Post Reply
Sweetalk
Posts: 141
Joined: Thu Oct 15, 2009 5:13 am

Reading from the middle of a delay

Post by Sweetalk »

Quick question. I have a delay block and I want to read from the end and from the middlepoint of it. To do that I use:

Code: Select all

rda   del#,  1         ;Reading from the end of del
rda   del$, 1             ;Reading from the middlepoint
In the Spin knowledge base says and quote:
Notes:

when writing to a delay, do so to the address label
when reading the end of the delay, do so to the address label terminated with a #, as in del1#
when reading the midpoint of a delay, do so to the address label terminated with a $, as in del1$
But when I use it the SpinAsm tells me that the modificator "$" is unrecognized or obsolete. Is there any way to read a midpoint of a memory block?

Bests!!
Sweetalk
Posts: 141
Joined: Thu Oct 15, 2009 5:13 am

Post by Sweetalk »

Well, I'll put another question just to not open another topic.

If I have 2 delay memory blocks and I want to use the address pointer to read in a point of them how can I wich memory block the addr_ptr is pointing to? or it's pointing all the memory blocks at the same time at the same coefficient of the total memory avaiable?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Keith used an old syntax in that example, the proper syntax to read from the middle of a delay is:

delay^

You can also offset it like:

delay^+20
delay^-10

addr_ptr can be loaded with the desired address to read/write. Memory locations defined like:

mem delayname 100

will cause SpinAsm to define the symbol delayname with the address that the memory block starts at. So later in the code you can use delayname and load it into the addr_ptr register to read from memory.
Frank Thomson
Experimental Noize
Sweetalk
Posts: 141
Joined: Thu Oct 15, 2009 5:13 am

Post by Sweetalk »

frank wrote:Keith used an old syntax in that example, the proper syntax to read from the middle of a delay is:

delay^

You can also offset it like:

delay^+20
delay^-10

addr_ptr can be loaded with the desired address to read/write. Memory locations defined like:

mem delayname 100

will cause SpinAsm to define the symbol delayname with the address that the memory block starts at. So later in the code you can use delayname and load it into the addr_ptr register to read from memory.
Great!!. I didn't understand how can I load the addr_ptr to a specific memory block
veqtor
Posts: 2
Joined: Mon Oct 24, 2011 3:24 am

Post by veqtor »

Sweetalk wrote:
frank wrote:Keith used an old syntax in that example, the proper syntax to read from the middle of a delay is:

delay^

You can also offset it like:

delay^+20
delay^-10

addr_ptr can be loaded with the desired address to read/write. Memory locations defined like:

mem delayname 100

will cause SpinAsm to define the symbol delayname with the address that the memory block starts at. So later in the code you can use delayname and load it into the addr_ptr register to read from memory.
Great!!. I didn't understand how can I load the addr_ptr to a specific memory block

if I have:
mem delL 8148
mem delR 8148

I can do rdax delL,1 but when I try delR I get
<0000>[ Pass 2] [ 1006] Line: 37 "rdax delR,1 " - ERROR:Address register out of range - REG

It only works when i set the delays to really small like 40.

Any work-around?

For now I use the cosine of a stationary SIN/COS lfo to provide a pointer using a CHO RDA which seems a bit wasteful.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Please post your complete code or email it to support, I'll try it here to see what is going on.
Frank Thomson
Experimental Noize
curt
Posts: 2
Joined: Sat Jan 02, 2010 8:59 pm

Post by curt »

veqtor wrote:I can do rdax delL,1 but when I try delR I get
<0000>[ Pass 2] [ 1006] Line: 37 "rdax delR,1 " - ERROR:Address register out of range - REG

It only works when i set the delays to really small like 40.
rdax reads from registers. You want to use rda for delay lines.
Post Reply