reaper-osc
Version:
Controls Cockos Reaper using OSC
86 lines (85 loc) • 3.42 kB
TypeScript
/**
* Contains classes for controlling Reaper's arrange-view scroll and zoom
* @module
*/
import { ReaperOscCommand } from './Client/Commands';
declare type SendCommand = (command: ReaperOscCommand) => void;
/**
* Controls the Reaper arrange-view scroll position and zoom level.
*
* Two styles of command are available for each axis:
* - **Boolean (held)**: `startScrollLeft()` / `stopScrollLeft()`, `startZoomInX()` / `stopZoomInX()`
* etc. — models a held button. Scrolling/zooming continues while active and stops when
* released, matching the behaviour of hardware controller buttons. Mirrors how
* {@link Transport.startRewinding} works.
* - **Rotary**: `scrollX(value)` / `zoomX(value)` etc. — sends a single relative step to
* a rotary encoder address. Positive values move right/down/zoom-in; negative values move
* left/up/zoom-out. Larger magnitudes scroll/zoom further per message.
*
* Reaper does not send feedback for any scroll or zoom command, so these are fire-and-forget.
*/
export declare class ViewPort {
private readonly _send;
constructor(_send: SendCommand);
/** Start scrolling the arrange view left */
startScrollLeft(): void;
/** Stop scrolling the arrange view left */
stopScrollLeft(): void;
/** Start scrolling the arrange view right */
startScrollRight(): void;
/** Stop scrolling the arrange view right */
stopScrollRight(): void;
/** Start scrolling the arrange view up */
startScrollUp(): void;
/** Stop scrolling the arrange view up */
stopScrollUp(): void;
/** Start scrolling the arrange view down */
startScrollDown(): void;
/** Stop scrolling the arrange view down */
stopScrollDown(): void;
/** Start zooming in horizontally (X axis) */
startZoomInX(): void;
/** Stop zooming in horizontally (X axis) */
stopZoomInX(): void;
/** Start zooming out horizontally (X axis) */
startZoomOutX(): void;
/** Stop zooming out horizontally (X axis) */
stopZoomOutX(): void;
/** Start zooming in vertically (Y axis) */
startZoomInY(): void;
/** Stop zooming in vertically (Y axis) */
stopZoomInY(): void;
/** Start zooming out vertically (Y axis) */
startZoomOutY(): void;
/** Stop zooming out vertically (Y axis) */
stopZoomOutY(): void;
/**
* Scroll the arrange view horizontally by a relative amount.
* Positive values scroll right; negative values scroll left.
* Larger magnitudes scroll further per message.
* @param value Relative scroll amount
*/
scrollX(value: number): void;
/**
* Scroll the arrange view vertically by a relative amount.
* Positive values scroll down; negative values scroll up.
* Larger magnitudes scroll further per message.
* @param value Relative scroll amount
*/
scrollY(value: number): void;
/**
* Adjust horizontal zoom by a relative amount.
* Positive values zoom in; negative values zoom out.
* Larger magnitudes zoom further per message.
* @param value Relative zoom amount
*/
zoomX(value: number): void;
/**
* Adjust vertical zoom by a relative amount.
* Positive values zoom in (expand track height); negative values zoom out.
* Larger magnitudes zoom further per message.
* @param value Relative zoom amount
*/
zoomY(value: number): void;
}
export {};