[QLab] Control Change Values

450 views
Skip to first unread message

Stephen Garrett

unread,
Feb 23, 2011, 8:33:22 AM2/23/11
to ql...@lists.figure53.com
Hi,

I am looking for a way to pass on values from my max/msp patch into qlab. For example, I have a max/msp patch that will send messages to set certain lighing submasters at certain intensity values. I am currently accomplishing this by setting up Midi Show Control cues in Qlab and triggering them with midi control change messages from max/msp. The MSC cues in Qlab are hardcoded with a "control value" that controls the fader of the submaster I am setting.

Rather than having predetermined cues with set control values, is there any way to take the value parameter from the midi control change message from max/msp and have that set as the control value for the Qlab MSC cue?

Or, is there a better way to do this? I was trying to avoid sending midi show control messages directly from max/msp because I have to construct the midi hex manually it seems, and that gets messy.

- Stephen
________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com
Follow Figure 53 on Twitter here: http://twitter.com/Figure53

Christopher Ashworth

unread,
Feb 23, 2011, 9:29:08 AM2/23/11
to Stephen Garrett, Discussion and support for QLab users.
Hi Stephem,

Interesting usage scenario! I'm not sure off the top of my head of a way to accomplish this in the dynamic way you describe. You can set an MSC Cue's control value using AppleScript, but I can't think of a way to use the incoming value to then feed into a script or another part of QLab to adjust another cue.

I'm unfortunately not an expert in Max/MSP, but it seems like sending the values directly from there may be the best bet. If the only thing that is changing is a particular number, it seems like you could hard-code the rest of the message you want to send in hex, and then just convert the one number that's changing to a new hex value and insert it? (And you could use MIDI Monitor and QLab to find what hard-coded hex you need?)

Best,
Chris

On Feb 23, 2011, at 8:33 AM, Stephen Garrett wrote:

> Hi,
>
> I am looking for a way to pass on values from my max/msp patch into qlab. For example, I have a max/msp patch that will send messages to set certain lighing submasters at certain intensity values. I am currently accomplishing this by setting up Midi Show Control cues in QLab and triggering them with midi control change messages from max/msp. The MSC cues in QLab are hardcoded with a "control value" that controls the fader of the submaster I am setting.
>
> Rather than having predetermined cues with set control values, is there any way to take the value parameter from the midi control change message from max/msp and have that set as the control value for the QLab MSC cue?

Rich Walsh

unread,
Feb 23, 2011, 6:05:17 PM2/23/11
to Stephen Garrett, Discussion and support for QLab users.
On 23 Feb 2011, at 13:33, Stephen Garrett wrote:

> I am looking for a way to pass on values from my max/msp patch into qlab. For example, I have a max/msp patch that will send messages to set certain lighing submasters at certain intensity values. I am currently accomplishing this by setting up Midi Show Control cues in Qlab and triggering them with midi control change messages from max/msp. The MSC cues in Qlab are hardcoded with a "control value" that controls the fader of the submaster I am setting.
>
> Rather than having predetermined cues with set control values, is there any way to take the value parameter from the midi control change message from max/msp and have that set as the control value for the Qlab MSC cue?
>
> Or, is there a better way to do this? I was trying to avoid sending midi show control messages directly from max/msp because I have to construct the midi hex manually it seems, and that gets messy.

Presumably you can't set the lighting desk to respond to CC messages? You could use the Message Factory in MidiPipe to convert incoming CC to outgoing MSC mapping the CC value to the appropriate byte of the MSC message, and bypassing QLab altogether. Alternatively MidiPipe could run a script to take the incoming CC value and set the MSC message in QLab accordingly. Neither of these are pretty, and it seems unlikely that MAX/MSP can't do this more elegantly itself.

Alternatively, use a script to batch create a whole load of MSC Cues in QLab, each triggered by a unique CC value and sending the appropriate MSC message out.

Rich

Garrett Jr., Stephen W

unread,
Feb 24, 2011, 2:19:42 AM2/24/11
to Rich Walsh, Discussion and support for QLab users.
Rich,

Thanks so much for your reply. Where do I find more info about the scripting language I would need to use to do your last option (using "a script to batch create a whole load of MSC Cues in QLab, each triggered by a unique CC value and sending the appropriate MSC message out"). This seems to be the cleanest approach for me. 

As long as this doesn't degrade performance I think it is the quickest and easiest option.
Any ideas on a max number of cues qlab can handle as part of one show file?   

Thanks,
Stephen

Rich Walsh

unread,
Feb 24, 2011, 5:45:47 AM2/24/11
to Garrett Jr., Stephen W, Discussion and support for QLab users.
On 24 Feb 2011, at 07:19, Garrett Jr., Stephen W wrote:

Where do I find more info about the scripting language I would need to use to do your last option (using "a script to batch create a whole load of MSC Cues in QLab, each triggered by a unique CC value and sending the appropriate MSC message out"). This seems to be the cleanest approach for me. 

As long as this doesn't degrade performance I think it is the quickest and easiest option.
Any ideas on a max number of cues qlab can handle as part of one show file?

For QLab scripting see here: http://figure53.com/wiki/index.php?title=QLab_Scripts_and_Macros. QLab can easily handle a few thousand cues I think - although I've not tried more than a hundred or so with MIDI triggers…

You'll need a script something like this (run it in AppleScript Editor; edit the "user" variables appropriately first):

-- Use these variables to specify the range of controllers and values

set userControllerMin to 10
set userControllerMax to 20
set userControllerIncrement to 5

set userControlValueMin to 10
set userControlValueMax to 20
set userControlValueIncrement to 5

-- Use these variables to specify some basic properties of the MSC Cues

set userPatch to 1
set userDeviceID to 1

-- Use these variables to specify the MSC command format & command number (make sure the strings match those in the translation list)

set userCommandFormat to "Lighting (General)"
set userCommand to "SET" -- Since you're using "control value", this is actually the _only_ option available!

-- This part of the script will translate those strings into the numbers QLab uses (stolen from another script)

set translation_command_format to {"1", "Lighting (General)", "2", "Moving Lights", "3", "Color Changers", "4", "Strobes", "5", "Lasers", "6", "Chasers", ¬
"16", "Sound (General)", "17", "Music", "18", "CD Players", "19", "EPROM Playback", "20", "Audio Tape Machines", "21", "Intercoms", "22", "Amplifiers", ¬
"23", "Audio Effects Devices", "24", "Equalizers", "32", "Machinery (General)", "33", "Rigging", "34", "Flys", "35", "Lifts", "36", "Turntables", "37", "Trusses", ¬
"38", "Robots", "39", "Animation", "40", "Floats", "41", "Breakaways", "42", "Barges", "48", "Video (General)", "49", "Video Tape Machines", ¬
"50", "Video Cassette Machines", "51", "Video Disc Players", "52", "Video Switchers", "53", "Video Effects", "54", "Video Character Generators", ¬
"55", "Video Still Stores", "56", "Video Monitors", "64", "Projection (General)", "65", "Film Projectors", "66", "Slide Projectors", "67", "Video Projectors", ¬
"68", "Dissolvers", "69", "Shutter Controls", "80", "Process Control (General)", "81", "Hydraulic Oil", "82", "H2O", "83", "CO2", "84", "Compressed Air", ¬
"85", "Natural Gas", "86", "Fog", "87", "Smoke", "88", "Cracked Haze", "96", "Pyrotechnics (General)", "97", "Fireworks", "98", "Explosions", "99", "Flame", ¬
"100", "Smoke Pots", "127", "All Types"}
set translation_command_number to {"1", "GO", "2", "STOP", "3", "RESUME", "4", "TIMED_GO", "5", "LOAD", "6", "SET", "7", "FIRE", "8", "ALL_OFF", ¬
"9", "RESTORE", "10", "RESET", "11", "GO_OFF", "16", "GO/JAM_CLOCK", "17", "STANDBY_+", "18", "STANDBY_-", "19", "SEQUENCE_+", ¬
"20", "SEQUENCE_-", "21", "START_CLOCK", "22", "STOP_CLOCK", "23", "ZERO_CLOCK", "24", "SET_CLOCK", "25", "MTC_CHASE_ON", ¬
"26", "MTC_CHASE_OFF", "27", "OPEN_CUE_LIST", "28", "CLOSE_CUE_LIST", "29", "OPEN_CUE_PATH", "30", "CLOSE_CUE_PATH"}

repeat with i from 2 to count translation_command_format by 2
if userCommandFormat is item i of translation_command_format then
set commandFormat to item (i - 1) of translation_command_format
exit repeat
end if
end repeat
repeat with i from 2 to count translation_command_number by 2
if userCommand is item i of translation_command_number then
set commandNumber to item (i - 1) of translation_command_number
exit repeat
end if
end repeat

-- Make the cues

tell application "QLab"
tell front workspace
repeat with i from userControllerMin to userControllerMax by userControllerIncrement
repeat with j from userControlValueMin to userControlValueMax by userControlValueIncrement
make type "MSC"
set newCue to last item of (selected as list)
set q name of newCue to userCommand & " | Control Change " & i & " @ " & j
set midi trigger of newCue to enabled
set midi command of newCue to control_change
set midi byte one of newCue to i
set midi byte two of newCue to j
set patch of newCue to userPatch
set deviceID of newCue to userDeviceID
set command format of newCue to commandFormat
set command number of newCue to commandNumber
set control number of newCue to i
set control value of newCue to j
end repeat
end repeat
end tell
end tell

It's not as complicated as it might look…

Rich
Reply all
Reply to author
Forward
0 new messages