Logarithmic Fader Display

I’m looking to implement fader decibel display that is logarithmic. The range is from 0.0db to -42db. The input range is 0-127. Everything is working fine but the curve of the reduction in db is linear and I need logarithmic. At the top of the fader range, the reduction is small. It increases greatly in terms of db per input change toward the bottom of the fader travel.

I can offer a code snippet. The project is large so I don’t want to send the whole thing. New to the forum. Not sure best practice for that.

Yes, this is tricky as forumlas may not work well withing Bome MIDI Translator Pro as it uses intergers only.

I would suggest that you.

  1. On the target output device or application, move the fader 1db at a time recording the db and also the fader values (by monitoring MIDI out) . You would manually be creating a table with the db value and the MIDI value.

  2. Then set up rules in a translator in Bome MIDI Translator Pro to convet the values based on incoming MIDI values from the controller. I’m not sure the display and format that you would use to send the db value to the display. Toward the bottom of the faders, we could probably do a pretty accurate mapping but toward the top, I’m not sure how much resolution we would be able to provide. There would be a lot of rules in the translator doing it this way but again, using a logarithmic formula with integer arithmetic may be problematic.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Excellent answer, Steve.

I just wanted to hear you tell me there was not a better way than what I had already discerned.

I have been multiplying everything by 100 in order to gain some precision. Other than that, I think the mapping you suggested is the only way.

It’s clumsy but I only have to do it once.

1 Like

Ended up with 65 rules. Slow and not so beautiful but works perfectly.

Thanks, Steve. Excellent support. I appreciate it.

1 Like