Variable max midi value needed.. how can I do this?

Hi everyone, I’m experimenting with variable effects parameters per effects type. We all know how difficult it can be to know what parameters are applicable for ech of the fx and what their purpose is.

This however I found a way to solve with the E1, go have a look at the lua code of the Blofeld preset.

But the current preset presents a new challenge: the maximum midi value I can apply to a parameter is different for each of the effects!

How can I use lua code to change the maximum midi value a parameter may have (encircled in yellow)?

Mind you, I’m perfectly able to change the maximum control value (crssoed through in red) but this is not what I’m looking for.

Hi, anyone has a solution ? I’m struggling again with this, this time to set the appropriate range of waveforms on a Roland XV, dependent on the JV- or SRX card you want to work from…

setMax() or setRange() on the message object should work. or setRange() on the value object.

Take a look at Docs - Message.

1 Like

I see, it’s not a attribute of the Control. Will check it out.

@martin,
yep this works. instead of (whereby groupMax[ contains the new MIDI max)

   control = controls.get (62) -- left Wave
    ctrlValue = control:getValue ("")
    ctrlValue:setMax (groupMax)

I now do

   control = controls.get (62) -- left Wave
    ctrlValue = control:getValue ("")
    ctrlValue:setRange (0, groupMax, 0, true)

Especial the ‘true’ at the end was needed.