UNPKG

reaper-osc

Version:
85 lines (84 loc) 3.12 kB
/** * Contains classes for track send routing controls * @module */ import { INotifyPropertyChanged } from './Notify'; import { ReaperOscEvent } from './Client/Events'; import { ReaperOscCommand } from './Client/Commands'; declare type SendCommand = (command: ReaperOscCommand) => void; /** A send from a specific track to another destination */ export declare class TrackSend implements INotifyPropertyChanged { readonly trackNumber: number; readonly sendNumber: number; private _name; private _volume; private _volumeStr; private _pan; private _panStr; private readonly _send; constructor(trackNumber: number, sendNumber: number, send: SendCommand); /** * Handle a typed incoming event * @param event The event to handle */ handleEvent(event: ReaperOscEvent): void; /** The destination track name */ get name(): string; onPropertyChanged(property: string, callback: () => void): () => void; /** A floating-point value between -1 and 1 that indicates the pan position */ get pan(): number; /** Human-readable pan position string (e.g. "50%R") */ get panStr(): string; /** * Sets the pan * @param value A floating-point value between -1 and 1, where -1 is 100% left and 1 is 100% right */ setPan(value: number): void; /** * Sets the send volume fader position * @param value A floating-point value between 0 and 1, where 0 is silent and 1 is unity (0 dB) */ setVolume(value: number): void; /** A floating-point value between 0 and 1 that indicates the fader position */ get volume(): number; /** Human-readable volume string (e.g. "0.00 dB") */ get volumeStr(): string; } /** A send from the OSC device's currently selected track */ export declare class SelectedTrackSend implements INotifyPropertyChanged { readonly sendNumber: number; private _name; private _volume; private _volumeStr; private _pan; private _panStr; private readonly _send; constructor(sendNumber: number, send: SendCommand); /** * Handle a typed incoming event * @param event The event to handle */ handleEvent(event: ReaperOscEvent): void; /** The destination track name */ get name(): string; onPropertyChanged(property: string, callback: () => void): () => void; /** A floating-point value between -1 and 1 that indicates the pan position */ get pan(): number; /** Human-readable pan position string (e.g. "50%R") */ get panStr(): string; /** * Sets the pan * @param value A floating-point value between -1 and 1, where -1 is 100% left and 1 is 100% right */ setPan(value: number): void; /** * Sets the send volume fader position * @param value A floating-point value between 0 and 1, where 0 is silent and 1 is unity (0 dB) */ setVolume(value: number): void; /** A floating-point value between 0 and 1 that indicates the fader position */ get volume(): number; /** Human-readable volume string (e.g. "0.00 dB") */ get volumeStr(): string; } export {};