Skip to content

QueScript

Que Script is SPARCK own super powerfull scripting language.

The implementation of QueScript inside SPARCK follows certain idiosyncracies that are described down below.

QueScript Node

Nonlinear Animation Scripting

QueScript is SPARCK's built-in nonlinear animation scripting language. With a few commands you can create many parallel running scripts to control any aspect of SPARCK or beyond. It's designed for timeline-based animations, interactive triggers, and automated show control.

Reference

The following properties can be configured for this node:

Property Type Description
scriptfile - load and execute que script
fileWatch - reloads the script file if it has changed by an external editor. Usually a good idea while you are editing.
ques - lists all ques inside the script and allows you to manually execute the chosen one.
progress.. - shows how each que is progressing
pause / play - pauses / plays the execution
stop - stops the execution
Editor - select your prefered editor or add your own.
edit - edit the loaded file. You can set your prefered editor inside properties.
update mode - there are two modes to choose:
  • automatic will update the script with each frame-pass.
  • custom will allow you to set your own update frequency.
  • frequency - custom update frequency
    debug - will output debug information to the console
    Inlet Type Description
    properties properties properties | use message [set <propertyPath> <value(s)>] (without node/<nodeName> at the beginning) to set internal properties
    'trigger message 'trigger <triggername>' / 'play <quename>' / 'var <varname> <varvalue>' - messages
    Outlet Type Description
    out message out messages
    osc message osc messages
    trigger message trigger messages

    Script Structure

    Basic QueScript Example

    QueScript uses an XML-based syntax with <que> elements containing timers, animations, and commands:

        <script>
          <que name="myQue">
            <timer/>
            <send>/address list with strings and numbers 0 2.45 56</send>
            <wait timer="5s"/>
            <print>timer has passed</print>
          </que>
          <que name="my2ndQue">
            <anim name="simpleRamp" duration="5s" fadeout="2s">
              <track name="t1">0. 1.</track>
              <send>/address ramp {t1}</send>
            </anim>
            <wait anim="simpleRamp"/>
          </que>
        </script>
    
    Key elements:
    
    - **`<que>`**: A named sequence of actions that can run in parallel with other ques
    - **`<timer>`**: Time-based execution block
    - **`<anim>`**: Animation block with duration, fadeout, and tracks
    - **`<track>`**: Defines interpolation values (e.g., `0. 1.` ramps from 0 to 1)
    - **`<send>`**: Sends OSC messages to SPARCK or external applications
    - **`<wait>`**: Pauses execution until a timer or animation completes
    - **`<print>`**: Outputs debug messages to the console
    

    Controlling SPARCK Properties

    OSC Address Format

    QueScript uses OSC messages to control any SPARCK node property. The address format is:

    node/<nodeName>/<propertyPath> <value(s)>
    

    Examples:

    <send>toSparck node/Grid/tfm/local/posX 4.</send>
    <send>toSparck node/Beamer/render/texture/dim/size 1920. 1080.</send>
    

    In this case the <send> command sends the message to SPARCK.

    Use the Introspection button in SPARCK's toolbar to discover all available node properties and their current values.

    Triggering and Playback

    Inlet Messages

    Control QueScript execution via the trigger inlet:

    Message Description
    trigger <triggername> Fire a named trigger defined in the script
    play <quename> Start executing a specific que by name
    var <varname> <value> Set a script variable dynamically

    The ques dropdown in the node UI also allows manual execution of any que.

    Development Workflow

    Live Editing

    For efficient script development:

    1. Enable fileWatch to auto-reload when the script file changes
    2. Set your preferred Editor (VS Code, Sublime, etc.)
    3. Click edit to open the script in your editor
    4. Enable debug to see execution details in the Max console
    5. Use pause / play and stop to control execution during testing

    Important Notes

    OSC Output Routing

    QueScript can generate OSC messages, but needs an udpsend object to transmit them externally. Connect the QueScript's osc outlet to an udpsend object.

    File Locations

    ~/_assets/_scripts/_ques     # QueScript files (.xml)
    


    Need help or want to suggest improvements?

    Report an issue Improve the Docs

    Last updated: 2025-12-01 | Edit this page on GitHub