Skip to main content

Channel Sync

Channel Sync allows the synchronization of channel selection across multiple clients. When enabled, selecting a channel in the Web UI will automatically select the same channel in all other clients that share the same SYNC ID. This feature also supports grouping, where different SYNC IDs can be assigned to different groups of clients, ensuring that channel selection is synchronized within each group independently.

Channel Sync must be enabled on each client individually:

  • Settings > Local > Sync Selected Channel

The default SYNC ID is SYNC_ID, but you can customize it to any value you prefer. Clients with the same SYNC ID will sync their selected channel.

A ChannelSync class instance is available through conn.channelSync. This class allows you to select channels and read the current selection.

Usage with Channel Objects and Types

The ChannelSync class offers methods to select channels and retrieve selected objects. Each method call can receive an optional syncId. If none is provided, it will use the default value SYNC_ID. Note that you cannot set a SYNC ID globally like in the web app; it must be specified in every call. This design allows the library to interact with multiple sync groups simultaneously.

Call on ChannelSyncDescription
getSelectedChannel(syncId)Get the currently selected channel object on the master bus as an Observable stream of FadeableChannel. Emits null when no channel is available for the currently selected index.
selectChannel('master', syncId)Select the master fader
selectChannel(channelType, channelNum, syncId)Select a channel by type and number, see table below for possible channel type values

ChannelType is a union type with the following possible values:

ValueDescriptionValueDescription
iInputsSubgroup
lLineaAUX
pPlayervVCA
fFX

Examples

// Select the master fader
conn.channelSync.selectChannel('master');

// Select the master fader with a custom SYNC ID
conn.channelSync.selectChannel('master', 'abc');

// Select input channel 3
conn.channelSync.selectChannel('i', 3);

// Select input channel 10 with a custom SYNC ID
conn.channelSync.selectChannel('i', 10, 'abc');

// Select Player L
conn.channelSync.selectChannel('p', 1);

// Select AUX 2
conn.channelSync.selectChannel('a', 2);

Working with FadeableChannel / Using Type Guards

The FadeableChannel interface defines a minimal subset of fields and methods that all fadeable objects share. It includes operations for setting fader values and accessing the channel name. To work with more specific members of a channel, you need to narrow down the type to the actual class, such as MasterChannel for channels on the master bus.

This library provides utility functions with type guards to assert specific types:

  • isChannel: any channel
  • isMasterChannel: channel on the master bus
  • isDelayableMasterChannel: delayable channel on the master bus (input, line, aux)
  • isMaster: the master fader

You can use these type guards in conditions:

if (isMasterChannel(ch)) {
ch.mute();
}

if (isMaster(ch)) {
ch.dim();
}

The following example filters an Observable stream to only emit objects of type MasterChannel:

import { filter } from 'rxjs';

conn.channelSync
.getSelectedChannel()
.pipe(filter(ch => isMasterChannel(ch)))
.subscribe(mch => {
// this stream only emits `MasterChannel` objects
});

Usage with Channel Index

Internally, channels are identified by their index on the master bus, counted from left to right. Refer to the big table below for the complete mapping between index and exact channel in the different hardware models. The library automatically reflects the current hardware model so that we can work with the human-readable interface described above.

The following methods allow working with the raw index values. The syncId is optional and defaults to SYNC_ID if not provided.

Call on ChannelSyncDescription
getSelectedChannelIndex(syncId)Get the index of the currently selected channel as an Observable stream
selectChannelIndex(index, syncId)Select a channel by index

A full record stream of all SYNC IDs and their current values is available through the MixerStore class:

conn.store.syncState$.subscribe(/* ... */);

// Structure:
// { "SYNC_ID": 3, "anotherSyncId": 10 }

Index/Channel Mapping

IndexChannel Ui24RChannel Ui16Channel Ui12
-1MasterMasterMaster
0CH 1CH 1CH 1
1CH 2CH 2CH 2
2CH 3CH 3CH 3
3CH 4CH 4CH 4
4CH 5CH 5CH 5
5CH 6CH 6CH 6
6CH 7CH 7CH 7
7CH 8CH 8CH 8
8CH 9CH 9Line In L
9CH 10CH 10Line In R
10CH 11CH 11Player L
11CH 12CH 12Player R
12CH 13Line In LFX 1
13CH 14Line In RFX 2
14CH 15Player LFX 3
15CH 16Player RFX 4
16CH 17FX 1SUB 1
17CH 18FX 2SUB 2
18CH 19FX 3SUB 3
19CH 20FX 4SUB 4
20CH 21SUB 1AUX 1
21CH 22SUB 2AUX 2
22CH 23SUB 3AUX 3
23CH 24SUB 4AUX 4
24Line In LAUX 1
25Line In RAUX 2
26Player LAUX 3
27Player RAUX 4
28FX 1AUX 5
29FX 2AUX 6
30FX 3
31FX 4
32SUB 1
33SUB 2
34SUB 3
35SUB 4
36SUB 5
37SUB 6
38AUX 1
39AUX 2
40AUX 3
41AUX 4
42AUX 5
43AUX 6
44AUX 7
45AUX 8
46AUX 9
47AUX 10
48VCA 1
49VCA 2
50VCA 3
51VCA 4
52VCA 5
53VCA 6