Dynamic Value formatting for a Bitwig Controller

Hi all. I need some guidance as to the best approach. I’m working on a Bitwig preset that is similar to this existing Bitwig Control preset, but will provide the additional functionality to be able to show the actual values for discrete parameters, such as ‘Octave’ and ‘Waveform’. What I’m struggling with at the moment is to get the correct value formatting to work. For instance, in @moss’s DrivenbyMoss extension, when there is a Polymer remote page with a parameter for the Octave, the E-1 displays -2,-1 and 0 on a standard fader control and steps through the options when turning the encoder. I’ve looked through the Driven by Moss implementation but I can’t seem to figure it out. It looks as if everything is being done in Java without any Lua scripting. I’ve been using Cursor to try get this to work, and the closest I’ve come is to get this working is being able to show “-2, -1, 0” on the E-1 display. I can’t get the standard fader control to step visually in increments, i.e when I turn the Octave encoder to “-1” the bar should immediately jump to the halfway mark, and when I turn it again to “-2” it should jump to the end of the bar.

Any advice on this would be greatly appreciated.

Discrete Test.control.js.zip (3.9 KB)

DiscreteValuesTest.epr (962 Bytes)

The texts are created directly in Bitwig via the API. Otherwise you would need to know all possible values for all possible parameters in the controller.

Thanks @moss. I’ve managed to get the actual text to come through from Bitwig correctly. What I’m struggling with is how you managed to get a continuous fader to ‘jump’ incrementally between the discrete values. I’ve tried to describe it better in this video. https://youtu.be/bcoazyvyQyo?si=bNyvwc_MN1AO0FOR

Bitwig recently (API v20) introduced the 2 methods discreteValueCount() and discreteValueNames() to RangedValue to deal with stepped parameters. If you use the Bitwig bind-API it takes care of that for you.

Thanks @moss. With this guidance and some careful debugging, I’ve managed to get it working.

1 Like