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???
CHO interpolation
Moderator: frank
-
- Posts: 338
- Joined: Mon Nov 12, 2012 1:12 pm
- Contact:
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.
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.
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...
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
Nope, the LFO is a running algorithm in hardware, not table based.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?
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:When the REG bit is invoked in the argument of CHO RDA, does this simply increment a pointer to the LFO array?
For "why" and "how" you should pick up a basic DSP book, interpolation is a subject that has many aspects to it.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...
Frank Thomson
Experimental Noize
Experimental Noize