Why not applescript live?

LXConsole support and feedback
Post Reply
Johan Söderberg
Posts: 294
Joined: Mon Sep 01, 2008 12:35 pm
Contact:

Why not applescript live?

Post by Johan Söderberg »

I thought i´d make myself a file that sends applescript commands to Qlab (for sound) and LXconsole (for light) so that I get a clear and simple synopsis and cuelist in which I can put buttons/links for execution of light and soundcues.

But I see in a reply you´ve made that:
-" AppleScript may not be the best choice for live or realtime control"

Why is that? Is it too slow or what?

Running the scripts on my laptop I see or hear no delays at all. I´ve synced light and sound, Just for the fun of it, down to tenths of a second with no visible delays.

Is it in any way unstable? Or why else?
:)
Johan Söderberg
Posts: 294
Joined: Mon Sep 01, 2008 12:35 pm
Contact:

?

Post by Johan Söderberg »

I thought this question would end up under the folder Applexcript help, but it didn´t...
:)
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

Applescript may not be the best choice for timed execution of a sequence of cues. A script generally is not long lived like an application. If it runs too long, it times out and quits. AppleScript itself may not have the ability to sequence events based on a timing clock. If there is a method that someone knows they can post it here.

AppleScripts run in a system events queue which means that the timing of their execution is not guaranteed. Practically speaking, on a new Intel Mac a small AppleScript (such as simply telling LXConsole to go to the next cue) generally executes almost instantly. But, on a G4 Tiger system, there can be a slight ( <1sec ) but noticeable delay.

LXScriptPlayer executes compiled AppleScripts using a direct call to the OSA binary (/usr/bin/osascript) to make the execution as fast as possible. A MIDI Show Control executes an AppleScript almost instantly. However, the delay ( if noticeable) comes when the event travels through the system to the receiving application. If there are other processes occupying the system, the event can be delayed.
Johan Söderberg
Posts: 294
Joined: Mon Sep 01, 2008 12:35 pm
Contact:

a link

Post by Johan Söderberg »

here´s a link to a caption showing a very simple filemakersolution performing applescripts in a timed autosequence.

It simply sends commands to run the next cue in Qlab for sound and LXConsole for light.
The timing for automatic cues is done in a loop I scripted within filemaker pro.

- This is indeed a stupid way to coordinate light and sound, but it works - which is fun!

The applescripts for LXConsole could of course be performed by Qlab as well - That would make more sense and create a cleaner, faster build -but I have no license for Qlab (it´s needed if you want to save applescript-cues) so I just took what I had at hand and played around with it.

http://distingo.nu/bilder/LXForum/runni ... cripts.swf
:)
Post Reply