--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
--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
--
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.