Midi fader: using the full lengt of a fader but with an offset and a max

95 views
Skip to first unread message

Pieter Nys

unread,
Jan 15, 2026, 10:46:55 AMJan 15
to ql...@googlegroups.com
Hi

I need to follow an actor with a moving light (tilt) from the front to he back on stage.
I like to use a midifader.  But the fader only needs to control a certain window in the dmx range:
For example; 
  • fader full down: tilt is 50%
  • fader full up  is 70%
So I can have the full resolution of the fader for controlling the fuine movement.

I can use a subgroup, but that only give me a maximum limit, not a minimum offset.

Has anybody done this before?

Thanks!

Pieter Nys
Belgium


micpool

unread,
Jan 15, 2026, 6:45:37 PMJan 15
to QLab
You need to scale the MIDI controllers output to output cc values 64-89 in response to the full MIDI fader values of 0-127.
You can either do this by writing a patch in Max, Vuo, Chataigne, OSCulator, or similar to do the scaling.

You can also do this entirely in QLab by generating a lookup table with this script:

--create 128 MIDI cues to control a lighting parameter scaled to a range


set theIndex to 0

set theMin to 127 / (100 / 50) --Max MIDI Value/ (100/ Minimum Light parameter percentage)

set theMax to 127 / (100 / 70)  --Max MIDI Value/ (100/ Minimum Light parameter percentage)

set theMIDIch to 1 --Channel of Physical MIDI controller

set theMIDIcc to 1 --Controller Number of Physical MIDI controller

set theMIDIccCh to 16 --Channel of QLab Light Binding for parameter

set theMIDIpatch to 1 --Number of MIDI patch to send MIDI  to Light Dashboard



----Do not alter anything below this line


set theStep to (theMax - theMin) / 127

tell application id "com.figure53.QLab.5" to tell front workspace

repeat with theValue from 0 to 127

make type "MIDI"

set theSelected to last item of (selected as list)

--MIDI trigger set up

set the midi command of theSelected to control_change

set the midi byte one of theSelected to theMIDIcc

set the midi byte two of theSelected to theValue

set the midi trigger of theSelected to enabled

set the midi trigger channel of theSelected to theMIDIch

--set the MIDI message to be sent by the new cue

set thelevel to theMin + theValue * theStep

set thelevel to round (thelevel) rounding to nearest

set the byte one of theSelected to theMIDIcc

set the byte two of theSelected to thelevel

set the channel of theSelected to theMIDIccCh

set the message type of theSelected to voice

set the midi patch number of theSelected to theMIDIpatch

set the command of theSelected to control_change

set the q number of theSelected to "cc" & theMIDIcc & "_" & theValue

end repeat


In the attached video the script is run and 128 MIDI  cues are created each triggered by a controller value 0-127. Each MIDI cue outputs the scaled range based on its trigger cc value.
The Midipipe pane is just a MIDI slider 
Screen Recording 2026-01-15 at 23.30.20-HD 1080p.mov

micpool

unread,
Jan 15, 2026, 6:47:43 PMJan 15
to QLab
Workspace attached with generated cues
MIDI controlled tilt look up light restrict.qlab5

micpool

unread,
Jan 15, 2026, 7:26:20 PMJan 15
to QLab
There is one obvious problem with this approach. You only have a range of integer  MIDI controller values between 64 and 89 i.e 26 steps to tilt your light the entire depth of your stage (50to 70%). If the depth is 10m, each step is going to move the  light 40 cm so the resulting control will be quite coarse.  If the tilt on your moving light is 16 bit (2 DMX channels 65,536 step resolution) then controlling this with a 7 bit controller (128 steps) is not ideal. If you want to use MIDI then a pitch wheel 16384 steps might be more appropriate. Unfortunately this means that the MIDI control can't be scaled directly in QLab and you will have to build a MIDI to DMX scaler in a third party programme like MAX.






On Thursday, January 15, 2026 at 3:46:55 PM UTC pie...@pnpbv.com wrote:

Weaselspoon

unread,
Jan 16, 2026, 5:21:28 AMJan 16
to QLab
Hello,

I think instead of mapping the fader to a smaller set of MIDI values, I'd map the available set of DMX values to the fader.

So 128 cues mapping (fader at 0) to (tilt at lowest), (fader at 127) to (tilt at highest) and so (fader at #) to (lowest+(#x(highest-lowest/127))).

I'd start by going to this excellent page in the cookbook: https://qlab.app/cookbook/mind-bending-midi-binding/ (also, I believe, by Mic Pool)

If the tilt is 8-bit, you're going to have about 52 values (127-179) to play with, so every value you could have will map to several values of the fader. Using Mic's example, that means every step will be about 20cm, but that's the limit of the light. It the tilt is 16-bit, you'll get 128 values, so about 8 cm, and that's the limit of the fader.

Cheers,

Robert

micpool

unread,
Jan 16, 2026, 12:57:36 PMJan 16
to QLab
Yes. Robert is right. It's also unnecessary to use a MIDI binding in the Light Settings, as you can address the lighting dashboard directly with OSC 

The revised look up table generator script is this:

--create 128 Network  cues to control a lighting parameter scaled to a range

set theIndex to 0

set thelighInstrument to "1" -- name of light

set theLightParameter to "tilt" --parameter name

set theOSC to "/dashboard/setLight" --OSC address

set theMin to 50 -- Minimum Light parameter percentage

set theMax to 70 -- Max Light parameter percentage

set theMIDIch to 1 --Channel of Physical MIDI controller

set theMIDIcc to 1 --Controller Number of Physical MIDI controller


----Do not alter anything below this line


set theStep to (theMax - theMin) / 127

tell application id "com.figure53.QLab.5" to tell front workspace

repeat with theValue from 0 to 127

make type "network"

set theSelected to last item of (selected as list)

--MIDI trigger set up

set the midi command of theSelected to control_change

set the midi byte one of theSelected to theMIDIcc

set the midi byte two of theSelected to theValue

set the midi trigger of theSelected to enabled

set the midi trigger channel of theSelected to theMIDIch

--set the network message to be sent by the new cue

set thelevel to theMin + theValue * theStep

set the custom string of theSelected to theOSC & space & thelighInstrument & "." & theLightParameter & space & thelevel

set the q number of theSelected to "cc" & theMIDIcc & "_" & theValue

end repeat

end tell


Workspace and screen recording attached
MIDI controlled tilt look up table .qlab5
Screen Recording 2026-01-16 at 17.50.12-HD 1080p.mov

Pieter Nys

unread,
Jan 19, 2026, 2:39:11 AMJan 19
to ql...@googlegroups.com
Hi all,

Thank you very much with the info you gave me.
I changed the concept and made a script to create lightcues.


set theIndex to 0
set theMin to 100 / (100 / 42) --Max MIDI Value/ (100/ Minimum Light parameter percentage)
set theMax to 100 / (100 / 64) --Max MIDI Value/ (100/ Minimum Light parameter percentage)
set theMIDIch to 11 --Channel of Physical MIDI controller
set theFaderNumber to 2 --Controller Number of Physical MIDI controller
set theLightCommand to "2.tilt"


--Do not alter anything below this line

set theStep to (theMax - theMin) / 127

tell application id "com.figure53.QLab.5" to tell front workspace

repeat with theValue from 0 to 127
make type "Light"


set theSelected to last item of (selected as list)

--MIDI trigger set up

set the midi command of theSelected to control_change

set the midi byte one of theSelected to theFaderNumber


set the midi byte two of theSelected to theValue

set the midi trigger of theSelected to enabled

set the midi trigger channel of theSelected to theMIDIch

--set the Light message to be sent by the new cue

-- normaal
--set thelevel to theMin + theValue * theStep

-- tilt inverse
set thelevel to theMax - theValue * theStep

set Qnumber to "cc" & theFaderNumber & "_" & theValue
set the q number of theSelected to Qnumber

setLight cue Qnumber selector theLightCommand value thelevel

end repeat

end tell

I'll check it this morning in the theatre...

Op vr 16 jan 2026 om 18:57 schreef micpool <m...@micpool.com>:
--
Contact support anytime: sup...@figure53.com
User Group Code of Conduct: https://qlab.app/code-of-conduct/
 
Instagram: https://www.instagram.com/Figure53
TikTok: https://www.tiktok.com/@QLab.app
Bluesky: https://bsky.app/profile/qlab.app
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qlab/a3d53e48-3b50-4f9f-986c-0614740611d6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages