UNPKG

@joergmittaglawo/dmvconfig

Version:

DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.

337 lines (336 loc) 13.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.All = exports.Downmixes = exports.MonosAsNamedTableRow = exports.Monos = exports.StereosAsNamedTableRow = exports.Stereos = exports.Mode71AsNamedTableRow = exports.Mode71 = exports.Mode51AsNamedTableRow = exports.Mode51 = exports.ChannelSelectionAsNamedTableRow = exports.ChannelSelection = exports.ChannelMonoAsNamedTableRow = exports.ChannelMono = exports.ChannelStereoAsNamedTableRow = exports.ChannelStereo = exports.SourceStereo = exports.Source = exports.ResourceStatus = exports.lower = exports.lift = void 0; const VScript = require("vscript"); const _Audio = require("./Audio"); exports.lift = { Downmixes: (kwl, socket) => kwl ? (new Downmixes(new VScript.Subtree(socket, kwl))) : null, Monos: (kwl, socket) => kwl ? (new Monos(new VScript.Subtree(socket, kwl))) : null, Stereos: (kwl, socket) => kwl ? (new Stereos(new VScript.Subtree(socket, kwl))) : null, StereosOutput: (kwl, socket) => kwl ? (new StereosOutput(new VScript.Subtree(socket, kwl))) : null, Mode71: (kwl, socket) => kwl ? (new Mode71(new VScript.Subtree(socket, kwl))) : null, Mode51: (kwl, socket) => kwl ? (new Mode51(new VScript.Subtree(socket, kwl))) : null, ChannelSelection: (kwl, socket) => kwl ? (new ChannelSelection(new VScript.Subtree(socket, kwl))) : null, ChannelMono: (kwl, socket) => kwl ? (new ChannelMono(new VScript.Subtree(socket, kwl))) : null, ChannelStereo: (kwl, socket) => kwl ? (new ChannelStereo(new VScript.Subtree(socket, kwl))) : null, SourceStereo: (kwl, socket) => kwl ? (new SourceStereo(new VScript.Subtree(socket, kwl))) : null, Source: (kwl, socket) => kwl ? (new Source(new VScript.Subtree(socket, kwl))) : null, ResourceStatus: (kwl, socket) => kwl ? (new ResourceStatus(new VScript.Subtree(socket, kwl))) : null }; exports.lower = { Downmixes: (ref) => ref ? ref.raw.kwl : null, Monos: (ref) => ref ? ref.raw.kwl : null, Stereos: (ref) => ref ? ref.raw.kwl : null, StereosOutput: (ref) => ref ? ref.raw.kwl : null, Mode71: (ref) => ref ? ref.raw.kwl : null, Mode51: (ref) => ref ? ref.raw.kwl : null, ChannelSelection: (ref) => ref ? ref.raw.kwl : null, ChannelMono: (ref) => ref ? ref.raw.kwl : null, ChannelStereo: (ref) => ref ? ref.raw.kwl : null, SourceStereo: (ref) => ref ? ref.raw.kwl : null, Source: (ref) => ref ? ref.raw.kwl : null, ResourceStatus: (ref) => ref ? ref.raw.kwl : null }; class ResourceStatus { constructor(raw) { this.raw = raw; } get list_of_free_outputs() { return new VScript.rKeyword(this, "list_of_free_outputs"); } get number_of_dangling_channel_blocks() { return new VScript.rKeyword(this, "number_of_dangling_channel_blocks"); } get max_size_of_dangling_channel_block() { return new VScript.rKeyword(this, "max_size_of_dangling_channel_block"); } } exports.ResourceStatus = ResourceStatus; class Source { constructor(raw) { this.raw = raw; } get channel() { return new VScript.duplexKeyword(this, "channel"); } get source() { return new VScript.duplexKeyword(this, "source", { lift: _Audio.lift.Essence, lower: _Audio.lower.Essence }); } } exports.Source = Source; class SourceStereo { constructor(raw) { this.raw = raw; } get channel_left() { return new VScript.duplexKeyword(this, "channel_left"); } get channel_right() { return new VScript.duplexKeyword(this, "channel_right"); } get source() { return new VScript.duplexKeyword(this, "source", { lift: _Audio.lift.Essence, lower: _Audio.lower.Essence }); } } exports.SourceStereo = SourceStereo; class ChannelStereo { constructor(raw) { this.raw = raw; } get gain() { return new VScript.rwKeyword(this, "gain"); } get phase_inversion() { return new VScript.rwKeyword(this, "phase_inversion"); } get mute() { return new VScript.rwKeyword(this, "mute"); } get balance() { return new VScript.rwKeyword(this, "balance"); } get source() { return new SourceStereo(this.raw.find("source")); } } exports.ChannelStereo = ChannelStereo; class ChannelStereoAsNamedTableRow extends ChannelStereo { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.raw_row = raw_row; this.enclosing_table = enclosing_table; this.index = raw_row.index; } async rename(name, opts) { await this.raw_row.rename(name, opts); } async delete(opts) { await this.raw_row.delete(opts); } } exports.ChannelStereoAsNamedTableRow = ChannelStereoAsNamedTableRow; class ChannelMono { constructor(raw) { this.raw = raw; } get gain() { return new VScript.rwKeyword(this, "gain"); } get phase_inversion() { return new VScript.rwKeyword(this, "phase_inversion"); } get mute() { return new VScript.rwKeyword(this, "mute"); } get pan() { return new VScript.rwKeyword(this, "pan"); } get source() { return new Source(this.raw.find("source")); } } exports.ChannelMono = ChannelMono; class ChannelMonoAsNamedTableRow extends ChannelMono { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.raw_row = raw_row; this.enclosing_table = enclosing_table; this.index = raw_row.index; } async rename(name, opts) { await this.raw_row.rename(name, opts); } async delete(opts) { await this.raw_row.delete(opts); } } exports.ChannelMonoAsNamedTableRow = ChannelMonoAsNamedTableRow; class ChannelSelection { constructor(raw) { this.raw = raw; } get gain() { return new VScript.rwKeyword(this, "gain"); } get phase_inversion() { return new VScript.rwKeyword(this, "phase_inversion"); } get mute() { return new VScript.rwKeyword(this, "mute"); } get source() { return new Source(this.raw.find("source")); } } exports.ChannelSelection = ChannelSelection; class ChannelSelectionAsNamedTableRow extends ChannelSelection { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.raw_row = raw_row; this.enclosing_table = enclosing_table; this.index = raw_row.index; } async rename(name, opts) { await this.raw_row.rename(name, opts); } async delete(opts) { await this.raw_row.delete(opts); } } exports.ChannelSelectionAsNamedTableRow = ChannelSelectionAsNamedTableRow; class Mode51 { constructor(raw) { this.raw = raw; } get front_left() { return new ChannelSelection(this.raw.find("front_left")); } get front_right() { return new ChannelSelection(this.raw.find("front_right")); } get center() { return new ChannelSelection(this.raw.find("center")); } get lfe() { return new ChannelSelection(this.raw.find("lfe")); } get rear_surround_left() { return new ChannelSelection(this.raw.find("rear_surround_left")); } get rear_surround_right() { return new ChannelSelection(this.raw.find("rear_surround_right")); } get output() { return new _Audio.Essence(this.raw.find("output")); } } exports.Mode51 = Mode51; class Mode51AsNamedTableRow extends Mode51 { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.raw_row = raw_row; this.enclosing_table = enclosing_table; this.index = raw_row.index; } async rename(name, opts) { await this.raw_row.rename(name, opts); } async delete(opts) { await this.raw_row.delete(opts); } } exports.Mode51AsNamedTableRow = Mode51AsNamedTableRow; class Mode71 { constructor(raw) { this.raw = raw; } get front_left() { return new ChannelSelection(this.raw.find("front_left")); } get front_right() { return new ChannelSelection(this.raw.find("front_right")); } get center() { return new ChannelSelection(this.raw.find("center")); } get surround_left() { return new ChannelSelection(this.raw.find("surround_left")); } get surround_right() { return new ChannelSelection(this.raw.find("surround_right")); } get lfe() { return new ChannelSelection(this.raw.find("lfe")); } get rear_surround_left() { return new ChannelSelection(this.raw.find("rear_surround_left")); } get rear_surround_right() { return new ChannelSelection(this.raw.find("rear_surround_right")); } get output() { return new _Audio.Essence(this.raw.find("output")); } } exports.Mode71 = Mode71; class Mode71AsNamedTableRow extends Mode71 { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.raw_row = raw_row; this.enclosing_table = enclosing_table; this.index = raw_row.index; } async rename(name, opts) { await this.raw_row.rename(name, opts); } async delete(opts) { await this.raw_row.delete(opts); } } exports.Mode71AsNamedTableRow = Mode71AsNamedTableRow; class StereosOutput { constructor(raw) { this.raw = raw; } /** Reset to default */ get reset_to_default() { return new VScript.wKeyword(this, "reset_to_default"); } get gain() { return new VScript.rwKeyword(this, "gain"); } get phase_inversion() { return new VScript.rwKeyword(this, "phase_inversion"); } get output() { return new _Audio.Essence(this.raw.find("output")); } } class Stereos { constructor(raw) { this.raw = raw; } get mono_channels() { return new VScript.StronglyTypedNamedTable(new VScript.NamedTable(this.raw.socket, this.raw.full_kwl("mono_channels")), (row, enclosing_table) => new ChannelMonoAsNamedTableRow(row, enclosing_table)); } get stereo_pairs() { return new VScript.StronglyTypedNamedTable(new VScript.NamedTable(this.raw.socket, this.raw.full_kwl("stereo_pairs")), (row, enclosing_table) => new ChannelStereoAsNamedTableRow(row, enclosing_table)); } get output() { return new StereosOutput(this.raw.find("output")); } } exports.Stereos = Stereos; class StereosAsNamedTableRow extends Stereos { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.raw_row = raw_row; this.enclosing_table = enclosing_table; this.index = raw_row.index; } async rename(name, opts) { await this.raw_row.rename(name, opts); } async delete(opts) { await this.raw_row.delete(opts); } } exports.StereosAsNamedTableRow = StereosAsNamedTableRow; class Monos { constructor(raw) { this.raw = raw; } get channels() { return new VScript.StronglyTypedNamedTable(new VScript.NamedTable(this.raw.socket, this.raw.full_kwl("channels")), (row, enclosing_table) => new ChannelSelectionAsNamedTableRow(row, enclosing_table)); } get output() { return new _Audio.Essence(this.raw.find("output")); } } exports.Monos = Monos; class MonosAsNamedTableRow extends Monos { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.raw_row = raw_row; this.enclosing_table = enclosing_table; this.index = raw_row.index; } async rename(name, opts) { await this.raw_row.rename(name, opts); } async delete(opts) { await this.raw_row.delete(opts); } } exports.MonosAsNamedTableRow = MonosAsNamedTableRow; class Downmixes { constructor(raw) { this.raw = raw; } get mode_5_1() { return new VScript.StronglyTypedNamedTable(new VScript.NamedTable(this.raw.socket, this.raw.full_kwl("mode_5_1")), (row, enclosing_table) => new Mode51AsNamedTableRow(row, enclosing_table)); } get mode_7_1() { return new VScript.StronglyTypedNamedTable(new VScript.NamedTable(this.raw.socket, this.raw.full_kwl("mode_7_1")), (row, enclosing_table) => new Mode71AsNamedTableRow(row, enclosing_table)); } } exports.Downmixes = Downmixes; class All { constructor(raw) { this.raw = raw; } /** @brief Defragment @desc Repeated allocation and deallocation of differently sized mixers can cause fader fragmentation. Press this button to defragment, but please note that _this will temporarily interrupt all outputs currently in use_. */ get reorder_output() { return new VScript.wKeyword(this, "reorder_output"); } get mono_mixes() { return new VScript.StronglyTypedNamedTable(new VScript.NamedTable(this.raw.socket, this.raw.full_kwl("mono_mixes")), (row, enclosing_table) => new MonosAsNamedTableRow(row, enclosing_table)); } get stereo_mixes() { return new VScript.StronglyTypedNamedTable(new VScript.NamedTable(this.raw.socket, this.raw.full_kwl("stereo_mixes")), (row, enclosing_table) => new StereosAsNamedTableRow(row, enclosing_table)); } get down_mixes() { return new Downmixes(this.raw.find("down_mixes")); } get resource_status() { return new ResourceStatus(this.raw.find("resource_status")); } get audio_source_slices() { return new VScript.StronglyTypedArray(this, "audio_source_slices", (st, index, parent) => new _Audio.SignalSourceSliceAsArrayRow(st, index, parent)); } } exports.All = All;