Skip to content

Latest commit

 

History

History
822 lines (492 loc) · 23.1 KB

orthoremote.md

File metadata and controls

822 lines (492 loc) · 23.1 KB

Ortho Remote - v0.4.0 / OrthoRemote

Class: OrthoRemote

A Ortho Remote device client for interacting with BT Ortho Remote peripheral from Teenage Engineering

Hierarchy

  • EventEmitter

    OrthoRemote

Table of contents

Events

Properties

Accessors

Methods

Events

batteryLevel

• get batteryLevel(): undefined | number

Ortho Remote device battery level

Returns: undefined | number


connect

connect(config?: OrthoRemoteConfig): Promise<boolean>

Connects to the device, if not already connected

Parameters

Name Type
config? OrthoRemoteConfig

Returns: Promise<boolean>

a Promise with true to indicate a successful connection


disconnect

disconnect(): void

Disconnects cleanly from the device

Returns: void


rotation

• get rotation(): number

Ortho Remote rotation value, can be between 0.0 - 1.0 (normalized) or 0 - 127 (raw)

Returns: number


rssi

• get rssi(): undefined | number

Ortho Remote device RSSI

Returns: undefined | number

Properties

configuration

configuration: OrthoRemoteConfig

Ortho Remote configuration


orthoRemotePeripheral

orthoRemotePeripheral: OrthoRemotePeripheral

Associated peripheral

Accessors

id

• get id(): string

Ortho Remote device identifier

Returns: string


isConnected

• get isConnected(): boolean

Indicates if there is a connection established to the Ortho Remote device

Returns: boolean

Methods

addListener

addListener(eventName: "batteryLevel", listener: OnBatteryLeveCallback): OrthoRemote

Parameters

Name Type
eventName "batteryLevel"
listener OnBatteryLeveCallback

Returns: OrthoRemote

Inherited from: EventEmitter.addListener

addListener(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick", listener: OnEventCallback): OrthoRemote

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"
listener OnEventCallback

Returns: OrthoRemote

Inherited from: EventEmitter.addListener

addListener(eventName: "error", listener: OnErrorCallback): OrthoRemote

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: OrthoRemote

Inherited from: EventEmitter.addListener

addListener(eventName: "midi", listener: OnMidiCallback): OrthoRemote

Parameters

Name Type
eventName "midi"
listener OnMidiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.addListener

addListener(eventName: "rotate", listener: OnRotateCallback): OrthoRemote

Parameters

Name Type
eventName "rotate"
listener OnRotateCallback

Returns: OrthoRemote

Inherited from: EventEmitter.addListener

addListener(eventName: "rssi", listener: OnRssiCallback): OrthoRemote

Parameters

Name Type
eventName "rssi"
listener OnRssiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.addListener


emit

emit(eventName: "rotate", value: number, buttonPressed: boolean): boolean

Parameters

Name Type
eventName "rotate"
value number
buttonPressed boolean

Returns: boolean

Inherited from: EventEmitter.emit


listenerCount

listenerCount(type: "batteryLevel" | "rssi" | "connect" | "disconnect" | "error" | "midi" | "buttonPressed" | "buttonReleased" | "click" | "longClick" | "rotate"): number

Parameters

Name Type
type "batteryLevel" | "rssi" | "connect" | "disconnect" | "error" | "midi" | "buttonPressed" | "buttonReleased" | "click" | "longClick" | "rotate"

Returns: number

Inherited from: EventEmitter.listenerCount


listeners

listeners(eventName: "batteryLevel"): OnBatteryLeveCallback[]

Parameters

Name Type
eventName "batteryLevel"

Returns: OnBatteryLeveCallback[]

Inherited from: EventEmitter.listeners

listeners(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"): OnEventCallback[]

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"

Returns: OnEventCallback[]

Inherited from: EventEmitter.listeners

listeners(eventName: "error"): OnErrorCallback[]

Parameters

Name Type
eventName "error"

Returns: OnErrorCallback[]

Inherited from: EventEmitter.listeners

listeners(eventName: "midi"): OnMidiCallback[]

Parameters

Name Type
eventName "midi"

Returns: OnMidiCallback[]

Inherited from: EventEmitter.listeners

listeners(eventName: "rotate"): OnRotateCallback[]

Parameters

Name Type
eventName "rotate"

Returns: OnRotateCallback[]

Inherited from: EventEmitter.listeners

listeners(eventName: "rssi"): OnRssiCallback[]

Parameters

Name Type
eventName "rssi"

Returns: OnRssiCallback[]

Inherited from: EventEmitter.listeners


off

off(eventName: "batteryLevel", listener: OnBatteryLeveCallback): OrthoRemote

Parameters

Name Type
eventName "batteryLevel"
listener OnBatteryLeveCallback

Returns: OrthoRemote

Inherited from: EventEmitter.off

off(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick", listener: OnEventCallback): OrthoRemote

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"
listener OnEventCallback

Returns: OrthoRemote

Inherited from: EventEmitter.off

off(eventName: "error", listener: OnErrorCallback): OrthoRemote

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: OrthoRemote

Inherited from: EventEmitter.off

off(eventName: "midi", listener: OnMidiCallback): OrthoRemote

Parameters

Name Type
eventName "midi"
listener OnMidiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.off

off(eventName: "rotate", listener: OnRotateCallback): OrthoRemote

Parameters

Name Type
eventName "rotate"
listener OnRotateCallback

Returns: OrthoRemote

Inherited from: EventEmitter.off

off(eventName: "rssi", listener: OnRssiCallback): OrthoRemote

Parameters

Name Type
eventName "rssi"
listener OnRssiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.off


on

on(eventName: "batteryLevel", listener: OnBatteryLeveCallback): OrthoRemote

Parameters

Name Type
eventName "batteryLevel"
listener OnBatteryLeveCallback

Returns: OrthoRemote

Inherited from: EventEmitter.on

on(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick", listener: OnEventCallback): OrthoRemote

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"
listener OnEventCallback

Returns: OrthoRemote

Inherited from: EventEmitter.on

on(eventName: "error", listener: OnErrorCallback): OrthoRemote

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: OrthoRemote

Inherited from: EventEmitter.on

on(eventName: "midi", listener: OnMidiCallback): OrthoRemote

Parameters

Name Type
eventName "midi"
listener OnMidiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.on

on(eventName: "rotate", listener: OnRotateCallback): OrthoRemote

Parameters

Name Type
eventName "rotate"
listener OnRotateCallback

Returns: OrthoRemote

Inherited from: EventEmitter.on

on(eventName: "rssi", listener: OnRssiCallback): OrthoRemote

Parameters

Name Type
eventName "rssi"
listener OnRssiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.on


once

once(eventName: "batteryLevel", listener: OnBatteryLeveCallback): OrthoRemote

Parameters

Name Type
eventName "batteryLevel"
listener OnBatteryLeveCallback

Returns: OrthoRemote

Inherited from: EventEmitter.once

once(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick", listener: OnEventCallback): OrthoRemote

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"
listener OnEventCallback

Returns: OrthoRemote

Inherited from: EventEmitter.once

once(eventName: "error", listener: OnErrorCallback): OrthoRemote

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: OrthoRemote

Inherited from: EventEmitter.once

once(eventName: "midi", listener: OnMidiCallback): OrthoRemote

Parameters

Name Type
eventName "midi"
listener OnMidiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.once

once(eventName: "rotate", listener: OnRotateCallback): OrthoRemote

Parameters

Name Type
eventName "rotate"
listener OnRotateCallback

Returns: OrthoRemote

Inherited from: EventEmitter.once

once(eventName: "rssi", listener: OnRssiCallback): OrthoRemote

Parameters

Name Type
eventName "rssi"
listener OnRssiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.once


prependListener

prependListener(eventName: "batteryLevel", listener: OnBatteryLeveCallback): OrthoRemote

Parameters

Name Type
eventName "batteryLevel"
listener OnBatteryLeveCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependListener

prependListener(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick", listener: OnEventCallback): OrthoRemote

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"
listener OnEventCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependListener

prependListener(eventName: "error", listener: OnErrorCallback): OrthoRemote

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependListener

prependListener(eventName: "midi", listener: OnMidiCallback): OrthoRemote

Parameters

Name Type
eventName "midi"
listener OnMidiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependListener

prependListener(eventName: "rotate", listener: OnRotateCallback): OrthoRemote

Parameters

Name Type
eventName "rotate"
listener OnRotateCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependListener

prependListener(eventName: "rssi", listener: OnRssiCallback): OrthoRemote

Parameters

Name Type
eventName "rssi"
listener OnRssiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependListener


prependOnceListener

prependOnceListener(eventName: "batteryLevel", listener: OnBatteryLeveCallback): OrthoRemote

Parameters

Name Type
eventName "batteryLevel"
listener OnBatteryLeveCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependOnceListener

prependOnceListener(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick", listener: OnEventCallback): OrthoRemote

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"
listener OnEventCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependOnceListener

prependOnceListener(eventName: "error", listener: OnErrorCallback): OrthoRemote

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependOnceListener

prependOnceListener(eventName: "midi", listener: OnMidiCallback): OrthoRemote

Parameters

Name Type
eventName "midi"
listener OnMidiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependOnceListener

prependOnceListener(eventName: "rotate", listener: OnRotateCallback): OrthoRemote

Parameters

Name Type
eventName "rotate"
listener OnRotateCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependOnceListener

prependOnceListener(eventName: "rssi", listener: OnRssiCallback): OrthoRemote

Parameters

Name Type
eventName "rssi"
listener OnRssiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.prependOnceListener


removeListener

removeListener(eventName: "batteryLevel", listener: OnBatteryLeveCallback): OrthoRemote

Parameters

Name Type
eventName "batteryLevel"
listener OnBatteryLeveCallback

Returns: OrthoRemote

Inherited from: EventEmitter.removeListener

removeListener(eventName: "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick", listener: OnEventCallback): OrthoRemote

Parameters

Name Type
eventName "connect" | "disconnect" | "buttonPressed" | "buttonReleased" | "click" | "longClick"
listener OnEventCallback

Returns: OrthoRemote

Inherited from: EventEmitter.removeListener

removeListener(eventName: "error", listener: OnErrorCallback): OrthoRemote

Parameters

Name Type
eventName "error"
listener OnErrorCallback

Returns: OrthoRemote

Inherited from: EventEmitter.removeListener

removeListener(eventName: "midi", listener: OnMidiCallback): OrthoRemote

Parameters

Name Type
eventName "midi"
listener OnMidiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.removeListener

removeListener(eventName: "rotate", listener: OnRotateCallback): OrthoRemote

Parameters

Name Type
eventName "rotate"
listener OnRotateCallback

Returns: OrthoRemote

Inherited from: EventEmitter.removeListener

removeListener(eventName: "rssi", listener: OnRssiCallback): OrthoRemote

Parameters

Name Type
eventName "rssi"
listener OnRssiCallback

Returns: OrthoRemote

Inherited from: EventEmitter.removeListener