[QLab] Fade Shape

45 views
Skip to first unread message

Steve Lalonde

unread,
Jun 15, 2010, 1:26:00 AM6/15/10
to Discussion and support for QLab users.

Hi all, 

  I just did some research and couldn't find a way to modify fade shape through script. Could it be possible?

  My Idea : having the automatic fade script and adding the option to copy paste a nice generic log-ish curve I would have done somewhere (e.g. 2nd cueList (scripts) cue F. )

  That would save me some precious time.

     Thanks, 

            Steve Lalonde

Christopher Ashworth

unread,
Jun 15, 2010, 10:37:00 AM6/15/10
to Discussion and support for QLab users.
Hi Steve,

There is not currently scripting access to the fade shapes -- that's an interesting example of how it might be used, though!

The only keyboard shortcuts for fade shapes at the moment are the copy/paste fade curves shortcuts.

Best,
Chris

________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com

Rich Walsh

unread,
Jun 15, 2010, 10:37:38 AM6/15/10
to Discussion and support for QLab users.
On 15 Jun 2010, at 06:26, Steve Lalonde wrote:

> I just did some research and couldn't find a way to modify fade
> shape through script. Could it be possible?

There are two ways of accessing the copy/paste fade shape routines (no
direct way of modifying the shape yet), both slightly clunky:

1. Use UI scripting to call the appropriate menu commands:

tell application "System Events"
tell application process "QLab"
click menu item "Copy Fade Shape" of menu "Tools" of menu bar item
"Tools" of menu bar 1
end tell
end tell

tell application "System Events"
tell application process "QLab"
click menu item "Paste Fade Shape" of menu "Tools" of menu bar item
"Tools" of menu bar 1
end tell
end tell

You'll need to wrap those up in a try block, or make sure you're on a
Fade Cue before calling them.

2. Assign some keyboard shortcuts to these menu items (http://figure53.com/wiki/index.php?title=Hints_and_tips#Assign_.22missing.22_keyboard_shortcuts
), and call them (I use ctrl-cmd-C & ctrl-cmd-V):

tell application "System Events"
tell application "QLab" to activate
keystroke "c" using {control down, command down}
end tell

tell application "System Events"
tell application "QLab" to activate
keystroke "v" using {control down, command down}
end tell

You'll have to play with those a bit to get them to work in the
context of how you are calling the rest of the script (ie: you may or
may not need to activate QLab to make sure it is the target of the
keystrokes).

Rich

Steve Lalonde

unread,
Jun 16, 2010, 2:10:18 AM6/16/10
to Discussion and support for QLab users.
Wow, Thank you Rich! 
I was sure there was a workaround for it with the assigned keyboard shortcut.

In fact I already have alt-c alt-v for copy/paste fade shape, very useful. 

So here's my script, you need a cue list named Scripts and a fade cue in it numbered F with you favorite fade shape + correct short cut. (phew)

There's also this inelegant (but necessary) delay. Didn't find a workaround for this. (And the delay might change if computer is busy right??)

--------------


display dialog "Durée du Fade Out:" default answer "5" with title "Fade Out Automatique" with icon 1 buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel"

set FadeDur to text returned of result

tell application "QLab2.2.8"
set mySel to selected of workspace 1
set originalCue to last item of mySel
set selCueList to current cue list of workspace 1
if q type of originalCue is "Audio" then
tell workspace 1
make type "Fade"
set mySel to selected # (QLab will select the newly created cue.)
set newCue to last item of mySel
set cue target of newCue to originalCue
set duration of newCue to FadeDur
newCue setLevel row 0 column 0 db -120
set q name of newCue to "Fade Out: " & q name of originalCue
end tell
end if
tell front workspace
set current cue list to first cue list whose q name is "Scripts" # (You need a cue list named scripts)
set playback position of current cue list to cue "F" # (You need a fade cue in the scripts cue list with you favorite fade shape)
end tell
tell application "System Events"
tell application "QLab2.2.8" to activate
keystroke "c" using {option down} # (change this line for your favorite shortcut)
end tell
delay 0.02
tell front workspace
set current cue list to selCueList
set playback position of current cue list to newCue
end tell
tell application "System Events"
tell application "QLab2.2.8" to activate
keystroke "v" using {option down} # (ibid.)
end tell
end tell



--------

Comments appreciated, 

        Steve


2010/6/15 Rich Walsh <rich...@mac.com>
On 15 Jun 2010, at 06:26, Steve Lalonde wrote:

 I just did some research and couldn't find a way to modify fade shape through script. Could it be possible?

There are two ways of accessing the copy/paste fade shape routines (no direct way of modifying the shape yet), both slightly clunky:

1. Use UI scripting to call the appropriate menu commands:

tell application "System Events"
       tell application process "QLab"
               click menu item "Copy Fade Shape" of menu "Tools" of menu bar item "Tools" of menu bar 1
       end tell
end tell

tell application "System Events"
       tell application process "QLab"
               click menu item "Paste Fade Shape" of menu "Tools" of menu bar item "Tools" of menu bar 1
       end tell
end tell

You'll need to wrap those up in a try block, or make sure you're on a Fade Cue before calling them.

2. Assign some keyboard shortcuts to these menu items (http://figure53.com/wiki/index.php?title=Hints_and_tips#Assign_.22missing.22_keyboard_shortcuts), and call them (I use ctrl-cmd-C & ctrl-cmd-V):

Rich Walsh

unread,
Jun 17, 2010, 10:21:27 PM6/17/10
to Discussion and support for QLab users.
On 16 Jun 2010, at 07:10, Steve Lalonde wrote:

> Comments appreciated,

I would put the "display dialog" inside the if block: there's no point
asking about the fade time if the script isn't going to make a fade.
Similarly, everything after the "end if" will only be required if the
Fade Cue is made, so this should all go inside the if block too. The
script will throw an error at the undefined "newCue" variable otherwise.

Also, rather than keep repeating "workspace 1" and "tell front
workspace", I would wrap the whole lot up in this kind of thing:

tell application "QLab"
tell front workspace

end tell
end tell

That doesn't make any difference to the Apple Events that will be
sent, but it does make the script easier to read.

I've found Snow Leopard seems to require delays after some events in
order to notice that the event has happened (UI scripting and
keystrokes mainly); Leopard doesn't appear quite as easy to confuse. I
don't think the delay will be affected by other threads running on the
machine.

Steve Lalonde

unread,
Jun 18, 2010, 2:36:37 PM6/18/10
to Discussion and support for QLab users.
Thanks a lot, once again.

I'll correct this messiness! 

  Best, 

      Steve


2010/6/17 Rich Walsh <rich...@mac.com>

raymond soly

unread,
Jun 19, 2010, 11:06:16 AM6/19/10
to Discussion and support for QLab users.
Hi, recently had a Qlab session with soundflower sends to reaper then
back out my audio hardware motu 896HD and aes/ebu to an ILive A&H
R72>idr 16-8.......noticed a couple of things......first there where
little clicks every now and then in the music playback.....and the
levels where lower from the soundflower sends than they are when I
usually go the adat route from the 896HD(I have a similar patch where
I use the adats i/o on the HD instead of the soundflower and that is
clean with the appropriate levels) ....anyone else noticed these
things when using soundflower??

By the way I just love the ILive R72 (I'm trying this system right
now), you can just do sooo much with this .......

thanks

Ray

Reply all
Reply to author
Forward
0 new messages