CHO interpolation

Software questions and issues with the FV-1

Moderator: frank

Post Reply
Colin
Posts: 8
Joined: Thu Oct 23, 2014 9:58 am

CHO interpolation

Post by Colin »

I can't seem to wrap my head around this interpolation thing that two consecutive CHO RDA instructions do...

From the rom_pitch.spn:

cho rda, rmp0,reg|compc,ldel ; (1-k)*sample[addr]
cho rda, rmp0,0,ldel+1 ; k*sample[addr+1] + ACC

My understanding is that these back to back CHO instructions interpolate to a value between two actual samples... but which two? Are we interpolating between 2 ldel samples or 2 rmp0 samples? Are the k fractional bits from ldel or rmp0?

I have to assume that every instruction in a .spn file is exectued on every clock cycle... therefore, ldel in the first CHO is the same value as ldel+1 in the second CHO, because 1 clock cycle has elapsed and another sample was added to the beginning of ldel. Is this correct???
--Colin
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

The two adjacent samples are:

sample[addr]
and
sample[addr + 1]

these are ldel[rmp0] and ldel[rmp0 + 1].

k is the fractional part of the extended resolution of the LFO signals that is only used here (you can't access it directly). So they are part of the RMP0 LFO. Note that the ramp LFO can be set such that it takes multiple sample intervals for the LFO value itself to increment.

The memory in question is ldel.

ALL instructions in a program are executed every sample period, not just one. A sample period contains enough clock cycles for 128 instructions.
Last edited by Digital Larry on Tue Nov 18, 2014 5:58 pm, edited 1 time in total.
Colin
Posts: 8
Joined: Thu Oct 23, 2014 9:58 am

Post by Colin »

So, I'm guessing that when an LFO is initialized, an array of values representing a ramp or sine wave is populated, correct?

When the REG bit is invoked in the argument of CHO RDA, does this simply increment a pointer to the LFO array?

I still don't see why we need to interpolate between sample(n) and sample(n-1), or how the fractional bits from the LFO accomplish this...
--Colin
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Colin wrote:So, I'm guessing that when an LFO is initialized, an array of values representing a ramp or sine wave is populated, correct?
Nope, the LFO is a running algorithm in hardware, not table based.
Colin wrote:When the REG bit is invoked in the argument of CHO RDA, does this simply increment a pointer to the LFO array?
No, it captures the value of the LFO at a point in time to use in multiple instructions, we don't want to have it change between instructions.
Colin wrote:I still don't see why we need to interpolate between sample(n) and sample(n-1), or how the fractional bits from the LFO accomplish this...
For "why" and "how" you should pick up a basic DSP book, interpolation is a subject that has many aspects to it.
Frank Thomson
Experimental Noize
Colin
Posts: 8
Joined: Thu Oct 23, 2014 9:58 am

Post by Colin »

Ok, I think the essence of my confusion was believing the LFO to be a LUT. So much more sense this makes :D
--Colin
Post Reply