reaper-osc
Version:
Controls Cockos Reaper using OSC
85 lines (84 loc) • 3.14 kB
TypeScript
/**
* Contains classes for track receive routing controls
* @module
*/
import { INotifyPropertyChanged } from './Notify';
import { ReaperOscEvent } from './Client/Events';
import { ReaperOscCommand } from './Client/Commands';
declare type SendCommand = (command: ReaperOscCommand) => void;
/** A receive on a specific track from another source */
export declare class TrackReceive implements INotifyPropertyChanged {
readonly trackNumber: number;
readonly receiveNumber: number;
private _name;
private _volume;
private _volumeStr;
private _pan;
private _panStr;
private readonly _send;
constructor(trackNumber: number, receiveNumber: number, send: SendCommand);
/**
* Handle a typed incoming event
* @param event The event to handle
*/
handleEvent(event: ReaperOscEvent): void;
/** The source 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 receive 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 receive on the OSC device's currently selected track */
export declare class SelectedTrackReceive implements INotifyPropertyChanged {
readonly receiveNumber: number;
private _name;
private _volume;
private _volumeStr;
private _pan;
private _panStr;
private readonly _send;
constructor(receiveNumber: number, send: SendCommand);
/**
* Handle a typed incoming event
* @param event The event to handle
*/
handleEvent(event: ReaperOscEvent): void;
/** The source 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 receive 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 {};