Multiply them all by 1.5 before sending them?
byte eightBitValue = ...int twelveBitValue = (int)eightBitValue << 4;
surely all it would need would be something along the lines of:Code: [Select]byte eightBitValue = ...int twelveBitValue = (int)eightBitValue << 4;
I'm working on an LFO which has it's waveforms stored in 8-bit arrays. What would be the best way to interpolate the values in those tables to output to a 12-bit DAC?
That would still only give 256 values. I need 4096 values, filling in all the spaces left out from the 8-bit table. Need a way of interpolating between each value in the table.
Majenko??? Why 1.5?, the data was literally converted to an uint_8 value when it was 'clipped' to fit into 8 bits. The additional resolution simply isn't there anymore. Or did I just make a BIG assumption?. Or is it just to make the data 10 bits long again? I really don't understand this at all.Doc
Pointer12Bit = Derive12BitPointer(Pointer)Pointer8Bit = Derive8BitPointer(Pointer12Bit)DeltaMagnitude = Array[(Pointer8Bit+1) & 0xFF] - Array[Pointer8Bit] DeltaPhase = Pointer12Bit & 0xFDACOutputValue = (Array[Pointer8Bit] << 4) + DeltaMagnitude * DeltaPhase