Jump to content

Log to lin pot conversion using lookup table????


mikee

Recommended Posts

Hello all you MB nuts.

I am a newbee, (very first post) constructing a Midibox64, but I want to use some excellent log-law pots which have been gathering dust for aeons.

Midibox converts analog values from controller pots to MIDI-compatable data (integers in the range of 0 to 127). It assumes the use of lin pots, and applications such as Ableton Live must automatically convert all controller data, which are meant for volume faders, into log law.

I would like to insert a look-up table (approx 128 lines of code) and a call to the table as soon as any pot changes, the table is filled with linear values for conversions. The end result would be outputted MIDI data with corrected (linear) values from logarithmic audio taper pots.

I wonder if anyone might help with some questions:

Is there sufficient room left in a pic18f452 for such a table, and if so what other problems should I be aware of?

Am I correct in assuming the following functions are required:

MIOS_AIN_Pin7bitGet

MIOS_AIN_PinGet

MIOS_AIN_PinLSBGet

MIOS_AIN_PinMSBGet

I hope this all makes some sense to someone.

thanks and best regards to all.

***  I have just realised that a search under "logarithic" almost provides the answer:

http://www.midibox.org/forum/index.php/topic,1182.0.html

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...