Names and Globals

Names of send/receive objects are composed with these components:
sendersID_dataTypeDestinationOrAction
sendersID – numeric ID (1…30) or gl for global things
dataType – this can be
  • b
    bangs, e.g. r bInit – global init bang, s #1_bLvlResetOut – local reset signal out from UI patcher
  • i
    integer values, e.g. r iShiftKey – global shift key state, r #1_iWaveIn – local wave index
  • f
    float values, e.g. #1_fPartFreq – a partial frequency value
  • l
    lists. Example: r #1_lMatrixControlOut
  • sym
    symbols, e.g. s #1_symSetBufferIn
  • sig
    audio (msp-) signal. Example: receive~ 1_sigMtrxIn
  • jit
    video (jitter-) matrix, like s #1_jitDisplayIn – sends a jitter matrix to a UI window.
  • tex
    texture, send or receive a jitter OpenGL texture. E.g. #1_texCam-1 – video input 1 signal.
suffixin or out, denotes the data flow direction. Generally out denotes data from user interface patchers, in into them. Not very often used now since the communication is handled with bound pattrs.

OpenGL textures


Inside LVD the bigger part of the video processing takes place on the graphics card. To isolate the stages from each other the result of a process is captured in a texture. These textures are named as follows:
#1_texture, where #1 denotes the slot ID.
The input textures names are #1_1_texture and #1_2_texture.
A special texture glTexBlack is defined, use it if you need a black screen.

Global variables


In Max the concept of a variable is somehow different than in other programming languages. Here, the term variable mostly refer to a value object, which can hold any data you like. To denote the data type, value names include things like iName or fName to show that there is a integer or float inside.
For these values some getter and setter abstractions are defined as well, to avoid the direct access to them.

Global values:

v symAppPath – path to the "Contents" inside the application bundle
v symPath – path to the "Contents" inside the application bundle
v symSessionPath – path to the current session folder, start value is "NIL"
v symSessionName – name of the current session, start value is "untitled"

buffer~ are another type of variables which holds audio data. There name's start with a buf_ prefix (global) resp. #1_bufThing for local buffer~s.

Another type of a global variables are pattrs with patcher wide data. These are found in tLb.Globals:
persistent:
pattr midiPort
pattr programOutPort
pattr hintsOn
pattr sessionIsUnlocked
pattr adrmode
pattr showWarning – show or hide the initial warning
pattr remoteHost – Bonjour name of the remote controller for the DirectCueAccess page
pattr listeningOnPort – port number for the RemoteDisplay application
pattr sendingOnPort – port number for the RemoteDisplay application
These pattrs are controlled by pattrstorage Globals

temporarily:
pattr pathIsValid
pattr isRunning
pattr soloMode
pattr version

Cues

The current cue can be found as follows:
r iCue – receives the cue number in the moment it changes
pattr cue – destination for @bindto. The whole argument is ::glcueCounter::cue. If used with tLb.BindPattr use gl cueCounter::cue.

Externals and abstractions



Names of of externals are always lowercase, starting with the prefix "tLb." (this is for older externals not yet always the case, but they will be renamed in future versions).
Names of abstractions start with "tLb.", too, followed by a name revealing the function with an uppercase letter first (e.g. "tLb.Gain2~").
Abstractions which process audio end with "~", Jitter processors and helpers start with "tLb.Jit…".