AppleScript:
load v : Load a cue or workspace to a given time.
load specifier : The cue(s) or workspace(s) to load.
With OSC:
-- Only works properly when run as a separate process!
set userNudge to 5
tell application id "com.figure53.QLab.4" to tell front workspace
repeat with eachCue in (selected as list)
if q type of eachCue is not "Script" then -- Protect the script from running on itself
try
if running of eachCue is true then
pause eachCue
set startFlag to true
else
set startFlag to false
end if
set currentTime to action elapsed of eachCue
set eachID to uniqueID of eachCue
tell me to do shell script "echo '/cue_id/" & eachID & "/loadActionAt " & currentTime + userNudge & "' | nc -u -w 0 localhost 53535"
if startFlag is true then
start eachCue
end if
end try
end if
end repeat
end tell
This is pretty ugly, but it doesn’t reset the levels when nudging – so the OSC mechanism is more like the yellow bar mechanism. (loadAction is like the load to time slider.)
Only problem is, if I have a 2s pre wait userNudge of 5 goes forward by 7s while -5 goes backwards by 3s… I tried including “pre wait elapsed” but that seems to report exactly the same time as “action elapsed” so doubles the problem. I don’t recall playing with “pre wait elapsed” before, but I’d expect it to get to 2s and stop? Bit confused, but a bit distracted this evening: this will have to go on a pile for later.
I don’t like relying on OSC inside AppleScript – and clearly I can’t do the calculation using #OSC variables# – so I think I’ll develop something that loads fades to just before completion if they are selected at the same time so as to crash them along with the audio.
Rich