Is posible write a Lua Logarithmic Mapper?

Ardour sets linear mapping for some instrument parameters (here more info), that create drawbacks with some plugins that use logarithmic scale. So I think, Is possible remapping linear parameters with Lua?

The key difference between linear and logarithmic mapping is how values scale. With linear mapping, moving a parameter knob halfway gives you 50% of the value. With logarithmic mapping, the curve follows a logarithmic function, which is perceptually more natural for many parameters like volume, filters, and frequency.

I need help (Ardour Lua Task Force) for make a script for resolve that inconvenience and maybe create a solution for all community.

1 Like

Hi!

On a previous post you mentioned this lua script.

Did you try it ? Is it solving the problem ?
If it’s not could you explain why/what’s not working with your issue ?

@remyzerems saddly nothing happens. And that Lua script modify velocity curves (notes) and the problem is with CC.

Oh ok…

Handling the CC notes on the lua script is only about filter the MIDI notes.
It’s done with this if instruction:

if (#d == 3 and (d[1] & 240) == 176) then – CC

So with some changes on the script you could handle the CC notes the same way it’s currently done with the MIDI notes.

Hope it helps

@remyzerems Thanks for your contribution but again nothing happens. I believe that problem is how MIDI flows from the script to plugin (Charlatan). For MIDI notes everything works well, but when I send MIDI CC messages the plugin doesn’t know to do, It’s necessary to apply MIDI learn but in that moment the communication it’s direct from hardware to plugin so the script can’t work. In this moment I give up and I found a workaround for that all: Carla VST2, cuz LV2 doesn’t show the plugin parameters.

Well, I feel bad about all this. I think the is unnecessary use a plugin host for some that is common in others DAWs. And you know now I’ve using a VST2 host for a VST3 plugin, I fell that I lost something.

I’ve create another post when the main topic is the reason for that Ardour use linear or logarithm for instrument parameters. In that post my only desire is that main developers can explain us this characteristics for documentation purposes.

Peace