[sdiy] Logs on a micro? Was: Reverse engineer an EPROM encoding?

MTG grant at musictechnologiesgroup.com
Wed Nov 13 04:27:15 CET 2013


OK, thanks for the tip. I'm *assuming* "log" is the correct word here, 
but in any event it is their "compression" technique. I was able to 
perform some tests to validate the basic operation... I created a small 
table of values that output a linear ramp from the drum machine over 
it's full range.

I'm doing the computation on a PC, not a micro, but since the result has 
to be stuffed in an 16 or 12 bit number, I need to avoid the floating 
point mess that a typical PC program would use. I need the result to be 
in a format that the drum machine understands (16-bit data, 12 of which 
are used and one of those is a sign bit).

GB

On 11/12/2013 4:05 PM, Tom Wiltshire wrote:
> You're looking for an equation to get you from linear input data to values you have to stick in the EEPROM, right?
>
> So we're looking at something like:
>
> (log2( Linear Data )+5) * 128 = EEPROM Data
>
> If you want to do such a sum on a microcontroller (Is that what you meant?), you'd do best at the PICList:
>
> http://www.piclist.com/techref/microchip/math/power/index.htm
>
> As usual for this kind of craziness, Scott Dattalo is right up there. Still, his solution suggests that you'll be looking at some kind of approximate method - he uses a lookup with interp. I suppose the other approach would be interative methods. How much time have you got?
>
> HTH,
> Tom



More information about the Synth-diy mailing list