UNPKG

soundcraft-ui-connection

Version:

Library for controlling the Soundcraft Ui series audio mixers

83 lines (82 loc) 3.43 kB
import { MixerConnection } from '../mixer-connection'; import { MixerStore } from '../state/mixer-store'; import { BusType, ChannelType } from '../types'; import { Easings } from '../utils/transitions/easings'; import { FadeableChannel } from './interfaces'; /** * Represents a single channel with a fader */ export declare class Channel implements FadeableChannel { protected conn: MixerConnection; protected store: MixerStore; protected channelType: ChannelType; protected channel: number; protected busType: BusType; protected bus: number; protected fullChannelId: string; protected faderLevelCommand: string; protected linkedChannelIds: string[]; private transitionSources$; /** Index of this channel in the stereolink compound (0 = I'm first, 1 = I'm second, -1 = not linked) */ protected stereoIndex$: import('rxjs').Observable<number>; /** Linear level of the channel (between `0` and `1`) */ readonly faderLevel$: import('rxjs').Observable<number>; /** dB level of the channel (between `-Infinity` and `10`) */ readonly faderLevelDB$: import('rxjs').Observable<number>; /** MUTE state of the channel */ readonly mute$: import('rxjs').Observable<boolean>; private rawName$; private auxIsMatrix$; readonly name$: import('rxjs').Observable<string>; constructor(conn: MixerConnection, store: MixerStore, channelType: ChannelType, channel: number, busType?: BusType, bus?: number); /** * Perform fader transition to linear value * @param targetValue Target value as linear value (between 0 and 1) * @param fadeTime Fade time in ms * @param easing Easing characteristic, as an entry of the `Easings` enum. Defaults to `Linear` * @param fps Frames per second, defaults to 25 */ fadeTo(targetValue: number, fadeTime: number, easing?: Easings, fps?: number): Promise<void>; /** * Perform fader transition to dB value * @param targetValueDB Target value as dB value (between -Infinity and 10) * @param fadeTime Fade time in ms * @param easing Easing characteristic, as an entry of the `Easings` enum. Defaults to `Linear` * @param fps Frames per second, defaults to 25 */ fadeToDB(targetValueDB: number, fadeTime: number, easing?: Easings, fps?: number): Promise<void>; /** * Set linear level of the channel fader * @param value value between `0` and `1` */ setFaderLevel(value: number): void; private setFaderLevelRaw; /** * Set dB level of the channel fader * @param value value between `-Infinity` and `10` */ setFaderLevelDB(dbValue: number): void; /** * Change the fader value relatively by adding a given linear value * @param offset value to add to the current linear fader value */ changeFaderLevel(offset: number): void; /** * Change the fader value relatively by adding a given value * @param offsetDB value (dB) to add to the current value */ changeFaderLevelDB(offsetDB: number): void; /** * Set MUTE state for the channel * @param value MUTE state */ setMute(value: boolean): void; /** Enable MUTE for the channel */ mute(): void; /** Disable MUTE for the channel */ unmute(): void; /** Toggle MUTE state for the channel */ toggleMute(): void; /** Set name of the channel */ setName(name: string): void; }