Skip to content

Global Syntax

antoniondc edited this page Oct 29, 2025 · 1 revision

Applescript Utilities - Syntax

User Defined Variables

Many scripts also contain User Defined Variables. With these, when you call the script within Qlab, you can declare these variables globally and set them from within Qlab. This is particularly useful for using the same script for different purposes: e.g. you could have 2 versions of Cue/Add Fade, one which creates a fade out and one a fade in. The syntax for this would be as follows:

set userLevel to -120
set userLevel to 0

Variables set within Qlab

Para a maioria dos scripts funcionarem dentro do seu projeto é preciso criar alguns variáveis via "Memo Cue" dentro do "Cue List" -> "Script Files" utilizando o nome e o campo de comentários

The total list of Qlab Note variables required for the entire script library is:

  • Output channel count [Quantidade usada de outputs, my default is 6]
  • Row count [Quantidade usada de input, default is 2]
  • Min audio level [?]
  • Output channel names [this should simply be a list separated by ", "]
  • Line Checks: output level [my default is -12]
  • Line Checks: sub level [my default is -12]

Many of these variables will stay the same for your template from show to show - some others depend on the design. These are set from within Qlab, as the notes of a cue.

Example

Using the example Levels/Bump level, the variables from Qlab are audioChannelCount and minAudioLevel.

To set these variables, you must set as a User Defined Variable variableCueListName. This is the cue list that you have stored your notes cues in. I recommend using Memo cues. In this instance, you would name one cue Output channel count and the other Min audio level. You do not need numbers for those cues.


Tags

  • @description Name of the script
  • @author Most recent author of the script
  • @link Link to the author's website
  • @source Where scripts are taken from another source, or adapted from one, that author is listed here
  • @version Version of the script
  • @testedmacos The most recent version of MacOS that the script has been tested on
  • @testedqlab The most recent version of Qlab that the script has been tested on
  • @about A description of the script
  • @separateprocess TRUE or FALSE, whether the script needs to run in a separate process within Qlab
  • @changelog Changes for this version of the script

NOTES Sintaxe

- LUFS/LEVEL: (-27.2 / Adjust: 3.2) AUDIO: mono/stereo ACTOR: (Ann) TEMPLATE: (AMB,SNG,SFX,CUE) add func para que os cues sejam renumerados corretamente com seu prefixo correto+level template ARM: (true/false) COLOR: CUELIST: NUMBER: -

✅ 3. Como Adicionar um Novo Script ao Projeto

Para integrar um novo script:

  1. Salvar localmente:

    • Caminho padrão: ~/Library/Script Libraries/Qlab/NOME_DO_SCRIPT.scpt
  2. Chamar em outro script:

    set utils to getScriptFromLibrary("Qlab:NomeDoScript.scpt")
    utils's nomeDoHandler()
  3. Organização recomendada:

    Qlab/
    ├── Add/
    │   └── Add Cue.scpt
    ├── Level/
    │   └── Set Level.scpt
    ├── Route/
    │   └── Route Tracks to Template.scpt
    └── Utilities/
        ├── Cue Tools.scpt
        └── Create Memo Cue.scpt
    

✅ 4. Lista de Memo Cues Especiais

Vários scripts utilizam memo cues como fonte de metadados. Os nomes devem estar exatos no campo "Notes" de cues do tipo Memo.

Memo Cue Name Descrição Usado por
Output channel count Número de colunas de saída usadas no projeto Set Level, Route
Row count Número de linhas (inputs ou configurações de patch) Set Level, Route
Gang config Configuração dos Gangs Set Gang, Route
Heading Position Posição para adicionar Memo Section Add Section
Autoload Toggle Estado desejado para cues Autoload Toggle Autoload

✅ 6. Dependências entre Scripts

Alguns scripts usam outros como bibliotecas ou handlers. Abaixo a árvore de dependência:

Add Fade.applescript ├── Add Cue ├── Set Level.applescript └── Set Gang

Route cues to template.applescript ├── Set Level.applescript ├── Set Gang └── Silence Unused

Level Normalize.applescript └── Set Level.applescript

Move to Cut List.applescript └── Cue Tools


✅ 7. Parâmetros Globais Utilizados

Scripts podem ser configurados com property globais no topo. Alguns exemplos comuns:

Parâmetro Tipo Descrição
AUTO_CUE_TYPE string Define tipo de cue para criação ("fade", "group")
APPEND_TARGET_TO_NAME boolean Adiciona info do target ao nome do cue
USE_DIRECT_SELECTION_TARGET boolean Usa cue selecionado como target direto
TARGET_LIST_NAME string Nome da cue list onde criar cue
OUTPUT_THRESHOLD number dB mínimo para considerar output ativo
TARGET_DEVICE string Nome do dispositivo de áudio para uso padrão
HEADING_POSITION string Onde inserir seções de memo
SECTION_NAME string Nome da seção de organização via memo

Essas variáveis devem ser declaradas no topo do script e podem ser sobrescritas dinamicamente.

Menu

=================== < Back To Repo > ===================

Clone this wiki locally