Fader Value Label Question


I have created a text label that displays the value of a fader when moved. This work perfectly when using a Midi fader with values of 1-127.

My question - I want the Midi fader to send out the values of 1-127, BUT, I want the text label to display values of 0-99. I need to figure out the math needed for scaling 1-127 into 0-99. Then where do I apply this 'script' needed for the scaling.

Any help will be greatly appreciated!

The maths is simple - it’s just a percentage calculation - 127 is 100%

Calculate percentages

Thank you for your reply and the information! I don't fully understand how to implement this calculation into OSC to achieve my desired result. Could you please describe in more detail the steps involved?

To close this topic, I wanted to post my solution in hopes it may help someone else in the future. This script to be placed in the text widgets 'value' section. Now the fader still sends out midi cc values 1-127, but the label reads only values 0-99.

var val = @{fader_Name}
return Math.round(val / 127 * 99)
1 Like

Hey Nielsen,
How did you manage to display numbers on faders? :face_holding_back_tears: :face_holding_back_tears:

Hi @BarryAllen

Maybe this can help you.

fader-exploration.json (5.7 KB)

Thank you!
This pip display and the stepping result is really useful.
I was trying to display the current value using html tho, that also works :joy:

Hi BarryAllen

Here's an example of what I ended up with. I wanted my fader to show the readout 0-99, instead of the default 0-127. So I needed to create a script placed in the Text 'value field' that would do the math for making the conversion. You can adjust the math to make the text readout whatever values you want. Let me know if this helps. Thanks for your question!
Fader Value readout.json (3.1 KB)

1 Like

PS: if you just want to simply read the value of the fader, the easy way is to create a 'text' widget and name it the same name as the fader. This will show the fader values in the text field.

Thank you!
I got it now. Greenman was also using the "text" to show the value.
It's really easy this way...I've been thinking way too complicated :joy:

:+1: we've all been there - Happy to help!