├── .nvmrc ├── index.d.ts ├── typings ├── grandMA3.Obj │ ├── index.d.ts │ └── Obj.d.ts ├── lua.ftp │ ├── index.d.ts │ └── functions.d.ts ├── lua.json │ ├── index.d.ts │ └── functions.d.ts ├── lua.lfs │ ├── index.d.ts │ └── functions.d.ts ├── lua.socket │ ├── index.d.ts │ └── functions.d.ts ├── grandMA3.Remotes │ ├── index.d.ts │ └── functions.d.ts ├── lua.socket.core │ ├── index.d.ts │ └── functions.d.ts ├── grandMA3.Appearances │ ├── index.d.ts │ └── functions.d.ts ├── grandMA3.Patch │ ├── types │ │ ├── index.d.ts │ │ └── FixtureTypes.d.ts │ ├── index.d.ts │ └── function.d.ts ├── grandMA3.Display │ ├── CloseButton.d.ts │ ├── DialogFrame.d.ts │ ├── TitleButton.d.ts │ ├── TitleBar.d.ts │ ├── ScrollBar.d.ts │ ├── BaseInput.d.ts │ ├── IndicatorButton.d.ts │ ├── Button.d.ts │ ├── PlaceHolder.d.ts │ ├── SwipeButton.d.ts │ ├── index.d.ts │ ├── Popup.d.ts │ ├── UILayoutGrid.d.ts │ ├── Display.d.ts │ ├── LineEdit.d.ts │ ├── UIObject.d.ts │ └── types.d.ts ├── grandMA3.Global │ ├── index.d.ts │ ├── enums │ │ └── index.d.ts │ └── functions.d.ts ├── grandMA3.DataPool │ ├── index.d.ts │ ├── types │ │ ├── index.d.ts │ │ ├── Macros.d.ts │ │ ├── Pages.d.ts │ │ ├── Plugins.d.ts │ │ ├── Presets.d.ts │ │ ├── MAtricks.d.ts │ │ ├── Layouts.d.ts │ │ └── Sequences.d.ts │ └── functions.d.ts ├── grandMA3.UserProfile │ ├── index.d.ts │ ├── types │ │ ├── index.d.ts │ │ ├── KeyboardShortCuts.d.ts │ │ ├── LayoutElementDefaultsCollect.d.ts │ │ └── ScreenConfigurations.d.ts │ └── functions.d.ts ├── grandMA3.ColorTheme │ ├── index.d.ts │ ├── ColorTheme.d.ts │ └── ColorDefCollect.d.ts ├── grandMA3.Root │ ├── EnvArgs.d.ts │ ├── UserProfiles.d.ts │ ├── DataPools.d.ts │ ├── ShowSettings.d.ts │ ├── index.d.ts │ ├── ShowData.d.ts │ ├── Masters.d.ts │ ├── GraphicsRoot.d.ts │ ├── MediaPools.d.ts │ ├── DeviceConfigurations.d.ts │ └── Root.d.ts ├── common.d.ts │ └── index.d.ts └── index.d.ts ├── .github └── FUNDING.yml ├── .gitattributes ├── tsconfig.json ├── LICENSE ├── package.json ├── README.md └── .gitignore /.nvmrc: -------------------------------------------------------------------------------- 1 | v16.20.0 -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | import './typings'; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Obj/index.d.ts: -------------------------------------------------------------------------------- 1 | import './Obj'; 2 | -------------------------------------------------------------------------------- /typings/lua.ftp/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | -------------------------------------------------------------------------------- /typings/lua.json/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | -------------------------------------------------------------------------------- /typings/lua.lfs/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | -------------------------------------------------------------------------------- /typings/lua.socket/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Remotes/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | -------------------------------------------------------------------------------- /typings/lua.socket.core/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Appearances/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Patch/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import './FixtureTypes'; 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: lukas-runge 2 | custom: "paypal.me/lukasrunge" -------------------------------------------------------------------------------- /typings/grandMA3.Display/CloseButton.d.ts: -------------------------------------------------------------------------------- 1 | type CloseButton = UIObject; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/DialogFrame.d.ts: -------------------------------------------------------------------------------- 1 | type DialogFrame = UILayoutGrid; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/TitleButton.d.ts: -------------------------------------------------------------------------------- 1 | type TitleButton = UIObject; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/TitleBar.d.ts: -------------------------------------------------------------------------------- 1 | type TitleBar = UIObject & UILayoutGrid; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Global/index.d.ts: -------------------------------------------------------------------------------- 1 | import './enums'; 2 | import './functions'; 3 | -------------------------------------------------------------------------------- /typings/grandMA3.Patch/index.d.ts: -------------------------------------------------------------------------------- 1 | import './types'; 2 | import './function'; 3 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/index.d.ts: -------------------------------------------------------------------------------- 1 | import './functions'; 2 | import './types'; 3 | -------------------------------------------------------------------------------- /typings/grandMA3.UserProfile/index.d.ts: -------------------------------------------------------------------------------- 1 | import './types'; 2 | import './functions'; 3 | -------------------------------------------------------------------------------- /typings/grandMA3.ColorTheme/index.d.ts: -------------------------------------------------------------------------------- 1 | import './ColorDefCollect'; 2 | import './ColorTheme'; 3 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/ScrollBar.d.ts: -------------------------------------------------------------------------------- 1 | type ScrollBarH = UIObject; 2 | type ScrollBarV = UIObject; 3 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/EnvArgs.d.ts: -------------------------------------------------------------------------------- 1 | type EnvArgs = LuaMultiReturn<[string, string, any, LuaComponent]>; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.Global/enums/index.d.ts: -------------------------------------------------------------------------------- 1 | import './Enums_2_1'; 2 | import './Enums_1_9'; 3 | import './Enums'; 4 | -------------------------------------------------------------------------------- /typings/common.d.ts/index.d.ts: -------------------------------------------------------------------------------- 1 | type Rect = { 2 | x: number; 3 | y: number; 4 | w: number; 5 | h: number; 6 | }; 7 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/UserProfiles.d.ts: -------------------------------------------------------------------------------- 1 | type UserProfiles = Obj & UserProfile[] & { [index: string]: UserProfile }; 2 | -------------------------------------------------------------------------------- /typings/grandMA3.UserProfile/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import './KeyboardShortCuts'; 2 | import './LayoutElementDefaultsCollect'; 3 | import './ScreenConfigurations'; 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Undo the GitHub's default 2 | # https://github.com/github/linguist/blob/96ad1185828f44bb9b774328a584551ee57ed264/lib/linguist/vendor.yml#L177 3 | *.d.ts -linguist-vendored -------------------------------------------------------------------------------- /typings/grandMA3.Root/DataPools.d.ts: -------------------------------------------------------------------------------- 1 | type DataPools = Obj & 2 | DataPoolClass[] & { [index: string]: DataPoolClass } & { 3 | Default: DataPoolClass; 4 | }; 5 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/BaseInput.d.ts: -------------------------------------------------------------------------------- 1 | type BaseInput = UILayoutGrid & BaseInputProps; 2 | 3 | type BaseInputProps = ObjProps & { 4 | autoClose: YesNo; 5 | closeOnEscape: YesNo; 6 | }; 7 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import './Layouts'; 2 | import './Macros'; 3 | import './MAtricks'; 4 | import './Pages'; 5 | import './Plugins'; 6 | import './Presets'; 7 | import './Sequences'; 8 | -------------------------------------------------------------------------------- /typings/grandMA3.UserProfile/types/KeyboardShortCuts.d.ts: -------------------------------------------------------------------------------- 1 | type KeyboardShortCutsProps = ObjProps & { 2 | keyboardShortcutsActive: boolean; 3 | }; 4 | 5 | type KeyboardShortCuts = Obj & KeyboardShortCutsProps; 6 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/IndicatorButton.d.ts: -------------------------------------------------------------------------------- 1 | type IndicatorButtonProps = ButtonProps & { 2 | colorIndicator: string | MAColor; 3 | textLeftCorner: string; 4 | }; 5 | type IndicatorButton = UIObject & IndicatorButtonProps & ButtonSignals; 6 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/ShowSettings.d.ts: -------------------------------------------------------------------------------- 1 | type ShowSettings = Obj & { 2 | AddonVariables: AddonVariables; 3 | }; 4 | 5 | type AddonVariables = Obj & Record; 6 | 7 | type Variables = Obj; 8 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/Button.d.ts: -------------------------------------------------------------------------------- 1 | type ButtonProps = UIObjectProps & { 2 | hasHover: YesNo; 3 | pluginComponent: LuaComponent; 4 | toolTip: string; 5 | enabled: YesNo; 6 | }; 7 | type ButtonSignals = UIObjectSignals; 8 | 9 | type Button = UIObject & ButtonProps & ButtonSignals; 10 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/index.d.ts: -------------------------------------------------------------------------------- 1 | import './DataPools'; 2 | import './DeviceConfigurations'; 3 | import './EnvArgs'; 4 | import './GraphicsRoot'; 5 | import './MediaPools'; 6 | import './Masters'; 7 | import './Root'; 8 | import './ShowData'; 9 | import './ShowSettings'; 10 | import './UserProfiles'; 11 | -------------------------------------------------------------------------------- /typings/lua.socket/functions.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | /** @noSelfInFile */ 4 | type Socket = { 5 | close(): void; 6 | }; 7 | declare module 'socket' { 8 | export function bind(host: string, port: number, backlog?: any): Socket; 9 | export function gettime(): number; 10 | } 11 | -------------------------------------------------------------------------------- /typings/grandMA3.UserProfile/types/LayoutElementDefaultsCollect.d.ts: -------------------------------------------------------------------------------- 1 | type LayoutElementDefaultsCollect = Obj & 2 | LayoutDefault[] & { [index: string]: LayoutDefault }; 3 | 4 | type LayoutDefault = Obj & { 5 | ElementType: string; 6 | Action: string; 7 | }; 8 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "rootDir": "src", 4 | "target": "esnext", 5 | "lib": [ 6 | "esnext" 7 | ], 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "types": [ 11 | "@typescript-to-lua/language-extensions" 12 | ], 13 | "strict": true 14 | }, 15 | "tstl": { 16 | "luaTarget": "5.4", 17 | "noImplicitSelf": true 18 | } 19 | } -------------------------------------------------------------------------------- /typings/grandMA3.Display/PlaceHolder.d.ts: -------------------------------------------------------------------------------- 1 | type PlaceHolderProps = ObjProps & {}; 2 | 3 | type PlaceHolder = Obj & 4 | UIObject & 5 | PlaceHolderProps & { 6 | ClearUIChildren(): void; 7 | Close(this: void): void; 8 | ScrollBarH: ScrollBarH; 9 | ScrollBarV: ScrollBarV; 10 | }; 11 | 12 | type ModalPlaceholder = PlaceHolder; 13 | type PopupPlaceholder = PlaceHolder; 14 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/SwipeButton.d.ts: -------------------------------------------------------------------------------- 1 | type SwipeButton = UIObject & { 2 | textShadow: number; 3 | hasHover: YesNo; 4 | text: string; 5 | // textColor: string 6 | font: Font; 7 | textAlignmentH: AlignmentH; 8 | pluginComponent: GenericObj; 9 | clicked: SignalId; 10 | focus?: 'InitialFocus'; 11 | toolTip: string; 12 | enabled: YesNo; 13 | keyUp: string; // Signal Function Name 14 | }; 15 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/ShowData.d.ts: -------------------------------------------------------------------------------- 1 | type ShowData = Obj & 2 | any[] & { [index: string]: any } & { 3 | DataPools: DataPools; 4 | LivePatch: LivePatch; 5 | MediaPools: MediaPools; 6 | Masters: Masters; 7 | UserProfiles: UserProfiles; 8 | Appearances: Appearances; 9 | Remotes: Remotes; 10 | ShowSettings: ShowSettings; 11 | Scribbles: Scribbles; 12 | Tags: Tags; 13 | }; 14 | -------------------------------------------------------------------------------- /typings/lua.json/functions.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | /** @noSelfInFile */ 4 | 5 | declare type JsonSerializableObj = { [key: string]: JsonSerializable }; 6 | 7 | declare type JsonSerializable = 8 | | string 9 | | number 10 | | boolean 11 | | null 12 | | JsonSerializable[] 13 | | JsonSerializableObj; 14 | 15 | declare module 'json' { 16 | export function decode(str: string): object; 17 | export function encode(data: object): string; 18 | } 19 | -------------------------------------------------------------------------------- /typings/lua.socket.core/functions.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | /** @noSelfInFile */ 4 | type SocketCore = { 5 | setoption(options: 'reuseaddr', value: boolean): void; 6 | /** 7 | * 8 | * @param addr 9 | * @param port 10 | * @returns [result,error] 11 | */ 12 | bind(addr: string, port: number): LuaMultiReturn<[number | undefined, string | undefined]>; 13 | close(): void; 14 | }; 15 | declare module 'socket.core' { 16 | export function tcp4(): SocketCore; 17 | } 18 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/Macros.d.ts: -------------------------------------------------------------------------------- 1 | type Macros = Obj & Macro[] & { [index: string]: Macro }; 2 | 3 | type Macro = Obj & 4 | MacroLine[] & { [index: string]: MacroLine } & { 5 | appearance: Obj; 6 | }; 7 | 8 | type MacroLineProps = ObjProps & { 9 | wait: number; 10 | command: string; 11 | note: string; 12 | enabled: boolean; 13 | addToCmdLine: boolean; 14 | execute: boolean; 15 | }; 16 | type MacroLine = Obj & MacroLineProps; 17 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/index.d.ts: -------------------------------------------------------------------------------- 1 | import './BaseInput'; 2 | import './Button'; 3 | import './CloseButton'; 4 | import './DialogFrame'; 5 | import './Display'; 6 | import './ItemCollect'; 7 | import './IndicatorButton'; 8 | import './LineEdit'; 9 | import './MainDialog'; 10 | import './PlaceHolder'; 11 | import './Popup'; 12 | import './ScrollBar'; 13 | import './SwipeButton'; 14 | import './TitleBar'; 15 | import './TitleButton'; 16 | import './types'; 17 | import './UILayoutGrid'; 18 | import './UIObject'; 19 | -------------------------------------------------------------------------------- /typings/index.d.ts: -------------------------------------------------------------------------------- 1 | import './common.d.ts'; 2 | import './grandMA3.Appearances'; 3 | import './grandMA3.ColorTheme'; 4 | import './grandMA3.DataPool'; 5 | import './grandMA3.Display'; 6 | import './grandMA3.Global'; 7 | import './grandMA3.Obj'; 8 | import './grandMA3.Patch'; 9 | import './grandMA3.Remotes'; 10 | import './grandMA3.Root'; 11 | import './grandMA3.UserProfile'; 12 | import './lua.ftp'; 13 | import './lua.json'; 14 | import './lua.lfs'; 15 | import './lua.socket'; 16 | import './lua.socket.core'; 17 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/Pages.d.ts: -------------------------------------------------------------------------------- 1 | type Pages = Obj & 2 | (Sequence | undefined)[] & { [index: string]: Sequence | undefined }; 3 | 4 | type Page = Obj; 5 | 6 | type ExecutorBaseProps = { 7 | fader: 'Master' | 'Temp'; //... 8 | }; 9 | type ExecutorProps = ObjProps & 10 | ExecutorBaseProps & { 11 | object: Obj; 12 | width: number; 13 | height: number; 14 | }; 15 | type Executor = Obj; 16 | 17 | type ExecutorProxyProps = ObjProps & ExecutorBaseProps; 18 | type ExecutorProxy = Obj & ExecutorProxyProps; 19 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/Popup.d.ts: -------------------------------------------------------------------------------- 1 | type OverlayBaseProps = ObjProps & { 2 | autoClose: boolean; 3 | }; 4 | 5 | type OverlayBase = Obj & 6 | UILayoutGrid & 7 | OverlayBaseProps & { 8 | 3: ModalPlaceholder; 9 | 4: PopupPlaceholder; 10 | } & { 11 | Close(): void; 12 | CloseCancel(): void; 13 | }; 14 | 15 | type Popup = OverlayBase<'Popup'>; 16 | type ShadedOverlay = OverlayBase<'ShadedOverlay'>; 17 | type MainDialog = OverlayBase<'MainDialog'>; 18 | 19 | type OverlayCloseCallback = ( 20 | this: void, 21 | overlay: Popup, 22 | modalResult: Enums.ModalResult, 23 | modalValue: any, 24 | ctxNext: any, 25 | ) => void; 26 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/Plugins.d.ts: -------------------------------------------------------------------------------- 1 | type Plugins = Obj & { [index: string]: Plugin | undefined }; 2 | 3 | type PluginProps = ObjProps & { 4 | scribble: Obj; 5 | appearance: Obj; 6 | author: string; 7 | version: string; 8 | path: string; 9 | userRights: string; 10 | }; 11 | 12 | type Plugin = Obj & 13 | PluginProps & { note: string } & { [index: string]: LuaComponent | undefined }; 14 | 15 | type LuaComponentProps = ObjProps & { 16 | fileName: string; 17 | filePath: string; 18 | fileSize: number; 19 | isResource: boolean; 20 | inStream: boolean; 21 | installed: boolean; 22 | }; 23 | type LuaComponent = Obj & { [index: string]: undefined }; 24 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/Masters.d.ts: -------------------------------------------------------------------------------- 1 | type Masters = Obj & { 2 | Grand: Grand; 3 | Playback: Playback; 4 | Speed: Speed; 5 | Timing: Timing; 6 | }; 7 | 8 | type Playback = Obj; 9 | 10 | type MasterPlayback = Obj & {}; 11 | 12 | type Speed = Obj; 13 | 14 | type MasterSpeed = Obj & MasterSpeedProps & {}; 15 | 16 | type Grand = Obj; 17 | 18 | type MasterGrand = Obj & {}; 19 | 20 | type Timing = Obj; 21 | 22 | type MasterTiming = Obj & {}; 23 | 24 | type MasterSpeedProps = ObjProps & { 25 | /** 26 | * Values are ...-2,-1,0,1,2... 27 | * A 2^x scale factor 28 | */ 29 | speedScale: number; 30 | }; 31 | -------------------------------------------------------------------------------- /typings/lua.lfs/functions.d.ts: -------------------------------------------------------------------------------- 1 | // Based on lfs lua 2 | 3 | /// 4 | 5 | /** @noSelfInFile */ 6 | 7 | declare module 'lfs' { 8 | export function attributes(path: string): { 9 | mode: 10 | | 'directory' 11 | | 'file' 12 | | 'link' 13 | | 'socket' 14 | | 'named pipe' 15 | | 'char device' 16 | | 'block device' 17 | | 'other'; 18 | }; 19 | export function attributes(path: string, name: string): string; 20 | export function dir(path: string): LuaIterable; 21 | /** 22 | * Create directory at the given path. 23 | * The parent directory must exist, otherwise this function will fail. 24 | * @return true if successful, undefined if failed 25 | */ 26 | export function mkdir(path: string): boolean | undefined; 27 | export function rmdir(path: string): void; 28 | } 29 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/GraphicsRoot.d.ts: -------------------------------------------------------------------------------- 1 | type GraphicsRoot = Obj & 2 | any[] & { [index: string]: any } & { 3 | TextureCollect: TextureCollect; 4 | PultCollect: PultCollect; 5 | }; 6 | 7 | type TextureCollect = Obj & { 8 | Textures: Textures; 9 | }; 10 | type Textures = Obj & { 11 | [name: string]: Texture; 12 | }; 13 | type TextureProps = ObjProps & { 14 | fileName: string; 15 | textureRect: { h: number; w: number; x: number; y: number }; 16 | textureIndex: number; 17 | }; 18 | type Texture = Obj & TextureProps; 19 | 20 | type PultCollect = Obj & { 21 | [name: string]: Pult; 22 | }; 23 | type Pult = Obj & PultProps; 24 | type PultProps = ObjProps & {}; 25 | type Devices = Obj & {}; 26 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/Presets.d.ts: -------------------------------------------------------------------------------- 1 | type PresetFamilyType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 21 | 22 | 23 | 24 | 25; 2 | 3 | type PresetPools = Obj & { 4 | [1]: Presets; 5 | [2]: Presets; 6 | [3]: Presets; 7 | [4]: Presets; 8 | [5]: Presets; 9 | [6]: Presets; 10 | [7]: Presets; 11 | [8]: Presets; 12 | [9]: Presets; 13 | [21]: Presets; 14 | [22]: Presets; 15 | [23]: Presets; 16 | [24]: Presets; 17 | [25]: Presets; 18 | }; 19 | type Presets = Obj; 20 | type PresetMode = 'Universal' | 'Global' | 'Selective'; 21 | type PresetProps = ObjProps & { 22 | appearance: Appearance; 23 | scribble: Scribble; 24 | storedData: PresetMode; // ReadOnly 25 | presetMode: Enums.PresetMode; // ReadOnly 26 | presetModeInternal: PresetMode; 27 | } & MAtrickOnlyProps; 28 | type Preset = Obj & PresetProps; 29 | -------------------------------------------------------------------------------- /typings/grandMA3.Appearances/functions.d.ts: -------------------------------------------------------------------------------- 1 | type Appearances = Obj & Appearance[] & { [index: string]: Appearance }; 2 | 3 | type Appearance = Obj & AppearanceProps; 4 | 5 | type AppearanceProps = ObjProps & { 6 | BACKR: number; 7 | BACKG: number; 8 | BACKB: number; 9 | BACKALPHA: number; 10 | image: UserImage; 11 | IMAGER: number; 12 | IMAGEG: number; 13 | IMAGEB: number; 14 | IMAGEALPHA: number; 15 | }; 16 | 17 | type ScribbleProps = ObjProps & { 18 | scribble: string; // comma separated list of points and colors 19 | }; 20 | 21 | type Scribbles = Obj & Scribble[] & { [index: string]: Scribble }; 22 | type Scribble = Obj & ScribbleProps; 23 | 24 | type TagProps = ObjProps & {}; 25 | 26 | type Tags = Obj & Tag[] & { [index: string]: Tag }; 27 | type Tag = Obj & TagProps; 28 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/MediaPools.d.ts: -------------------------------------------------------------------------------- 1 | type MediaPoolsChildren = { 2 | Gobos: GoboImages; 3 | Symbols: Symbols; 4 | Images: Images; 5 | MeshImagePool: MeshImagePool; 6 | Videos: Videos; 7 | Sounds: Sounds; 8 | }; 9 | 10 | type MediaPools = Obj & 11 | MediaPoolsChildren; 12 | 13 | type MediaObj = GoboImage | SymbolImage | UserImage | MeshImage | Video | Sound; 14 | type GoboImages = Obj; 15 | type GoboImage = Obj; 16 | 17 | type Symbols = Obj; 18 | type SymbolImage = Obj; 19 | 20 | type Images = Obj & UserImage[] & { [index: string]: UserImage }; 21 | type UserImage = Obj & { note: string }; 22 | 23 | type MeshImagePool = Obj; 24 | type MeshImage = Obj; 25 | 26 | type Videos = Obj; 27 | type Video = Obj; 28 | type Sounds = Obj; 29 | type Sound = Obj; 30 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/UILayoutGrid.d.ts: -------------------------------------------------------------------------------- 1 | type UILayoutGrid = UIObject & 2 | UILayoutGridProps & { 3 | 1: ItemCollectRows; // Rows 4 | 2: ItemCollectColumns; // Columns 5 | } & Obj; 6 | 7 | type UILayoutGridProps = UIObjectProps & { 8 | columns: number; 9 | rows: number; 10 | defaultMargin: `${number}`; 11 | }; 12 | 13 | type ItemCollectColumns = GenericObj & { 14 | [key: number]: Item; 15 | }; 16 | 17 | type ItemCollectRows = GenericObj & { 18 | [key: number]: Item; 19 | }; 20 | 21 | type ItemPropsFixed = { 22 | sizePolicy: 'Fixed'; 23 | size?: number; 24 | minSize?: MAUISize; 25 | }; 26 | type ItemPropsStrech = { 27 | sizePolicy: 'Stretch'; 28 | size?: number; 29 | minSize?: MAUISize; 30 | }; 31 | type ItemPropsContent = { 32 | sizePolicy: 'Content'; 33 | size?: number; 34 | minSize?: MAUISize; 35 | }; 36 | // type ItemProps = ItemPropsFixed | ItemPropsStrech | ItemPropsContent; 37 | 38 | type ItemProps = { 39 | sizePolicy: SizePolicy; 40 | size?: number; 41 | minSize?: MAUISize; 42 | }; 43 | type Item = GenericObj & ItemProps; 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Lukas Runge Veranstaltungstechnik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grandma3-ts-types", 3 | "version": "2.0.0", 4 | "description": "TypeScript definitions for grandMA3 Lua library.", 5 | "types": "index.d.ts", 6 | "scripts": { 7 | "lint:check": "prettier --check \"typings/**/*.ts\"", 8 | "lint:fix": "prettier --write \"typings/**/*.ts\"", 9 | "tsc": "tsc --watch" 10 | }, 11 | "prettier": { 12 | "printWidth": 100, 13 | "proseWrap": "never", 14 | "singleQuote": true, 15 | "trailingComma": "all", 16 | "useTabs": true 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/ma3-pro-plugins/grandma3-ts-types.git" 21 | }, 22 | "author": "Lukas Runge", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/ma3-pro-plugins/grandma3-ts-types/issues" 26 | }, 27 | "homepage": "https://github.com/ma3-pro-plugins/grandma3-ts-types#readme", 28 | "devDependencies": { 29 | "@trivago/prettier-plugin-sort-imports": "^4.3.0", 30 | "lua-types": "^2.13.1", 31 | "prettier": "^3.6.2", 32 | "typescript": "5.8.2", 33 | "typescript-to-lua": "1.32.0" 34 | }, 35 | "keywords": [ 36 | "grandma3", 37 | "ma", 38 | "lighting", 39 | "typescript", 40 | "types", 41 | "typings" 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # grandMA3 types for TypeScriptToLua 2 | 3 | > This repo will soon merge back to https://github.com/LightYourWay/grandMA3-types and will be deprecated 4 | 5 | :warning: **OPEN ALPHA** → as there is no official API reference from MAlighting avaliable type declarations may be faulty or incomplete. 6 | 7 | TypeScript definitions for grandMA3 Lua API. 8 | This is a fork of https://www.npmjs.com/package/grandma3-types, by [Lukas Runge](https://www.npmjs.com/~lukas-runge). Since he is not responsive, I detached this fork and started maintaining it myself. 9 | 10 | ## Versions 11 | 12 | - Versions 2.x.x corresponds to MA3 version 1.9 13 | - Versions 1.x.x correspond to MA3 version 1.8 14 | 15 | ## Install 16 | ```bash 17 | npm install -D grandma3-ts-types 18 | ``` 19 | 20 | ## integrate into `tsconfig.json` 21 | 22 | ```json 23 | { 24 | "compilerOptions": { 25 | "types": ["grandma3-ts-types"] 26 | } 27 | } 28 | ``` 29 | 30 | ## Contributors 31 | 32 | If you have something to contribute / add to the type declarations - **AWESOME** :tada: feel free to: 33 | - [create a **GitHub Issue**](https://github.com/LightYourWay/grandMA3-types/issues/new/choose) for it. 34 | - Or better yet, fork and create a PR with your changes. 35 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/Display.d.ts: -------------------------------------------------------------------------------- 1 | type DisplayCollect = Obj; 2 | type Display = GenericObj & 3 | UILayoutGrid & { 4 | CmdLineSection: CmdLineSection; 5 | MainMenuCnt: MainMenuCnt; 6 | ScrollIndicatorBox: ScrollIndicatorBox; 7 | ViewBar: ViewBar; 8 | EncoderBarContainer: EncoderBarContainer; 9 | MainDialog: PlaceHolder; 10 | MainOverlay: PlaceHolder; 11 | FullScreen: PlaceHolder; 12 | ScreenOverlay: PlaceHolder; 13 | ModalOverlay: PlaceHolder; 14 | /** 15 | * Integer number as string 16 | */ 17 | w: string; 18 | /** 19 | * Integer number as string 20 | */ 21 | h: string; 22 | } & { 23 | scaleRatio: DisplayScaleRatio; 24 | }; 25 | type DisplayScaleRatio = '0.5x' | '0.75x' | '1x' | '1.25x' | '1.5x' | '1.75x' | '2x' | '2.5x'; 26 | type CmdLineSection = GenericObj; 27 | type MainMenuCnt = GenericObj; 28 | type ScrollIndicatorBox = GenericObj; 29 | type ViewBar = GenericObj; 30 | type EncoderBarContainer = GenericObj; 31 | // type ScreenOverlay = Obj & 32 | // UILayoutGrid & { 33 | // ClearUIChildren(): void; 34 | // Close(): void; 35 | // }; 36 | // type ModalOverlay = Obj & 37 | // UILayoutGrid & { 38 | // ClearUIChildren(): void; 39 | // }; 40 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/DeviceConfigurations.d.ts: -------------------------------------------------------------------------------- 1 | type DeviceConfigurations = Obj & { 2 | DMXProtocols: DMXProtocols; 3 | }; 4 | 5 | type DMXProtocols = Obj & { 6 | sACN: sACN; 7 | ArtNet: ArtNet; 8 | }; 9 | 10 | type ArtNet = Obj & { 11 | ArtNetDataCollect: ArtNetDataCollect; 12 | ArtNetNodeCollect: ArtNetNodeCollect; 13 | }; 14 | 15 | type sACN = Obj & { 16 | sACNDataCollect: sACNDataCollect; 17 | sACNDiscoveryCollect: sACNDiscoveryCollect; 18 | }; 19 | 20 | // ArtNet 21 | type ArtNetDataCollect = Obj; 22 | type ArtNetDataProps = ObjProps & { 23 | localUniverse: DMXUniverseNumber; 24 | mode: Enums.ArtNetDataMode; 25 | }; 26 | type ArtNetData = Obj & ArtNetDataProps; 27 | 28 | type ArtNetNodeCollect = Obj; 29 | 30 | // sACN 31 | type sACNDataCollect = Obj; 32 | type sACNDataProps = ObjProps & { 33 | localUniverse: number; 34 | mode: Enums.SacnDataMode; 35 | }; 36 | type sACNData = Obj & sACNDataProps; 37 | 38 | type sACNDiscoveryCollect = Obj; 39 | -------------------------------------------------------------------------------- /typings/grandMA3.Root/Root.d.ts: -------------------------------------------------------------------------------- 1 | type Root = Obj & { [index: string]: any } & { 2 | ShowData: ShowData; 3 | ColorTheme: ColorTheme; 4 | DeviceConfigurations: DeviceConfigurations; 5 | GraphicsRoot: GraphicsRoot; 6 | MANetSocket: MANetSocket; 7 | UsbNotifier: UsbNotifier; 8 | Temp: RootTemp; 9 | }; 10 | 11 | type UsbNotifier = Obj & { 12 | StorageDevice: StorageDevice; 13 | }; 14 | type StorageDevice = Obj & USBDeviceStorage[]; 15 | type USBDeviceStorageProps = ObjProps & { 16 | connected: boolean; 17 | connectedCount: any; 18 | ip: any; 19 | mountPoint: any; 20 | }; 21 | type USBDeviceStorage = Obj; 22 | 23 | type RootTemp = Obj & { 24 | DriveCollect: DriveCollect; 25 | }; 26 | 27 | type DriveCollect = Obj; 28 | type Drive = Obj & DriveProps; 29 | type DriveProps = ObjProps & { 30 | driveType: 'Removeable' | 'Internal' | 'OldVersion'; 31 | path: string; 32 | }; 33 | 34 | type MANetSocket = Obj & MANetSocketProps; 35 | type MANetSocketProps = ObjProps & { 36 | hostName: string; 37 | /** 38 | * Readonly 39 | */ 40 | primaryIp: string; 41 | session: string; 42 | showfile: string; 43 | /** 44 | * Readonly 45 | */ 46 | status: 'IdleMaster' | string; 47 | /** 48 | * Readonly 49 | */ 50 | sessionManager: 'Yes' | 'No'; 51 | }; 52 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/LineEdit.d.ts: -------------------------------------------------------------------------------- 1 | type LineEditSignals = UIObjectSignals & { 2 | textChanged: SignalId; 3 | clear: SignalId; 4 | charInput: SignalId; 5 | onWrongChar: SignalId; 6 | setText: SignalId; 7 | }; 8 | 9 | type LineEditProps = UIObjectProps & { 10 | textAutoAdjust: YesNo; 11 | prompt: string; 12 | message: string; 13 | property: string; 14 | 15 | /** Some kind of path? */ 16 | target: string; 17 | 18 | /** 19 | * IMPORTANT: When this is true, and the user uses the VirtualKeyboard, 20 | * then there is NO event when the user hits PLEASE and closes the keyboard. 21 | */ 22 | textChangeOnEnter: 1 | 0; 23 | texture: string | `cornder${number}`; 24 | iconAlignmentH: AlignmentH; 25 | iconAlignmentV: AlignmentV; 26 | showKeyboardButton: YesNo; 27 | keyboardIconAlignmentH: AlignmentH; 28 | signalValue: number; 29 | 30 | /** Some kind of path? */ 31 | content: string; 32 | forceCursor: YesNo; 33 | 34 | // These are common to Button 35 | textShadow: number; 36 | hasHover: YesNo; 37 | text: string; 38 | maxTextLength: number; 39 | /** Allows characters */ 40 | filter: string; 41 | vkPluginName: VKPluginName; 42 | vkTitleHint: string; 43 | // textColor: string 44 | font: Font; 45 | textAlignmentH: AlignmentH; 46 | pluginComponent: LuaComponent; 47 | focus: Focus; 48 | 49 | toolTip: string; 50 | enabled: YesNo; 51 | }; 52 | type LineEdit = UIObject & 53 | LineEditSignals & 54 | LineEditProps & { 55 | SelectAll(): void; 56 | DeSelect(): void; 57 | }; 58 | -------------------------------------------------------------------------------- /typings/grandMA3.UserProfile/functions.d.ts: -------------------------------------------------------------------------------- 1 | type UserProfileProps = ObjProps & { 2 | encoderUIStyle: Enums.EncoderUIStyle; 3 | autoRemoveGaps: boolean; 4 | }; 5 | 6 | type UserProfile = Obj & 7 | any[] & { [index: string]: any } & { 8 | Environments: Environments; 9 | Views: Views; 10 | KeyboardShortCuts: KeyboardShortCuts; 11 | ScreenConfigurations: ScreenConfigurations; 12 | LayoutElementDefaultsCollect: LayoutElementDefaultsCollect; 13 | UserAttributePreferences: UserAttributePreferences; 14 | Name: string; 15 | }; 16 | 17 | type Environments = Obj & { 18 | /** 19 | * Main Programmer Environment 20 | */ 21 | 1: UserEnvironment; 22 | /** 23 | * Preview Programmer Environment 24 | */ 25 | 2: UserEnvironment; 26 | }; 27 | 28 | type Views = Obj; 29 | 30 | type View = Obj; 31 | 32 | type UserAttributePreferences = Obj; 33 | 34 | type UserAttribute = Obj & { 35 | EncoderResolution: Enums.AttriebuteEncoderResolution; 36 | }; 37 | 38 | type UserEnvironmentChildTypes = Selection; 39 | type UserEnvironment = Obj & { 40 | 1: Selection; 41 | 2: Selection; 42 | 3: Programmer; 43 | 4: AtFilter; 44 | 6: LivePatch3dSelection; 45 | }; 46 | type Selection = Obj; 47 | type Programmer = Obj; 48 | type ProgPart = Obj; 49 | type AtFilterProps = ObjProps & { filterRef: Filter } 50 | type AtFilter = Obj; 51 | type LivePatch3dSelection = Obj; 52 | -------------------------------------------------------------------------------- /typings/grandMA3.ColorTheme/ColorTheme.d.ts: -------------------------------------------------------------------------------- 1 | type ColorTheme = Obj & { 2 | ColorDefCollect: ColorDefCollect; 3 | ColorGroups: ColorGroups; 4 | }; 5 | 6 | type ColorGroups = Obj & { 7 | Global: ColorGroupGlobal; 8 | PoolDefault: ColorGroupPoolDefault; 9 | [name: string]: ColorGroup; 10 | }; 11 | 12 | type ColorGroup = Obj & { 13 | [name: string]: MAColor; 14 | }; 15 | 16 | type MAColor = Obj & { 17 | /** 18 | * HEX string without a leading '#' 19 | * HEX string must include 8 characters 20 | */ 21 | RGBA: string; 22 | }; 23 | 24 | type ColorGroupPoolDefault= ColorGroup & { 25 | // TODO: Add all pools 26 | MATricks: MAColor; 27 | } 28 | 29 | type ColorGroupGlobal = ColorGroup & { 30 | Disabled: MAColor; 31 | Focus: MAColor; 32 | AnimatedFocus1: MAColor; 33 | AnimatedFocus2: MAColor; 34 | Hover: MAColor; 35 | Pressed: MAColor; 36 | Selected: MAColor; 37 | SelectedInverted: MAColor; 38 | SelectedEdge: MAColor; 39 | InvalidGridPosition: MAColor; 40 | PartlySelected: MAColor; 41 | SelectedPreset: MAColor; 42 | PartlySelectedPreset: MAColor; 43 | Transparent: MAColor; 44 | Transparent25: MAColor; 45 | Transparent50: MAColor; 46 | Transparent75: MAColor; 47 | Background: MAColor; 48 | BackgroundSelected: MAColor; 49 | BackgroundSelectedInverted: MAColor; 50 | ButtonBackground: MAColor; 51 | ButtonBackgroundDarker: MAColor; 52 | Default: MAColor; 53 | Inactive: MAColor; 54 | Bright: MAColor; 55 | Shadow: MAColor; 56 | Lightened: MAColor; 57 | Darkened: MAColor; 58 | Text: MAColor; 59 | LabelText: MAColor; 60 | WarningText: MAColor; 61 | ErrorText: MAColor; 62 | AlertText: MAColor; 63 | SuccessText: MAColor; 64 | Neutral: MAColor; 65 | Collected: MAColor; 66 | UserChanged: MAColor; 67 | }; 68 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/UIObject.d.ts: -------------------------------------------------------------------------------- 1 | type UIObjectProps = ObjProps & { 2 | // Layout Props 3 | anchors: Anchors; 4 | backColor: MAColor | string; 5 | padding: Padding; 6 | margin: Margin; 7 | maxSize: MAUISize; 8 | minSize: MAUISize; 9 | h: Height; 10 | w: Width; 11 | x: number; 12 | y: number; 13 | contentDriven: YesNo; 14 | contentWidth: YesNo; 15 | contentHeight: YesNo; 16 | forceContentMin: YesNo; 17 | separator: YesNo; 18 | 19 | // Appearance Props 20 | focus: Focus; 21 | hasFocus: YesNo; 22 | hideFocusFrame: YesNo; 23 | interactive: YesNo; 24 | visible: BooleanString; 25 | mixInBackColor: Obj; 26 | 27 | // Text Props 28 | alignmentH: AlignmentH; 29 | alignmentV: AlignmentV; 30 | font: Font; 31 | hasHover: YesNo; 32 | icon: string; // texture name 33 | iconColor: MAColor; 34 | iconAlignmentH: AlignmentH; 35 | iconAlignmentV: AlignmentV; 36 | text: string; 37 | textAlignmentH: AlignmentH; 38 | textColor: MAColor | string; 39 | textShadow: number; 40 | textShadowColor: Obj; 41 | /** 42 | * Scales down the text to fit the box. Also enabled text wrapping. 43 | */ 44 | textAutoAdjust: YesNo; 45 | texture: string; 46 | transparent: YesNo; 47 | }; 48 | 49 | type UIObjectSignals = { 50 | onLoad: SignalId; 51 | onVisible: SignalId; 52 | keyDown: SignalId; 53 | keyUp: SignalId; 54 | doubleClicked: SignalId; 55 | execute: SignalId; 56 | clicked: SignalId; 57 | focusGet: SignalId; 58 | focusLost: SignalId; 59 | }; 60 | type UIObject = Obj & 61 | UIObjectProps & 62 | UIObjectSignals & { 63 | readonly absRect: Rect; 64 | readonly absClientRect: Rect; 65 | GetOverlay(): Popup; 66 | }; 67 | 68 | type ScrollBox = Obj & 69 | UIObjectProps & 70 | UIObjectSignals & { 71 | readonly absRect: Rect; 72 | readonly absClientRect: Rect; 73 | GetOverlay(): Popup; 74 | }; 75 | -------------------------------------------------------------------------------- /typings/grandMA3.Patch/function.d.ts: -------------------------------------------------------------------------------- 1 | type Patch = Obj & 2 | any[] & { [index: string]: any } & { 3 | FixtureTypes: FixtureTypes; 4 | }; 5 | 6 | type LivePatch = Obj & 7 | any[] & { [index: string]: any } & { 8 | AttributeDefinitions: AttributeDefinitions; 9 | FixtureTypes: FixtureTypes; 10 | Stages: Stages; 11 | UIChannels: UIChannels; 12 | }; 13 | 14 | type Stages = Obj & { [index: number]: Stage }; 15 | 16 | type Stage = Obj & { 17 | note: string; 18 | Spaces: Spaces; 19 | Fixtures: Fixtures; 20 | }; 21 | type Spaces = Obj; 22 | type Fixtures = Obj; 23 | type DMXMultiAddrString = 24 | | DMXAddrString 25 | | `${DMXAddrString},${DMXAddrString}` 26 | | `${DMXAddrString},${DMXAddrString},${DMXAddrString}`; // May be more ? 27 | type Fixture = Obj & { 28 | /** 29 | * If the fixture has a CID, then the index is the CID. 30 | * If not, it will be the 1-based index of the fixture within the Stage. 31 | */ 32 | index: number; 33 | fid: number | 'None'; 34 | cid: number | 'None'; 35 | fixtureType: FixtureTypeObj; 36 | /** 37 | * I saw one case where the Universal fixture has a child of class Fixture (Not Subfixture), 38 | * and it doesn't have any mode or modeDirect. 39 | */ 40 | mode?: DMXMode; 41 | modeDirect?: DMXMode; 42 | patch: DMXMultiAddrString | ''; 43 | }; 44 | 45 | type SubFixture = Obj & { 46 | fixture: Fixture; 47 | stage: Stage; 48 | }; 49 | 50 | type UIChannels = Obj & UIChannel[]; 51 | 52 | /** 53 | * This is a LUA table (not user_data type) 54 | */ 55 | type UIChannel = { 56 | logical_channel: LogicalChannel; 57 | attr_index: number; 58 | rt_index: number; 59 | subAttribute: AttributeName; 60 | }; 61 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/MAtricks.d.ts: -------------------------------------------------------------------------------- 1 | type MAtricks = Obj & MAtrick[] & { [index: string]: MAtrick }; 2 | 3 | type MAtrickProps = ObjProps & MAtrickOnlyProps; 4 | type MAtrickTransform = 'None' | 'Mirror'; 5 | type MAtrickInvertStyle = 'Pan' | 'Tilt' | 'P+T' | 'All'; 6 | 7 | type MAtrickOnlyProps = { 8 | invertStyle: MAtrickInvertStyle; 9 | invertX: boolean; 10 | invertY: boolean; 11 | invertZ: boolean; 12 | phaserTransform: MAtrickTransform; 13 | x: number; 14 | y: number; 15 | z: number; 16 | xBlock: number | 'None' | 'No Block'; 17 | yBlock: number; 18 | zBlock: number; 19 | xGroup: number | 'None' | 'No Group'; 20 | yGroup: number; 21 | zGroup: number; 22 | xWings: number | 'None' | 'No Wings'; 23 | yWings: number; 24 | zWings: number; 25 | xWidth: number; 26 | yWidth: number; 27 | zWidth: number; 28 | xShuffle: number | 'None'; 29 | yShuffle: number | 'None'; 30 | zShuffle: number | 'None'; 31 | xShift: number; 32 | yShift: number; 33 | zShift: number; 34 | // X 35 | fadeFromX: number | 'None'; 36 | fadeToX: number | 'None'; 37 | delayFromX: number | 'None'; 38 | delayToX: number | 'None'; 39 | speedFromX: number | 'None'; 40 | speedToX: number | 'None'; 41 | phaseFromX: number | 'None'; 42 | phaseToX: number | 'None'; 43 | // Y 44 | fadeFromY: number | 'None'; 45 | fadeToY: number | 'None'; 46 | delayFromY: number | 'None'; 47 | delayToY: number | 'None'; 48 | speedFromY: number | 'None'; 49 | speedToY: number | 'None'; 50 | phaseFromY: number | 'None'; 51 | phaseToY: number | 'None'; 52 | // Z 53 | fadeFromZ: number | 'None'; 54 | fadeToZ: number | 'None'; 55 | delayFromZ: number | 'None'; 56 | delayToZ: number | 'None'; 57 | speedFromZ: number | 'None'; 58 | speedToZ: number | 'None'; 59 | phaseFromZ: number | 'None'; 60 | phaseToZ: number | 'None'; 61 | }; 62 | 63 | type MAtrickOnlyPropName = keyof MAtrickOnlyProps; 64 | 65 | type MAtrick = Obj & 66 | MAtrickProps & { 67 | appearance: Appearance; 68 | }; 69 | -------------------------------------------------------------------------------- /typings/grandMA3.Remotes/functions.d.ts: -------------------------------------------------------------------------------- 1 | type Remotes = Obj & { 2 | DCRemotes: DCRemotes; 3 | MIDIRemotes: MIDIRemotes; 4 | DmxRemotes: DmxRemotes; 5 | }; 6 | 7 | type DmxRemotesProps = ObjProps & { 8 | enabled: boolean; 9 | }; 10 | 11 | type DCRemotes = Obj; 12 | type DmxRemotes = Obj & DmxRemotesProps & { [key: string]: DmxRemote }; 13 | 14 | type MIDIRemotesProps = ObjProps & { 15 | enabled: boolean; 16 | feedbackInput: boolean; 17 | }; 18 | 19 | type MIDIRemotes = Obj & { 20 | Image: UserImage; 21 | } & MIDIRemotesProps; 22 | 23 | type RemoteFaderType = '' | 'Master' | 'X' | 'XA' | 'XB' | 'Temp' | 'Rate' | 'Speed' | 'Time'; 24 | type RemoteKeyType = 25 | | '' 26 | | '>>>' 27 | | '<<<' 28 | | 'Black' 29 | | 'DoubleSpeed' 30 | | 'Flash' 31 | | 'Go+' 32 | | 'Go-' 33 | | 'Goto' 34 | | 'HalfSpeed' 35 | | 'LearnSpeed' 36 | | 'Load' 37 | | 'On' 38 | | 'Off' 39 | | 'Pause' 40 | | 'Rate1' 41 | | 'Select' 42 | | 'SelFix' 43 | | 'Speed1' 44 | | 'Swap' 45 | | 'Time' 46 | | 'Temp' 47 | | 'Toggle' 48 | | 'Top'; 49 | type MIDIMidiType = 'Note' | 'NoteAttack' | 'NoteAttackDecay' | 'Control'; 50 | type RemoteLockType = '' | 'Yes'; 51 | type MIDIRemoteProps = ObjProps & { 52 | lock: RemoteLockType; 53 | target: Obj; 54 | fader: RemoteFaderType; 55 | key: RemoteKeyType; 56 | outFrom: number; 57 | outTo: number; 58 | enabled: boolean; 59 | in: string; 60 | out: string; 61 | triggerOn: number; 62 | triggerOff: number; 63 | inFrom: number; 64 | inTo: number; 65 | midiChannel: number; 66 | midiIndex: number; 67 | midiType: MIDIMidiType; 68 | }; 69 | 70 | type MIDIRemote = Obj; 71 | 72 | type DmxRemoteResolution = '8bit' | '16bit' | '24bit'; 73 | type DmxRemoteProps = ObjProps & { 74 | lock: RemoteLockType; 75 | target: Obj; 76 | fader: RemoteFaderType; 77 | key: RemoteKeyType; 78 | outFrom: number; 79 | outTo: number; 80 | enabled: boolean; 81 | in: string; 82 | out: string; 83 | triggerOn: number; 84 | triggerOff: number; 85 | inFrom: number; 86 | inTo: number; 87 | address: number; 88 | resolution: DmxRemoteResolution; 89 | }; 90 | 91 | type DmxRemote = Obj; 92 | -------------------------------------------------------------------------------- /typings/grandMA3.Display/types.d.ts: -------------------------------------------------------------------------------- 1 | type YesNo = 'Yes' | 'No'; 2 | type BooleanString = 'true' | 'false'; 3 | /** 4 | * Either an object, or a string of comma delimited values. 5 | * The string can be: 6 | * - "X,Y": where X is the anchor value for left and right anchors, and Y is the anchor value for top and bottom anchors 7 | * - "L,T,R,B": where L is the anchor value for left, T is the anchor value for top, R is the anchor value for right, and B is the anchor value for bottom 8 | */ 9 | type Anchors = 10 | | { 11 | left: number; 12 | right: number; 13 | top: number; 14 | bottom: number; 15 | } 16 | | `${number},${number}` 17 | | `${number},${number},${number},${number}`; 18 | 19 | type Padding = 20 | | { 21 | left: number; 22 | right: number; 23 | top: number; 24 | bottom: number; 25 | } 26 | | `${number}` // All sides 27 | | `${number},${number}` // Left/Right, Top/Bottom 28 | | `${number},${number},${number},${number}`; 29 | 30 | type Margin = 31 | | { 32 | left: number; 33 | right: number; 34 | top: number; 35 | bottom: number; 36 | } 37 | | `${number}` 38 | | `${number},${number}` 39 | | `${number},${number},${number},${number}`; 40 | 41 | /** 42 | * "minWminH" or "minW,minH" 43 | */ 44 | type MAUISize = `${number}` | `${number},${number}`; 45 | 46 | type Focus = 'InitialFocus' | 'Never' | 'CanHaveFocus' | 'WantsFocus' | 'TabOnly'; 47 | type Percentage = `${number}%`; 48 | type Width = number | Percentage; 49 | type Height = number | Percentage; 50 | 51 | type SizePolicy = 'Fixed' | 'Content' | 'Stretch'; 52 | type AlignmentH = 'Left' | 'Center' | 'Right'; 53 | type AlignmentV = 'Top' | 'Center' | 'Bottom'; 54 | 55 | type Font = 56 | | 'console32' 57 | | 'console28' 58 | | 'console24' 59 | | 'console20' 60 | | 'console18' 61 | | 'console16' 62 | | 'console14' 63 | | 'console12' 64 | | 'console10' 65 | | 'console8' 66 | | 'Medium20' 67 | | 'Regular32' 68 | | 'Regular28' 69 | | 'Regular24' 70 | | 'Regular20' 71 | | 'Regular18' 72 | | 'Regular16' 73 | | 'Regular14' 74 | | 'Regular11' 75 | | 'Regular9'; 76 | 77 | type SignalId = string | `:${string}`; 78 | 79 | type VKPluginName = 80 | | 'CueNumberInput' 81 | | 'IP4Prefix' 82 | | 'NumericInput' 83 | | 'RelCueNumberInput' 84 | | 'TextInput' 85 | | 'TextInputNumOnly' 86 | | 'TextInputNumOnlyRange' 87 | | 'TextInputTimeOnly'; 88 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # Snowpack dependency directory (https://snowpack.dev/) 45 | web_modules/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | .parcel-cache 78 | 79 | # Next.js build output 80 | .next 81 | out 82 | 83 | # Nuxt.js build / generate output 84 | .nuxt 85 | dist 86 | 87 | # Gatsby files 88 | .cache/ 89 | # Comment in the public line in if your project uses Gatsby and not Next.js 90 | # https://nextjs.org/blog/next-9-1#public-directory-support 91 | # public 92 | 93 | # vuepress build output 94 | .vuepress/dist 95 | 96 | # Serverless directories 97 | .serverless/ 98 | 99 | # FuseBox cache 100 | .fusebox/ 101 | 102 | # DynamoDB Local files 103 | .dynamodb/ 104 | 105 | # TernJS port file 106 | .tern-port 107 | 108 | # Stores VSCode versions used for testing VSCode extensions 109 | .vscode-test 110 | 111 | # yarn v2 112 | .yarn/cache 113 | .yarn/unplugged 114 | .yarn/build-state.yml 115 | .yarn/install-state.gz 116 | .pnp.* 117 | 118 | # vscode 119 | /.vscode -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/Layouts.d.ts: -------------------------------------------------------------------------------- 1 | type Layouts = Obj & Layout[] & { [index: string]: Layout }; 2 | 3 | type Layout = Obj & Element[] & { [index: string]: Element }; 4 | 5 | type LayoutElementCustomTextSize = 'Default' | 10 | 12 | 14 | 16 | 18 | 20 | 24 | 28 | 32; 6 | type ElementProps = ObjProps & { 7 | assignType: number; 8 | action: Enums.AssignmentButtonFunctionsSequence; 9 | appearance: Appearance; 10 | borderSize: number; 11 | /** 8 character hex string RGBA */ 12 | borderColor: string; 13 | /** 8 character hex string RGBA */ 14 | customTextColor: string; 15 | customTextAlignmentH: 'Center' | 'Left' | 'Right'; 16 | customTextAlignmentV: 'Center' | 'Top' | 'Bottom' | 'Above'; 17 | customTextSize: LayoutElementCustomTextSize; 18 | customTextText: string; 19 | fullResolution: boolean; 20 | height: number; 21 | id: number; 22 | visibilityElement: boolean; 23 | visibilityBar: boolean; 24 | visibilityObjectName: boolean; 25 | visibilityID: boolean; 26 | visibilityCID: boolean; 27 | visibilityBorder: boolean; 28 | visibilityValue: boolean; 29 | visibilityIndicatorBar: boolean; 30 | visibilitySelectionRelevance: boolean; 31 | paddingLeft: number; 32 | paddingRight: number; 33 | paddingTop: number; 34 | paddingBottom: number; 35 | posX: number; 36 | posY: number; 37 | width: number; 38 | }; 39 | 40 | declare namespace MA3_V1_8 { 41 | type ElementProps = { 42 | action: number; 43 | assignType: number; 44 | appearance: Appearance; 45 | borderSize: number; 46 | borderColor: string; 47 | customText: string; 48 | /** 8 character hex string RGBA */ 49 | fontSize: 'Default' | 10 | 12 | 14 | 16 | 18 | 20 | 24 | 28 | 32; 50 | id: number; 51 | positionH: number; 52 | positionW: number; 53 | paddingLeft: number; 54 | paddingRight: number; 55 | paddingTop: number; 56 | paddingBottom: number; 57 | posX: number; 58 | posY: number; 59 | visibilityElement: boolean; 60 | visibilityBar: boolean; 61 | visibilityObjectName: boolean; 62 | visibilityID: boolean; 63 | visibilityCID: boolean; 64 | visibilityBorder: boolean; 65 | visibilityValue: boolean; 66 | visibilityIndicatorBar: boolean; 67 | visibilitySelectionRelevance: boolean; 68 | textAlignmentH: 'Center' | 'Left' | 'Right'; 69 | textAlignmentV: 'Center' | 'Top' | 'Bottom' | 'Above'; 70 | /** 8 character hex string RGBA */ 71 | textColor: string; 72 | }; 73 | 74 | type Element = Obj & 75 | ElementProps & { 76 | object: Obj; 77 | }; 78 | } 79 | 80 | type Element = Obj & 81 | ElementProps & { 82 | object: Obj; 83 | note: string; 84 | }; 85 | -------------------------------------------------------------------------------- /typings/grandMA3.UserProfile/types/ScreenConfigurations.d.ts: -------------------------------------------------------------------------------- 1 | type ScreenConfigurations = Obj & 2 | ScreenConfiguration[] & { 3 | Default: ScreenConfiguration; 4 | [index: string]: ScreenConfiguration; 5 | }; 6 | 7 | type ScreenConfiguration = Obj & { 8 | ScreenContents: ScreenContents; 9 | 'ViewButtonScreens 2': ViewButtonScreens; 10 | }; 11 | 12 | type ScreenNumber = number; 13 | type ScreenContentKey = `ScreenContent ${ScreenNumber}`; 14 | type ScreenContents = Obj & Record; 15 | 16 | type ScreenContent = Obj; 17 | 18 | type WindowBaseProps = ObjProps & { 19 | appearance: Obj; 20 | minH: number; 21 | minW: number; 22 | note: string; 23 | x: number; 24 | y: number; 25 | w: number; 26 | h: number; 27 | display: number; 28 | snapToBlockSize: boolean; 29 | presetPoolType: number; 30 | }; 31 | 32 | interface WindowBase extends Obj, WindowBaseProps { 33 | WindowAppearance: WindowAppearance; 34 | WindowScrollPositions: WindowScrollPositions; 35 | } 36 | 37 | type WindowAppearance = Obj; 38 | type WindowScrollPositions = Obj & { 39 | /** 40 | * A string with 2 integer numbers separated by a comma. 41 | * The first number is the vertical scroll position. 42 | * The second number is the vertical cursor position. 43 | */ 44 | scrollV: string; 45 | /** 46 | * A string with 2 integer numbers separated by a comma. 47 | * The first number is the horizontal scroll position. 48 | * The second number is the horizontal cursor position. 49 | */ 50 | scrollH: string; 51 | }; 52 | 53 | interface WindowLayoutView extends WindowBase { 54 | name: 'WindowLayoutView'; 55 | // LayoutViewSettings: LayoutViewSettings; // Sometimes the name could be "LayoutViewSettings 1", but it should be always first 56 | [1]: LayoutViewSettings; 57 | } 58 | 59 | interface LayoutViewSettingsProps { 60 | Layout: Layout; 61 | FitType: 'Elements' | 'Canvas' | 'Both'; 62 | ShowTitleBar: boolean; 63 | AutoFit: boolean; 64 | PaddingLeft: number; 65 | PaddingRight: number; 66 | PaddingBottom: number; 67 | PaddingTop: number; 68 | } 69 | type LayoutViewSettings = Obj & LayoutViewSettingsProps; 70 | 71 | type ViewButtonScreenKey = `ViewButtonScreen ${number}`; 72 | type ViewButtonScreens = Obj & 73 | Record; 74 | 75 | type ViewButtonScreen = Obj; 76 | 77 | type ViewButton = Obj; 78 | 79 | interface WindowEncoderBar extends WindowBase { 80 | name: 'WindowEncoderBar'; 81 | EncoderBarWindowSettings: EncoderBarWindowSettings; 82 | } 83 | interface EncoderBarWindowSettingsProps { 84 | fadeEncoder: boolean; 85 | } 86 | type EncoderBarWindowSettings = Obj & EncoderBarWindowSettingsProps; 87 | -------------------------------------------------------------------------------- /typings/grandMA3.ColorTheme/ColorDefCollect.d.ts: -------------------------------------------------------------------------------- 1 | type ColorDefCollect = Obj & { 2 | Global: ColorDefGroupGlobal; 3 | SheetColor: ColorDefGroup; 4 | Playback: ColorDefGroup; 5 | PoolDefault: ColorDefGroup; 6 | }; 7 | 8 | type ColorDefGroup = Obj & { 9 | [name: string]: ColorDef; 10 | }; 11 | 12 | type ColorDef = Obj & { 13 | RGBA: string; 14 | }; 15 | 16 | type ColorDefGroupGlobal = ColorDefGroup & { 17 | Text: ColorDef; 18 | TextDefault: ColorDef; 19 | TextDark: ColorDef; 20 | Background: ColorDef; 21 | BackgroundDark: ColorDef; 22 | Header: ColorDef; 23 | AltHeader: ColorDef; 24 | DefaultCellBackground: ColorDef; 25 | DefaultCellAltBackground: ColorDef; 26 | Selected: ColorDef; 27 | SelectedInverted: ColorDef; 28 | SelectedEdge: ColorDef; 29 | InvalidGridPosition: ColorDef; 30 | MainMultiPatchSelected: ColorDef; 31 | PartlySelected: ColorDef; 32 | SelectedPreset: ColorDef; 33 | PartlySelectedPreset: ColorDef; 34 | BackgroundSelected: ColorDef; 35 | BackgroundInvalidGridPosition: ColorDef; 36 | BackgroundMainMultiPatchSelected: ColorDef; 37 | BackgroundSelectedInverted: ColorDef; 38 | Connected: ColorDef; 39 | Lasso: ColorDef; 40 | FocusFrame: ColorDef; 41 | WindowFocus: ColorDef; 42 | Hover: ColorDef; 43 | SelectedFrameBackground: ColorDef; 44 | SelectedRowBorder: ColorDef; 45 | Pressed: ColorDef; 46 | ButtonBackground: ColorDef; 47 | ActiveIcon: ColorDef; 48 | Inactive: ColorDef; 49 | Bright: ColorDef; 50 | TitleGray: ColorDef; 51 | LabelText: ColorDef; 52 | IndicatorBar: ColorDef; 53 | ButtonBackgroundDarker: ColorDef; 54 | PropertyBackground: ColorDef; 55 | PropertyBackgroundActive: ColorDef; 56 | Fixed: ColorDef; 57 | Icon: ColorDef; 58 | ButtonIndicatorIcon: ColorDef; 59 | IconHover: ColorDef; 60 | RedIndicator: ColorDef; 61 | DarkRedIndicator: ColorDef; 62 | GreenIndicator: ColorDef; 63 | DarkGreenIndicator: ColorDef; 64 | YellowIndicator: ColorDef; 65 | OrangeIndicator: ColorDef; 66 | CyanIndicator: ColorDef; 67 | UpdateIndicator: ColorDef; 68 | UpdateAddIndicator: ColorDef; 69 | UpdateIntegrated: ColorDef; 70 | UpdateAddIntegrated: ColorDef; 71 | Warning: ColorDef; 72 | Error: ColorDef; 73 | Alert: ColorDef; 74 | Success: ColorDef; 75 | RedBackground: ColorDef; 76 | OverlayBackground: ColorDef; 77 | GreenBackground: ColorDef; 78 | Shadow: ColorDef; 79 | ShadowDark: ColorDef; 80 | DeskLock: ColorDef; 81 | Disabled: ColorDef; 82 | Referenced: ColorDef; 83 | AfterGlow: ColorDef; 84 | GlobalPreset: ColorDef; 85 | SelectivePreset: ColorDef; 86 | UniversalPreset: ColorDef; 87 | ForSome: ColorDef; 88 | ForAll: ColorDef; 89 | ForNone: ColorDef; 90 | Lightened: ColorDef; 91 | Darkened: ColorDef; 92 | Transparent: ColorDef; 93 | Transparent25: ColorDef; 94 | Transparent50: ColorDef; 95 | Transparent75: ColorDef; 96 | Parked: ColorDef; 97 | RemoteInputLock: ColorDef; 98 | TextViewSelectedRow: ColorDef; 99 | TextViewBackground: ColorDef; 100 | TextViewFixedBackground: ColorDef; 101 | Collected: ColorDef; 102 | UserChanged: ColorDef; 103 | }; 104 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/functions.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Pool can be renamed !! So better 3 | */ 4 | type DataPoolClass = Obj & { 5 | index: DataPoolIndex; 6 | } & { 7 | 2: Filters; // Filters 8 | 4: PresetPools; // PresetPools 9 | 5: Groups; // Groups 10 | 6: Sequences; // Sequences 11 | 7: Plugins; // Plugins 12 | 8: Macros; // default name: Macros 13 | 10: MAtricks; // MATricks 14 | 12: Pages; // Pages 15 | 13: Layouts; // Layouts 16 | 14: Timecodes; // Timecodes 17 | }; 18 | 19 | type Groups = Obj & { 20 | Resize: (size: number) => void; 21 | }; 22 | type Group = Obj & { 23 | selectionData: FixtureSelectionData[]; 24 | }; 25 | type FixtureSelectionData = { 26 | grid: { 27 | inv: number; 28 | x: number; 29 | x_inv: number; 30 | y: number; 31 | y_inv: number; 32 | z: number; 33 | z_inv: number; 34 | }; 35 | sf_index: number; 36 | }; 37 | 38 | type Filters = Obj; 39 | type FilterProps = ObjProps & {}; 40 | type Filter = Obj; 41 | 42 | type RecipeProps = ObjProps & {}; 43 | 44 | type Recipe = Obj & { 45 | selection: Group; 46 | values: Preset; 47 | matricks: Obj; 48 | filter: Obj; 49 | }; 50 | 51 | type Timecodes = Obj & { [key: string]: Timecode }; 52 | type Timecode = Obj & { Triggers: Triggers }; 53 | 54 | type Triggers = Obj & { [key: string]: Track }; 55 | type Track = Obj; 56 | type TimeRange = Obj; 57 | type CmdSubTrack = Obj; 58 | type CmdSubTrackEventProps = ObjProps & { 59 | rawTime: number; 60 | }; 61 | type CmdSubTrackEvent = Obj; 62 | 63 | declare namespace MA3_v2_0_2 { 64 | type FilterProps = ObjProps & { 65 | active: boolean; 66 | }; 67 | } 68 | 69 | type DataPoolIndex = 70 | | 1 71 | | 2 72 | | 3 73 | | 4 74 | | 5 75 | | 6 76 | | 7 77 | | 8 78 | | 9 79 | | 10 80 | | 11 81 | | 12 82 | | 13 83 | | 14 84 | | 15 85 | | 16 86 | | 17 87 | | 18 88 | | 19 89 | | 20 90 | | 21 91 | | 22 92 | | 23 93 | | 24 94 | | 25 95 | | 26 96 | | 27 97 | | 28 98 | | 29 99 | | 30 100 | | 31 101 | | 32 102 | | 33 103 | | 34 104 | | 35 105 | | 36 106 | | 37 107 | | 38 108 | | 39 109 | | 40 110 | | 41 111 | | 42 112 | | 43 113 | | 44 114 | | 45 115 | | 46 116 | | 47 117 | | 48 118 | | 49 119 | | 50 120 | | 51 121 | | 52 122 | | 53 123 | | 54 124 | | 55 125 | | 56 126 | | 57 127 | | 58 128 | | 59 129 | | 60 130 | | 61 131 | | 62 132 | | 63 133 | | 64 134 | | 65 135 | | 66 136 | | 67 137 | | 68 138 | | 69 139 | | 70 140 | | 71 141 | | 72 142 | | 73 143 | | 74 144 | | 75 145 | | 76 146 | | 77 147 | | 78 148 | | 79 149 | | 80 150 | | 81 151 | | 82 152 | | 83 153 | | 84 154 | | 85 155 | | 86 156 | | 87 157 | | 88 158 | | 89 159 | | 90 160 | | 91 161 | | 92 162 | | 93 163 | | 94 164 | | 95 165 | | 96 166 | | 97 167 | | 98 168 | | 99 169 | | 100 170 | | 101 171 | | 102 172 | | 103 173 | | 104 174 | | 105 175 | | 106 176 | | 107 177 | | 108 178 | | 109 179 | | 110 180 | | 111 181 | | 112 182 | | 113 183 | | 114 184 | | 115 185 | | 116 186 | | 117 187 | | 118 188 | | 119 189 | | 120 190 | | 121 191 | | 122 192 | | 123 193 | | 124 194 | | 125 195 | | 126 196 | | 127 197 | | 128; 198 | -------------------------------------------------------------------------------- /typings/grandMA3.Patch/types/FixtureTypes.d.ts: -------------------------------------------------------------------------------- 1 | type FixtureTypes = Obj & 2 | FixtureTypeObj[] & { [index: string]: FixtureTypeObj }; 3 | 4 | type FixtureTypeObj = Obj & 5 | any[] & { [index: string]: any } & { 6 | DMXModes: DMXModes; 7 | Wheels: Wheels; 8 | AttributeDefinitions: AttributeDefinitions; 9 | }; 10 | 11 | type DMXModes = Obj & 12 | DMXMode[] & { [index: string]: DMXMode } & { 13 | Default: DMXMode; 14 | }; 15 | 16 | type DMXMode = Obj & 17 | any[] & { [index: string]: any } & { 18 | DMXChannels: DMXChannels; 19 | Relations: Relations; 20 | SubfixtureOverview: SubfixtureOverview; 21 | totalFootPrint: number; // Number of DMX Channels 22 | }; 23 | 24 | type DMXChannels = Obj & DMXChannel[] & { [index: string]: DMXChannel }; 25 | 26 | type DMXChannelProps = ObjProps & { 27 | attribute: string; 28 | dmxBreak: number; 29 | coarse: number | 'None'; 30 | fine: number | 'None'; 31 | ultra: number | 'None'; 32 | Highlight: number; 33 | lowLight: number; 34 | }; 35 | 36 | type DMXChannel = Obj & 37 | DMXChannelProps& LogicalChannel[] & { [index: string]: LogicalChannel }; 38 | 39 | type LogicalChannelProps = ObjProps & { 40 | attribute: string; 41 | snap: any; 42 | master: any; 43 | physicalFrom: number; 44 | physicalTo: number; 45 | 46 | }; 47 | type LogicalChannel = Obj & 48 | LogicalChannelProps & { 49 | ChannelFunction: ChannelFunction; 50 | }; 51 | 52 | type ChannelFunctionProps = ObjProps & { 53 | attribute: string; 54 | dmxFrom: number; 55 | dmxTo: number; // READ ONLY 56 | physicalFrom: number; 57 | physicalTo: number; 58 | wheel: Wheel; 59 | dmxInvert: boolean; 60 | }; 61 | type ChannelFunction = Obj & 62 | ChannelFunctionProps & { 63 | wheel: Wheel; 64 | }; 65 | 66 | type ChannelSetProps = ObjProps & { 67 | DMXfrom: number; 68 | DMXto: number; 69 | wheelSlotIndex: number; 70 | }; 71 | type ChannelSet = Obj & ChannelSetProps; 72 | 73 | type Wheels = Obj & Wheel[] & { [index: string]: Wheel }; 74 | 75 | type Wheel = Obj & Slot[]; 76 | 77 | type Slot = Obj & { 78 | color: string; // R,G,B,A : normalized 0-1 79 | image: GoboImage; 80 | }; 81 | 82 | type AttributeDefinitions = Obj & { 83 | FeatureGroups: FeatureGroups; 84 | Attributes: Attributes; 85 | }; 86 | 87 | type FeatureGroups = Obj; 88 | type FeatureGroup = Obj & { [key: string]: Feature }; 89 | 90 | type Feature = Obj & {}; 91 | 92 | /** 93 | * NOTE: Using attributes.Children() doesn't give all attributes. 94 | * Also we access the attributes by name attribute['ColorRGB_R'], 95 | * since not ALL attributes appear this way. 96 | * We need to get attributes with GetAttributeByUIChannel(). 97 | * 98 | * GetAttributeCount() is not the same as GetUIChannelCount(). 99 | */ 100 | type Attributes = Obj & { [key: string]: Attribute }; 101 | 102 | type Attribute = Obj & { 103 | Feature: Feature; 104 | Color: any; 105 | }; 106 | 107 | type Relations = Obj & { [key: string]: any }; 108 | 109 | type SubfixtureOverview = Obj & { [key: number]: FTSubfixture }; 110 | 111 | type FTSubfixture = Obj & any[]; 112 | -------------------------------------------------------------------------------- /typings/grandMA3.DataPool/types/Sequences.d.ts: -------------------------------------------------------------------------------- 1 | type Sequences = Obj & 2 | (Sequence | undefined)[] & { [index: string]: Sequence | undefined }; 3 | 4 | type SequenceRateMaster = 5 | | 'None' 6 | | 'Speed1' 7 | | 'Speed2' 8 | | 'Speed3' 9 | | 'Speed4' 10 | | 'Speed5' 11 | | 'Speed6' 12 | | 'Speed7' 13 | | 'Speed8' 14 | | 'Speed9' 15 | | 'Speed10' 16 | | 'Speed11' 17 | | 'Speed12' 18 | | 'Speed13' 19 | | 'Speed14' 20 | | 'Speed15' 21 | | 'BPM'; 22 | 23 | type SequenceSpeedMaster = SequenceRateMaster; 24 | 25 | /** 26 | * Mul - Multiple (Means multiply the bpm => faster) 27 | * Div - Divide (Means divide the bpm => slower) 28 | */ 29 | type SequenceSpeedScale = 30 | | 'Div256' 31 | | 'Div128' 32 | | 'Div64' 33 | | 'Div32' 34 | | 'Div16' 35 | | 'Div8' 36 | | 'Div4' 37 | | 'Div2' 38 | | 'One' 39 | | 'Mul2' 40 | | 'Mul4' 41 | | 'Mul8' 42 | | 'Mul16' 43 | | 'Mul32' 44 | | 'Mul64' 45 | | 'Mul128' 46 | | 'Mul256'; 47 | 48 | type SequenceRestartMode = 'Current Cue' | 'First Cue' | 'Next Cue'; 49 | type SequenceCueCommand = 'Enabled' | 'Force No' | 'Force Yes'; 50 | type SequenceExecutorDisplayMode = 'Data only' | 'Appearance only' | 'Both'; 51 | type SequenceMasterGoMode = 'None' | 'Go' | 'On' | 'Top'; 52 | type SequencePlaybackMaster = 'None' | `Playback${number}`; 53 | type SequencePriority = 'Lowest' | 'Low' | 'LTP' | 'High' | 'Highest' | 'HTP' | 'Swap' | 'Super'; 54 | type SequenceMib = 'Enabled' | 'Never' | 'Force Early' | 'Force UnpoGo' | 'Force Late'; 55 | type SequenceMibMode = 'None' | 'Early' | 'UponGo' | 'Late'; 56 | type SequenceProps = ObjProps & { 57 | autoStart: boolean; 58 | autoStop: boolean; 59 | autoFix: boolean; 60 | autoStomp: boolean; 61 | autoPrePos: boolean; 62 | cueCommand: SequenceCueCommand; 63 | executorDisplayMode: SequenceExecutorDisplayMode; 64 | includeLinkLastGo: boolean; 65 | killProtect: boolean; 66 | masterGoMode: SequenceMasterGoMode; 67 | offWhenOverridden: boolean; 68 | playbackMaster: SequencePlaybackMaster; 69 | preferCueAppearance: boolean; 70 | priority: SequencePriority; 71 | rateMaster: SequenceRateMaster; 72 | rateScale: SequenceSpeedScale; 73 | releaseFirstCue: boolean; 74 | restartMode: SequenceRestartMode; 75 | sequMib?: SequenceMib; 76 | sequMibMode?: SequenceMibMode; 77 | softLTP: boolean; 78 | speedFromRate: boolean; 79 | speedMaster: SequenceSpeedMaster; 80 | speedScale: SequenceSpeedScale; 81 | swapProtect: boolean; 82 | useExecutorTime: boolean; 83 | wrapAround: boolean; 84 | xFadeMode: boolean; 85 | xFadeReload: boolean; 86 | }; 87 | 88 | type Sequence = Obj & 89 | SequenceProps & 90 | (Cue | undefined)[] & { [index: string]: Cue | undefined } & { 91 | CurrentChild: () => LuaMultiReturn<[Cue | undefined, string]>; 92 | name: string; 93 | }; 94 | 95 | type Cue = Obj & 96 | (Part | undefined)[] & { [index: string]: Part | undefined } & { 97 | name: string; 98 | /** 99 | * This is the cue number multiplied by a 1000. 100 | * e.g. Cue number 5.1 is 5100 101 | * This should be used as a cue identifier and NOT the "index" property which is 102 | * an integer and for cue numbers 5.1 and 5.2 , both indexes will be 5. 103 | */ 104 | no: number; 105 | }; 106 | type PartProps = ObjProps & { 107 | appearance: Obj; 108 | command: string; 109 | note: string; 110 | part: number; 111 | /** 112 | * Before MA3 v2.3 : Raw Seconds. 1 sec = 16777216 113 | * Since MA3 v2.3 : Seconds. 114 | */ 115 | cueInFade: number; 116 | /** 117 | * Before MA3 v2.3 : Raw Seconds. 1 sec = 16777216 118 | * Since MA3 v2.3 : Seconds. 119 | */ 120 | cueInDelay: number; 121 | sync: boolean; 122 | }; 123 | 124 | type Part = Obj & PartProps &{}; 125 | 126 | declare namespace MA3_v2_0_2 { 127 | type SequenceProps = ObjProps & { 128 | autoStart: boolean; 129 | autoStop: boolean; 130 | autoFix: boolean; 131 | autoStomp: boolean; 132 | autoPrePos: boolean; 133 | commandEnable: boolean; 134 | executorDisplayMode: SequenceExecutorDisplayMode; 135 | includeLinkLastGo: boolean; 136 | killProtect: boolean; 137 | masterGoMode: SequenceMasterGoMode; 138 | offWhenOverridden: boolean; 139 | playbackMaster: SequencePlaybackMaster; 140 | preferCueAppearance: boolean; 141 | priority: SequencePriority; 142 | rateMaster: SequenceRateMaster; 143 | rateScale: SequenceSpeedScale; 144 | releaseFirstCue: boolean; 145 | restartMode: SequenceRestartMode; 146 | sequMib?: SequenceMib; 147 | sequMibMode?: SequenceMibMode; 148 | softLTP: boolean; 149 | speedFromRate: boolean; 150 | speedMaster: SequenceSpeedMaster; 151 | speedScale: SequenceSpeedScale; 152 | swapProtect: boolean; 153 | useExecutorTime: boolean; 154 | wrapAround: boolean; 155 | xFadeMode: boolean; 156 | xFadeReload: boolean; 157 | }; 158 | } 159 | -------------------------------------------------------------------------------- /typings/grandMA3.Obj/Obj.d.ts: -------------------------------------------------------------------------------- 1 | type GenericObj = Obj & { [key: string]: GenericObj }; 2 | 3 | type ObjProps = { 4 | name: string; 5 | nameAndApp: string; 6 | index: number; 7 | }; 8 | 9 | interface Obj< 10 | ParentType = Obj, 11 | ChildType = Obj | undefined, 12 | Props extends ObjProps & { [key: string]: any } = ObjProps & { [key: string]: any }, 13 | Clazz extends string = string, 14 | > { 15 | readonly lock: '' | 'Yes' | 'SS'; 16 | name: string; 17 | nameAndApp: string; 18 | index: number; 19 | 20 | AddListChildren(...args: any): any; 21 | AddListChildrenNames(...args: any): any; 22 | AddListLuaItem(...args: any): any; 23 | AddListLuaItems(...args: any): any; 24 | AddListNumericItem(...args: any): any; 25 | AddListNumericItems(...args: any): any; 26 | AddListObjectItem(...args: any): any; 27 | AddListPropertyItem(...args: any): any; 28 | AddListPropertyItems(...args: any): any; 29 | AddListRecursiveNames(...args: any): any; 30 | AddListStringItem(...args: any): any; 31 | AddListStringItems(...args: any): any; 32 | Addr(...args: any): any; 33 | AddrNative(): string; 34 | /** Adds a child to the end of this object childrens list */ 35 | Append(clazz?: string, undo?: UndoHandle, count?: number): any; 36 | Aquire(clazz?: string, undo?: UndoHandle): ChildType; 37 | Changed(...args: any): any; 38 | Children(): ChildType[]; 39 | ClearList(...args: any): any; 40 | ClearUIChildren(...args: any): any; 41 | /** 42 | * Sometimes when Children() returns no result, then CmdlineChildren will. 43 | */ 44 | CmdlineChildren(): ChildType[]; 45 | CommandAt(...args: any): any; 46 | CommandCall(...args: any): any; 47 | CommandCreateDefaults(...args: any): any; 48 | CommandDelete(...args: any): any; 49 | CommandStore(...args: any): any; 50 | Compare(...args: any): any; 51 | Copy(...args: any): any; 52 | Count(...args: any): any; 53 | /** 54 | * Create a child at the given index 55 | * @param childIndex 1-based 56 | * @param clazz class of child 57 | * @param undo 58 | */ 59 | Create(childIndex: number, clazz?: string, undo?: UndoHandle): ChildType; 60 | CurrentChild(): ChildType | undefined; 61 | Delete(childIndex: number, undo?: UndoHandle): void; 62 | Dump(): string; 63 | Export(...args: any): any; 64 | Find(...args: any): any; 65 | FindListItemByName(...args: any): any; 66 | FindListItemByValueStr(...args: any): any; 67 | FindParent(...args: any): any; 68 | /** 69 | * Find recursivly an object by name an/or class 70 | * @param name exact name of object. If undefined then only class will be matched. 71 | * @param clazz partial name of the class 72 | */ 73 | FindRecursive(name: string | undefined, clazz?: string): Obj; 74 | FindWild(search: string): any; 75 | Get(propName: keyof Props, role?: Enums.Roles): any; 76 | GetAssignedObj(...args: any): any; 77 | /** Get the child class name */ 78 | GetChildClass(): string; 79 | GetClass: () => Clazz; 80 | GetDisplay(): Display; 81 | GetDisplayIndex(index: number): Display; 82 | GetExportFileName(...args: any): any; 83 | /** 84 | * Get Fader value 85 | * If the object is an executor, then the options param can be empty, it does nothing. 86 | * If the object is a sequence, then the options.token is used to select which fader's value wil be retrieved. 87 | * @return double 0-100 88 | */ 89 | GetFader(options: GetFaderOptions): number; 90 | GetFaderText(...args: any): any; 91 | GetListItemAppearance(...args: any): any; 92 | GetListItemButton(...args: any): any; 93 | GetListItemName(...args: any): any; 94 | GetListItemsCount(...args: any): any; 95 | GetListItemValueI64(...args: any): any; 96 | GetListItemValueStr(...args: any): any; 97 | GetListSelectedItemIndex(...args: any): any; 98 | GetOverlay(...args: any): any; 99 | GetScreen(...args: any): any; 100 | GetUIChild(...args: any): any; 101 | GetUIChildrenCount(...args: any): any; 102 | GridCellExists(...args: any): any; 103 | GridGetBase(...args: any): any; 104 | GridGetCellData(...args: any): any; 105 | GridGetCellDimensions(...args: any): any; 106 | GridGetData(...args: any): any; 107 | GridGetDimensions(...args: any): any; 108 | GridGetParentRowId(...args: any): any; 109 | GridGetScrollCell(...args: any): any; 110 | GridGetScrollOffset(...args: any): any; 111 | GridGetSelectedCells(...args: any): any; 112 | GridGetSelection(...args: any): any; 113 | GridGetSettings(...args: any): any; 114 | GridIsCellReadOnly(...args: any): any; 115 | GridIsCellVisible(...args: any): any; 116 | GridScrollCellIntoView(...args: any): any; 117 | GridSetColumnSize(...args: any): any; 118 | GridsGetExpandHeaderCell(...args: any): any; 119 | GridsGetLevelButtonWidth(...args: any): any; 120 | HasActivePlayback(...args: any): any; 121 | HasParent(...args: any): any; 122 | HookDelete(...args: any): any; 123 | Import(filePath: string, fileName: string): boolean; 124 | Index: () => number; 125 | InputRun(...args: any): any; 126 | InputSetAdditionalParameter(...args: any): any; 127 | InputSetEditTitle(...args: any): any; 128 | InputSetTitle(...args: any): any; 129 | /** Insert a child at a given 1-based index, pushing all other children forward */ 130 | Insert(childIndex: number, clazz?: string, undo?: UndoHandle, count?: number): any; 131 | IsClass(...args: any): any; 132 | IsEmpty(...args: any): any; 133 | IsListItemEmpty(...args: any): any; 134 | IsListItemEnabled(...args: any): any; 135 | IsValid(...args: any): any; 136 | Load(...args: any): any; 137 | MaxCount(...args: any): any; 138 | /** 139 | * Set a callback that is called when the overlay is closed by one of the following: 140 | * - overlay.Close() was called 141 | * - CloseAllOverlays() was called 142 | * - The user pressed Escape, or clicked a CloseButton. 143 | * 144 | * General Note: signalId-s should be prefixed by a ":", 145 | * but when added to the signalTable we don't use the ":". 146 | * e.g. 147 | * OverlaySetCloseCallback(":myHandler") 148 | * signalTable.myHandler = ()=>{} 149 | * 150 | * The callback signature is: 151 | * 152 | * (modalResult: Enums.ModalResult, modalValue: number, ctx: any) => void 153 | * 154 | * IMPORTANT: When calling overlay.Close(), the Close returns immediatly, and the callback runs in another coroutine. 155 | */ 156 | OverlaySetCloseCallback(signalId: string, ctx?: any): any; 157 | Parent(): ParentType; 158 | PropertyCount(...args: any): any; 159 | PropertyName(...args: any): any; 160 | PropertyType(...args: any): any; 161 | Ptr(...args: any): any; 162 | /** 163 | * Remove child object 164 | * @param childIndex 1-based 165 | * @param undo 166 | */ 167 | Remove(childIndex: number, undo?: UndoHandle): void; 168 | RemoveListItem(...args: any): any; 169 | Resize(...args: any): any; 170 | Save(...args: any): any; 171 | ScrollDo(...args: any): any; 172 | ScrollGetInfo(...args: any): any; 173 | ScrollGetItemByOffset(...args: any): any; 174 | ScrollGetItemOffset(...args: any): any; 175 | ScrollGetItemSize(...args: any): any; 176 | ScrollIsNeeded(...args: any): any; 177 | SelectListItemByIndex(...args: any): any; 178 | SelectListItemByName(...args: any): any; 179 | SelectListItemByValue(...args: any): any; 180 | Set(propName: keyof Props, value: any): any; 181 | SetChildren(...args: any): any; 182 | SetEmptyListItem(...args: any): any; 183 | SetEnabledListItem(...args: any): any; 184 | SetFader(options: { value?: number; faderDisabled?: boolean; token?: string }): void; 185 | SetListItemAppearance(...args: any): any; 186 | SetListItemName(...args: any): any; 187 | SetPositionHint(...args: any): any; 188 | /** 189 | * Darkens the screen. 190 | * Can be executed on a Popup object which is appended to a ScreenOverlay or ModalOverlay. 191 | * @param callback Unknown 192 | */ 193 | ShowModal(callback?: (...args: any) => void): void; 194 | ToAddr(): FixtureAddress; 195 | UIChildren(...args: any): any; 196 | UILGGetColumnAbsXLeft(...args: any): any; 197 | UILGGetColumnAbsXRight(...args: any): any; 198 | UILGGetColumnWidth(...args: any): any; 199 | UILGGetRowAbsYBottom(...args: any): any; 200 | UILGGetRowAbsYTop(...args: any): any; 201 | UILGGetRowHeight(...args: any): any; 202 | WaitChildren(...args: any): any; 203 | WaitInit(...args: any): any; 204 | } 205 | 206 | type GetFaderOptions = { 207 | token?: 'FaderMaster' | 'FaderTemp'; 208 | index?: number; 209 | }; 210 | -------------------------------------------------------------------------------- /typings/lua.ftp/functions.d.ts: -------------------------------------------------------------------------------- 1 | // Based on http://w3.impa.br/~diego/software/luasocket/ftp.html 2 | 3 | /// 4 | 5 | /** @noSelfInFile */ 6 | 7 | /** 8 | * The ftp namespace offers thorough support to FTP, under a simple interface. The implementation conforms to RFC 959. 9 | * To really benefit from this module, a good understanding of LTN012, Filters sources and sinks is necessary. 10 | * @example``` 11 | * // to load the FTP module and any libraries it requires run: 12 | * import ftp = require('ftp') 13 | * ``` 14 | */ 15 | declare module 'ftp' { 16 | /** 17 | * time in seconds before the program gives up on a connection - `60` is the default time. 18 | */ 19 | export var TIMEOUT: number; 20 | 21 | /** 22 | * default port for ftp service 23 | */ 24 | export const PORT = 21; 25 | 26 | /** 27 | * used when no user is provided in url. should be changed to your username. `ftp` is the default username. 28 | */ 29 | export var USER: string; 30 | 31 | /** 32 | * used when no password is provided in url. should be changed to your e-mail. `anonymous@anonymous.org` is the default anonymous password. 33 | */ 34 | export var PASSWORD: string; 35 | 36 | /** 37 | * Parser for url string. 38 | * @param url is a `string` in the form: `[ftp://][[:]@][:][/][type=a|i]` 39 | */ 40 | export function genericform(url: string): Array; 41 | 42 | /** 43 | * Sink is the simple `LTN12` sink that will receive the downloaded data. 44 | */ 45 | type LTN12_sink = any; 46 | 47 | /** 48 | * `LTN12` pump step function used to pass data from the server to the sink. Defaults to the `LTN12` `pump.step` function 49 | */ 50 | type LTN12_pump_step = (...args: any) => any; 51 | 52 | /** 53 | * Allows for sending any command to the host. 54 | * @param host is the server to connect to. 55 | * @param sink is the simple LTN12 sink that will receive the downloaded data. 56 | * @param path Argument or path give the target path to the resource in the server. 57 | * @param user User name used for authentication. Defaults to `ftp`. 58 | * @param password Password used for authentication. Defaults to `anonymous@anonymous.org`. 59 | * @param command The FTP command used to obtain data. 60 | * @param port The port to used for the control connection. Defaults to 21. 61 | * @param type The transfer mode. Can take values "i" or "a". Defaults to whatever is the server default. 62 | * @param step `LTN12` pump step function used to pass data from the server to the sink. Defaults to the LTN12 `pump.step` function. 63 | * @param create An optional function to be used instead of `socket.tcp` when the communications socket is created. 64 | */ 65 | export function command(args: { 66 | host: string; 67 | sink: LTN12_sink; 68 | path: string; 69 | user?: string; 70 | password?: string; 71 | command?: string; 72 | port?: number; 73 | type?: 'i' | 'a'; 74 | step?: LTN12_pump_step; 75 | create?: (...args: any) => any; 76 | }): any; 77 | 78 | /** 79 | * Allows for sending any command to the host. 80 | * @param cmd The FTP command used to obtain data. 81 | */ 82 | export function command(cmd: string): any; 83 | 84 | /** 85 | * 86 | * @param host is the server to connect to. 87 | * @param port The port to used for the control connection. Defaults to 21. 88 | * @param create An optional function to be used instead of `socket.tcp` when the communications socket is created. 89 | */ 90 | export function open(host: string, port: number, create?: () => any): any; 91 | 92 | /** 93 | * The `get` function has two forms. The simple form has fixed functionality: it downloads the contents of a URL and returns it as a string. The generic form allows a lot more control, as explained below. 94 | * @param host is the server to connect to. 95 | * @param sink is the simple LTN12 sink that will receive the downloaded data. 96 | * @param argument gives the target path to the resource in the server. 97 | * @param user User name used for authentication. Defaults to `ftp`. 98 | * @param password Password used for authentication. Defaults to `anonymous@anonymous.org`. 99 | * @param command The FTP command used to obtain data. 100 | * @param port The port to used for the control connection. Defaults to 21. 101 | * @param type The transfer mode. Can take values "i" or "a". Defaults to whatever is the server default. 102 | * @param step `LTN12` pump step function used to pass data from the server to the sink. Defaults to the LTN12 `pump.step` function. 103 | * @param create An optional function to be used instead of `socket.tcp` when the communications socket is created. 104 | */ 105 | export function get(args: { 106 | host: string; 107 | sink: LTN12_sink; 108 | argument: string; 109 | user?: string; 110 | password?: string; 111 | command?: string; 112 | port?: number; 113 | type?: 'i' | 'a'; 114 | step?: LTN12_pump_step; 115 | create?: (...args: any) => any; 116 | }): LuaMultiReturn<[string, 1] | [string, null]>; 117 | 118 | /** 119 | * The `get` function has two forms. The simple form has fixed functionality: it downloads the contents of a URL and returns it as a string. The generic form allows a lot more control, as explained below. 120 | * @param host is the server to connect to. 121 | * @param sink is the simple LTN12 sink that will receive the downloaded data. 122 | * @param path gives the target path to the resource in the server. 123 | * @param user User name used for authentication. Defaults to `ftp`. 124 | * @param password Password used for authentication. Defaults to `anonymous@anonymous.org`. 125 | * @param command The FTP command used to obtain data. 126 | * @param port The port to used for the control connection. Defaults to 21. 127 | * @param type The transfer mode. Can take values "i" or "a". Defaults to whatever is the server default. 128 | * @param step `LTN12` pump step function used to pass data from the server to the sink. Defaults to the LTN12 `pump.step` function. 129 | * @param create An optional function to be used instead of `socket.tcp` when the communications socket is created. 130 | */ 131 | export function get(args: { 132 | host: string; 133 | sink: LTN12_sink; 134 | path: string; 135 | user?: string; 136 | password?: string; 137 | command?: string; 138 | port?: number; 139 | type?: 'i' | 'a'; 140 | step?: LTN12_pump_step; 141 | create?: (...args: any) => any; 142 | }): LuaMultiReturn<[string, 1] | [string, null]>; 143 | 144 | /** 145 | * The `get` function has two forms. The simple form has fixed functionality: it downloads the contents of a URL and returns it as a string. 146 | * @param url is a `string` in the form: `[ftp://][[:]@][:][/][type=a|i]` 147 | */ 148 | export function get(url: string): LuaMultiReturn<[string, 1] | [string, null]>; 149 | 150 | /** 151 | * The put function has two forms. The simple form has fixed functionality: it uploads a string of content into a URL. The generic form allows a lot more control, as explained below. 152 | * @param host is the server to connect to. 153 | * @param source is the simple LTN12 source that will provide the contents to be uploaded. 154 | * @param argument gives the target path to the resource in the server. 155 | * @param user User name used for authentication. Defaults to `ftp`. 156 | * @param password Password used for authentication. Defaults to `anonymous@anonymous.org`. 157 | * @param command The FTP command used to obtain data. 158 | * @param port The port to used for the control connection. Defaults to 21. 159 | * @param type The transfer mode. Can take values "i" or "a". Defaults to whatever is the server default. 160 | * @param step `LTN12` pump step function used to pass data from the server to the sink. Defaults to the LTN12 `pump.step` function. 161 | * @param create An optional function to be used instead of `socket.tcp` when the communications socket is created. 162 | */ 163 | export function put(args: { 164 | host: string; 165 | source: LTN12_sink; 166 | argument: string; 167 | user?: string; 168 | password?: string; 169 | command?: string; 170 | port?: number; 171 | type?: 'i' | 'a'; 172 | step?: LTN12_pump_step; 173 | create?: (...args: any) => any; 174 | }): LuaMultiReturn<[1] | [string, null]>; 175 | 176 | /** 177 | * The put function has two forms. The simple form has fixed functionality: it uploads a string of content into a URL. The generic form allows a lot more control, as explained below. 178 | * @param host is the server to connect to. 179 | * @param source is the simple LTN12 source that will provide the contents to be uploaded. 180 | * @param path gives the target path to the resource in the server. 181 | * @param user User name used for authentication. Defaults to `ftp`. 182 | * @param password Password used for authentication. Defaults to `anonymous@anonymous.org`. 183 | * @param command The FTP command used to obtain data. 184 | * @param port The port to used for the control connection. Defaults to 21. 185 | * @param type The transfer mode. Can take values "i" or "a". Defaults to whatever is the server default. 186 | * @param step `LTN12` pump step function used to pass data from the server to the sink. Defaults to the LTN12 `pump.step` function. 187 | * @param create An optional function to be used instead of `socket.tcp` when the communications socket is created. 188 | */ 189 | export function put(args: { 190 | host: string; 191 | source: LTN12_sink; 192 | path: string; 193 | user?: string; 194 | password?: string; 195 | command?: string; 196 | port?: number; 197 | type?: 'i' | 'a'; 198 | step?: LTN12_pump_step; 199 | create?: (...args: any) => any; 200 | }): LuaMultiReturn<[1] | [string, null]>; 201 | 202 | /** 203 | * The put function has two forms. The simple form has fixed functionality: it uploads a string of content into a URL. 204 | * @param url is a `string` in the form: `[ftp://][[:]@][:][/][type=a|i]` 205 | * @param content string of content which will be uploaded to the `url` 206 | */ 207 | export function put(url: string, content: string): LuaMultiReturn<[1] | [string, null]>; 208 | } 209 | -------------------------------------------------------------------------------- /typings/grandMA3.Global/functions.d.ts: -------------------------------------------------------------------------------- 1 | // Based on https://github.com/hossimo/GMA3Plugins/wiki/Echo 2 | 3 | /// 4 | 5 | /** @noSelfInFile */ 6 | 7 | declare type UndoHandle = any; // TODO: find a way to represent this handle 8 | declare type ObjectUserData = any; // TODO: find a way to represent this handle 9 | /** 10 | * Until MA3 version 2.1.x (Including) the MAObjectHandleStr was lowercase and allowed leading 0-s. 11 | * Starting from MA3 version 2.2.x the MAObjectHandleStr is uppercase and does not allow leading 0-s. 12 | */ 13 | declare type MAObjectHandleStr = `#${string}`; 14 | type DMXUniverseNumber = number; // 1-1024 15 | type DMXChannelNumber = number; // 1-512 16 | type DMXAddrString = `${DMXUniverseNumber}.${DMXChannelNumber}`; 17 | declare function AddFixtures(params: { 18 | mode: DMXMode; // DMXMode 19 | amount: number; 20 | /** 21 | * Name of the first fixture 22 | */ 23 | name?: string; 24 | /** 25 | * Fixture ID of the first fixture 26 | */ 27 | fid?: string; 28 | /* 29 | * This is a string with the CID for the fixture. 30 | * This table field is only valid if the "idtype" is not "Fixture". 31 | */ 32 | cid?: string; 33 | /** 34 | * This is a string with the name of the ID Type. 35 | * This is only needed if the type is different than "Fixture". 36 | */ 37 | idtype?: FixtureIDTypeKeyword; 38 | /** 39 | * This is a table with up to eight strings. 40 | * The string must indicate a universe and a start address in the universe. 41 | * The two must be separated by a dot. Each table element is used for the up to eight DMX breaks in the patch. 42 | */ 43 | patch?: DMXAddrString[]; 44 | layer?: string; 45 | class?: string; 46 | /** 47 | * This is a handle of the parent fixture. 48 | * It is only needed if the fixture should be a sub-fixture of an existing fixture. 49 | */ 50 | parent?: Fixture; 51 | /** 52 | * This is an integer indicating an insert index number 53 | */ 54 | insert_index?: number; 55 | /** 56 | * This is a string with an undo text. 57 | */ 58 | undo?: string; 59 | }): boolean | undefined; 60 | declare function AddIPAddress(...args: any): any; 61 | declare function AddonVars(...args: any): any; 62 | declare function BuildDetails(...args: any): any; 63 | declare function CheckDMXCollision(...args: any): any; 64 | declare function CheckFIDCollision(...args: any): any; 65 | declare function CloseAllOverlays(...args: any): any; 66 | declare function CloseUndo(undoRef: UndoHandle): any; 67 | /** 68 | * Run a command in a LUA thread 69 | * @param cmd 70 | * @param undo 71 | * @return returns "OK" if successful, or an error message if the command fails. 72 | */ 73 | declare function Cmd(cmd: string, undo?: UndoHandle): string; 74 | /** 75 | * Run a command in the MainTask thread 76 | * @param args 77 | */ 78 | declare function CmdIndirect(cmd: string, undo?: UndoHandle): undefined; 79 | declare function CmdIndirectWait(cmd: string, undo?: UndoHandle): undefined; 80 | declare function CmdObj(): { 81 | ClearCmd(): void; 82 | CmdText: string; 83 | CueUpdates: any; 84 | Destination: any; 85 | Library: any; 86 | MaxStep: any; 87 | PresetUpdates: any; 88 | RefreshMetaData(path: any): void; 89 | ShowMetaDataCollect: object; 90 | TempStoreSettings: any; 91 | User: any; 92 | Undos: any; 93 | IsFixed: any; //(exec: Executor)=> 1 | 0; 94 | }; 95 | 96 | declare type IsFixedFn = (exec: Executor) => 1 | 0; 97 | declare function Confirm(...args: any): any; 98 | 99 | declare function CreateUndo(...args: any): UndoHandle; 100 | declare function CurrentEnvironment(): Obj; 101 | declare function CurrentExecPage(...args: any): Page; 102 | declare function CurrentProfile(): UserProfile; 103 | declare function CurrentScreenConfig(): ScreenConfiguration; 104 | declare function CurrentUser(...args: any): any; 105 | declare function DataPool(): DataPoolClass; 106 | declare function DefaultDisplayPositions(...args: any): any; 107 | declare function DeleteIPAddress(...args: any): any; 108 | declare function DelVar(...args: any): any; 109 | declare function DeskLocked(...args: any): any; 110 | declare function DeviceConfiguration(): any; 111 | declare function DirList(...args: any): any; 112 | declare function DumpAllHooks(): any; 113 | /** 114 | * Prints to System Monitor only 115 | */ 116 | declare function Echo(msg: string): void; 117 | declare function ErrEcho(...args: any): any; 118 | declare function ErrPrintf(...args: any): any; 119 | declare function Export(...args: any): any; 120 | declare function ExportCSV(...args: any): any; 121 | declare function ExportJson(...args: any): any; 122 | declare function FileExists(...args: any): any; 123 | declare function FindBestDMXPatchAddr(...args: any): any; 124 | declare function FindBestFocus(uiObject: Obj): any; 125 | declare function FindNextFocus(...args: any): any; 126 | declare function FindTexture(...args: any): any; 127 | declare function FixtureType(...args: any): any; 128 | /** 129 | * This function should be called FromNativeAddr. 130 | * I acccepts the result of AddrNative() function. 131 | */ 132 | declare function FromAddr(nativeAddr: string): Obj; 133 | declare function GetAttributeByUIChannel(uiChannel: number): Attribute; 134 | declare function GetAttributeCount(): number; 135 | declare function GetAttributeIndex(attrName: string): number; 136 | declare function GetButton(...args: any): any; 137 | declare function GetChannelFunction(...args: any): any; 138 | declare function GetChannelFunctionIndex(...args: any): any; 139 | declare function GetDisplayByIndex(displayNumber: number): Display; 140 | declare function GetDisplayCollect(...args: any): DisplayCollect; 141 | declare function GetDMXUniverse(...args: any): any; 142 | declare function GetDMXValue(...args: any): any; 143 | declare function GetExecutor(...args: any): any; 144 | declare function GetFocus(...args: any): any; 145 | declare function GetFocusDisplay(): Display; 146 | declare function GetObject(address: string): T | undefined; 147 | declare function GetPath(...args: any): any; 148 | declare function GetPathOverrideFor(...args: any): any; 149 | declare function GetPathSeparator(): string; 150 | declare function GetPathType(...args: any): any; 151 | declare function GetPresetData(presetOrPart: Preset | Part): PresetData; 152 | declare function GetProgPhaser(...args: any): any; 153 | declare function GetProgPhaserValue(...args: any): any; 154 | declare function GetPropertyColumnId(...args: any): any; 155 | type RTChannel = { 156 | freq: number; 157 | dmx_channel: `FixtureType ${string}`; // e.g. FixtureType 14.6.2.1.2 158 | rt_index: number; 159 | info: object; 160 | dmx_lowlight: number; 161 | dmx_highlight: number; 162 | dmx_default: number; 163 | subfixture: SubFixture; 164 | fixture: Fixture; 165 | ui_index_first: number; 166 | patch: { 167 | break: number; 168 | ultra: number; 169 | fine: number; 170 | coarse: number; 171 | }; 172 | }; 173 | declare function GetRTChannel(rt_index: number): RTChannel; 174 | declare function GetRTChannelCount(...args: any): any; 175 | declare function GetSelectedAttribute(...args: any): any; 176 | declare function GetShowFileStatus(): string; 177 | declare function GetSubfixture(...args: any): Fixture | SubFixture; 178 | declare function GetSubfixtureCount(...args: any): any; 179 | declare function GetTokenName(...args: any): any; 180 | declare function GetTokenNameByIndex(...args: any): any; 181 | declare function GetTopModal(...args: any): any; 182 | declare function GetTopOverlay(...args: any): any; 183 | declare function GetUIChannel(ui_channel_index: number): UIChannel; 184 | declare function GetUIChannelCount(...args: any): any; 185 | declare function GetUIChannelIndex(...args: any): any; 186 | declare function GetUIChannels( 187 | subFixture: Fixture | SubFixture, 188 | returnAsHandles: boolean, 189 | ): UIChannel[]; 190 | declare function GetUIObjectAtPosition(...args: any): any; 191 | declare function GetVar(...args: any): string | undefined; 192 | declare function GlobalVars(...args: any): any; 193 | declare function HandleToInt(obj: Obj): number; 194 | declare function HandleToStr(obj: Obj): MAObjectHandleStr; 195 | declare type HookIndex = number; 196 | /** 197 | * Register a listener for object changes. 198 | * 199 | * If this function is called twice with the same callback function (and same object), then the callback will be called only once. 200 | * If it is called with different callback functions then each of them will be called. 201 | * @param callback 202 | * @param obj 203 | * @param pluginHandle 204 | */ 205 | declare function HookObjectChange>( 206 | callback: (obj: T, changeType: number) => void, 207 | obj: T, 208 | pluginHandle: any, 209 | ): HookIndex; 210 | type HostOSString = 'Linux' | 'Windows' | 'Mac' | 'Rtos'; 211 | declare function HostOS(): HostOSString; 212 | declare function HostSubType(): 'FullSize' | 'Light' | 'RPU' | 'onPCRackUnit' | 'Undefined'; 213 | declare function HostType(): 'Console' | 'onPC' | 'PU'; 214 | declare function Import(...args: any): any; 215 | declare function IncProgress(...args: any): any; 216 | declare function IntToHandle(...args: any): any; 217 | declare function IsObjectValid(handle: any): boolean; 218 | declare function IsValid(handle: any): boolean; 219 | declare function Keyboard(...args: any): any; 220 | declare function KeyboardObj(...args: any): any; 221 | declare function LoadExecConfig(...args: any): any; 222 | declare function LoadStorePreferencesFromProfile(...args: any): any; 223 | declare interface MessageBoxInputOptions { 224 | name: string; 225 | value: string; 226 | /** Custom field added by HEPI. Deprecated! Use MessageBoxHelper. TODO: reomve this ! */ 227 | type?: string; 228 | /** String containing characters to be blocked from user input */ 229 | blackFilter?: string; 230 | /** String containing characters that are allowed from user input */ 231 | whiteFilter?: string; 232 | /** A named ID reference to a special virtual keyboard which will be displayed when the user clicks on the virtual-keyboard icon next tot eh field input. See [this](https://github.com/hossimo/GMA3Plugins/wiki/Text-Input-Plugins) */ 233 | vkPlugin?: 234 | | 'CueNumberInput' 235 | | 'IP4Prefix' 236 | | 'NumericInput' 237 | | 'RelCueNumberInput' 238 | | 'TextInput' 239 | | 'TextInputNumOnly' 240 | | 'TextInputNumOnlyRange' 241 | | 'TextInputTimeOnly'; 242 | maxTextLength?: number; 243 | } 244 | declare interface MessageBoxStateOptions { 245 | name: string; 246 | state: boolean; 247 | group?: number; 248 | } 249 | declare interface MessageBoxSelectorOptions { 250 | name: string; 251 | selectedValue: number; 252 | values: { [key: string]: number }; 253 | type?: 0 | 1; // 0-swipe, 1-radio 254 | } 255 | declare interface MessageBoxOptions { 256 | title: string; 257 | backColor?: string; 258 | timeout?: number; // (ms) 259 | timeoutResultCancel?: boolean; 260 | timeoutResultID?: number; 261 | icon?: string; 262 | titleTextColor?: string; 263 | messageTextColor?: string; 264 | message?: string; 265 | display?: number | Obj; 266 | commands: { value: number; name: string }[]; 267 | inputs?: MessageBoxInputOptions[]; 268 | states?: MessageBoxStateOptions[]; 269 | selectors?: MessageBoxSelectorOptions[]; 270 | } 271 | declare interface MessageBoxResult { 272 | success: boolean; 273 | result: number; 274 | inputs: { [key: string]: string }; 275 | selectors: { [key: string]: number }; 276 | states: { [key: string]: boolean }; 277 | } 278 | declare function MessageBox(options: MessageBoxOptions): MessageBoxResult; 279 | declare function Mouse(...args: any): any; 280 | declare function MouseObj(...args: any): any; 281 | declare const MultiLanguage: Array<[string, string]>; 282 | declare const Obj: Obj; 283 | declare function ObjectList(address: string): T[]; 284 | declare function OverallDeviceCertificate(...args: any): any; 285 | declare function Patch(): Patch; 286 | declare function PluginVars(...args: any): any; 287 | declare interface PopupInputOptions { 288 | title: string; 289 | caller: Display; 290 | items: string[]; 291 | selectedValue: string; 292 | x?: number; 293 | y?: number; 294 | target?: any; 295 | render_options?: { 296 | left_icon: any; 297 | right_icon: any; 298 | }; 299 | useTopLeft?: boolean; 300 | properties?: { [key: string]: number }; 301 | } 302 | declare function PopupInput(options: PopupInputOptions): LuaMultiReturn<[number, string]>; 303 | /** 304 | * Prints to both System Monitor and Command Line History 305 | */ 306 | declare function Printf(...args: any): any; 307 | declare function Programmer(...args: any): any; 308 | declare function ProgrammerPart(...args: any): any; 309 | declare function Pult(...args: any): any; 310 | declare function RefreshLibrary(...args: any): any; 311 | declare function ReleaseType(...args: any): any; 312 | declare function RenewLayoutHook(...args: any): any; 313 | declare function Root(): Root; 314 | declare function SaveExecConfig(...args: any): any; 315 | declare function SaveStorePreferencesToProfile(...args: any): any; 316 | declare function SelectedSequence(): Sequence | undefined; 317 | declare function Selection(...args: any): any; 318 | declare function SelectionComponentX(...args: any): any; 319 | declare function SelectionComponentY(...args: any): any; 320 | declare function SelectionComponentZ(...args: any): any; 321 | declare function SelectionCount(...args: any): any; 322 | declare function SelectionFirst(...args: any): LuaMultiReturn<[any, number, number, number]>; 323 | declare function SelectionNext(...args: any): LuaMultiReturn<[any, number, number, number]>; 324 | declare function SelectionNotifyBegin(...args: any): any; 325 | declare function SelectionNotifyEnd(...args: any): any; 326 | declare function SelectionNotifyObject(...args: any): any; 327 | declare function SerialNumber(...args: any): any; 328 | declare function SetBlockInput(...args: any): any; 329 | declare function SetColor(...args: any): any; 330 | declare function SetFilterSettingsTarget(...args: any): any; 331 | declare function SetLED(...args: any): any; 332 | declare function SetProgPhaser(...args: any): any; 333 | declare function SetProgPhaserValue(...args: any): any; 334 | declare function SetProgress(...args: any): any; 335 | declare function SetProgressRange(...args: any): any; 336 | declare function SetProgressText(...args: any): any; 337 | declare function SetVar(...args: any): any; 338 | declare function ShowData(): ShowData; 339 | declare function ShowSettings(): any; 340 | declare function StartProgress(...args: any): any; 341 | declare function StopProgress(...args: any): any; 342 | declare function StrToHandle(strHandle: MAObjectHandleStr): T; 343 | declare function SyncFS(...args: any): any; 344 | declare function TextInput(...args: any): string; 345 | declare function Time(): number; 346 | declare function Timer(callback: () => void, delaySec: number, repeatTimes: number): void; 347 | declare function ToAddr(...args: any): any; 348 | declare function Touch( 349 | displayNumber: number, 350 | action: 'press' | 'move' | 'release', 351 | touchId: number, 352 | x: number, 353 | y: number, 354 | ): void; 355 | declare function TouchObj(...args: any): any; 356 | declare function Unhook(hookIndex: HookIndex): any; 357 | /** 358 | * Unhook all hooks referncing the given function OR object 359 | * @param callbackFn 360 | * @param obj 361 | * @return The number of removed hooks 362 | */ 363 | declare function UnhookMultiple(callbackFn?: () => any, obj?: Obj): number; 364 | declare function UserVars(...args: any): any; 365 | type MAVersionString = `${number}.${number}.${number}.${number}`; 366 | /** 367 | * Returns software version of grandMA3. 368 | */ 369 | declare function Version(): MAVersionString; 370 | declare function WaitModal(...args: any): any; 371 | declare function WaitObjectDelete(obj: Obj, secondsToWait?: number): true | undefined; 372 | 373 | type AttributeName = 374 | | 'Dimmer' 375 | | 'Pan' 376 | | 'Tilt' 377 | | 'Gobo1' 378 | | ColorWheelAttributeName 379 | | ColorRGBAttrName 380 | | string; // TODO 381 | type ColorWheelAttributeName = 'Color1' | 'Color2' | 'Color3' | 'Color4'; 382 | /** 383 | * type of colorAttrNames 384 | */ 385 | type ColorRGBAttrName = 386 | | 'ColorRGB_R' 387 | | 'ColorRGB_G' 388 | | 'ColorRGB_B' 389 | | 'ColorRGB_C' 390 | | 'ColorRGB_M' 391 | | 'ColorRGB_Y' 392 | | 'ColorRGB_RY' 393 | | 'ColorRGB_GY' 394 | | 'ColorRGB_GC' 395 | | 'ColorRGB_BC' 396 | | 'ColorRGB_BM' 397 | | 'ColorRGB_RM' 398 | | 'ColorRGB_W' 399 | | 'ColorRGB_WW' 400 | | 'ColorRGB_CW' 401 | | 'ColorRGB_UV'; 402 | 403 | type PD_AttributeData = PD_AttributeStepValue[] & PD_AttributeValuesMeta; 404 | type PD_AccelDecelType = 1 | 2; 405 | type PD_AttributeStepValue = { 406 | /** 407 | * Range 0-100 float 408 | * This value is normalized to the range of the ChannelFunction. 409 | * For example, if a ChannelFunction has range of 0-127 (and not 0-255), 410 | * then the absolute value of 100, will be 127 in DMX, which is 50% of the range. 411 | */ 412 | absolute: number; //0-100 413 | /** 414 | * Range 0-100 float 415 | * This is independent of the Physical range. (Not like ReleativePhys as it is exported when exporting a collection of a preset) 416 | * For example if the attribute is Tilt, and a preset exists for a fixture type with physical range or 360 degrees. 417 | * If you change the physical range of that fixture type, this value won't change, but when you look at relative values in the Fixture sheet or in 3D they will change. 418 | */ 419 | relative: number; //0-100 420 | /** 421 | * 16777216 = 100% 422 | */ 423 | absolute_value: number; // 16,777,216 = 100% 424 | abs_release: boolean; 425 | accel: number; // Phaser 426 | /** 427 | * Phaser 428 | * Value of 1, labeled as "F" when 2-dimensional Circle is applied 429 | * Value of 2, labeled as "P" when 1-dimensional Sinus is applied 430 | **/ 431 | accel_type: PD_AccelDecelType; 432 | channel_function: number; 433 | decel: number; // Phaser 434 | /** 435 | * Phaser 436 | * Value of 1, labeled as "F" when 2-dimensional Circle is applied 437 | * Value of 2, labeled as "P" when 1-dimensional Sinus is applied 438 | **/ 439 | decel_type: PD_AccelDecelType; 440 | integrated: Preset; 441 | mask_individual: number; 442 | mask_integrated: number; 443 | trans: number; // Phaser 444 | width: number; // Phaser 445 | }; 446 | type PD_AttributeStepParamName = keyof PD_AttributeStepValue; 447 | type PD_AttributeStepParamValue = number | boolean | Preset | undefined; 448 | /** 449 | * Value is an integer x100 from the real value. 450 | * So 2 measures is value of 200. 451 | * The range is: 0 - 32 * 100 (32 measures is the max) 452 | * NOTE: This is a single value for all steps 453 | */ 454 | type PD_MeasurePercent = number; 455 | type PD_AttributeValuesMeta = PD_FixtureMetaData & { 456 | gridposmatr: any; 457 | mask_active_phaser: any; 458 | /** 459 | * Value is an integer x100 from the real value. 460 | * So 2 measures is value of 200. 461 | * The range is: 0 - 32 * 100 (32 measures is the max) 462 | * NOTE: This is a single value for all steps 463 | */ 464 | measure: PD_MeasurePercent; // Phaser 465 | /** 466 | * Units are abstract ratio from 60 bpm (Speed 1.0 is 60 bpm) 467 | * NOTE: This is a single value for all steps 468 | */ 469 | speed: number; // Phaser 470 | }; 471 | type PD_AttributeValuesMetaParamName = keyof PD_AttributeValuesMeta; 472 | 473 | type PD_FixtureMetaData = { 474 | selective: boolean; 475 | ui_channel_index: number; 476 | }; 477 | 478 | type FixtureName = string; 479 | /** 480 | * This fixture address is a unique identifier for a fixture. 481 | * Is can be directly used with ObjectList() to get the fixture object. 482 | */ 483 | 484 | type FixtureAddressRaw = 485 | | `Stage ${number}.${number}.${FixtureName}` 486 | | `Stage ${number}.${number}.${number}`; 487 | type FixtureAddressStandard = `${Exclude} ${FixtureCIDType}`; 488 | type FixtureAddress = FixtureAddressStandard | FixtureAddressRaw; 489 | /** 490 | * This corresponds to the IDType in an exported Group XML. 491 | * NOTE: The IDType of keyword "Stage" is 0 (same as Fixture), this might be an MA BUG. (MA3 v2.0.2.0) 492 | */ 493 | type FixtureIDType = 0 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9; 494 | type FixtureIDTypeKeyword = 495 | | 'Fixture' 496 | | 'Channel' 497 | | 'Universal' 498 | | 'HouseLights' 499 | | 'NonDim' 500 | | 'Media' 501 | | 'Fog' 502 | | 'Effect' 503 | | 'Pyro' 504 | | 'MArker' 505 | /** 506 | * Stage: The CID in this case is a relative address from ShowData/Patch/Stages. 507 | * Fixture get this address when it has no FID and no CID. 508 | * Also, this is not a valid Command syntax keyword. It is only used with ObjectList() function. 509 | */ 510 | | 'Stage'; 511 | 512 | type SubFixtureIType = `${number}`; 513 | type FixtureFIDType = `${number}` | `${number}.${SubFixtureIType}`; 514 | 515 | type FixtureCIDOnlyType = `${number}`; 516 | type FixtureCIDType = `${number}` | `${number}.${number}` | `${number}.${number}.${number}`; 517 | /** 518 | * This is used when a fixture has no FId and no CID. 519 | * The numbers are object index (1-based) relative to ShowData/Patch/Stages 520 | */ 521 | type FixtureRawRelativeAddressType = 522 | | `${number}` 523 | | `${number}.${number}` 524 | | `${number}.${number}.${number}` 525 | | `${number}.${number}.${number}.${number}` 526 | | `${number}.${number}.${number}.${number}.${number}`; 527 | type FixtureIDTypeKeywordNoFixture = 528 | | 'Channel' 529 | | 'Universal' 530 | | 'HouseLights' 531 | | 'NonDim' 532 | | 'Media' 533 | | 'Fog' 534 | | 'Effect' 535 | | 'Pyro' 536 | | 'MArker'; 537 | 538 | /** 539 | * 540 | */ 541 | type FixtureAddressAsPresetDataKey = 542 | | FixtureFIDType 543 | | `${FixtureIDTypeKeywordNoFixture} ${FixtureCIDOnlyType}` 544 | | FixtureRawRelativeAddressType; 545 | 546 | /** 547 | * Record 548 | */ 549 | type PresetData = { 550 | by_fixtures: Record>; 551 | } & { 552 | [key: number]: PD_AttributeData; 553 | }; 554 | --------------------------------------------------------------------------------