Server
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object, stateStore: Store) |
Member Summary
Public Members | ||
public |
address: * |
|
public |
|
|
public |
log: * |
|
public |
options: * |
|
public |
osc: * |
|
public |
process: * |
|
public |
|
|
public |
receive: * |
|
public |
send: * |
|
public |
state: * |
|
public |
stdout: * |
Method Summary
Public Methods | ||
public |
args(): array Format command line args for scsynth |
|
public |
Boot the server |
|
public |
callAndResponse(callAndResponse: Object, timeout: int): Promise Send an OSC command that expects a reply from the server, and resolves with the response. |
|
public |
Establish connection to scsynth via OSC socket |
|
public |
Wait for a single OSC response from server matching the supplied args. |
|
public |
quit() quit |
|
public |
this method was deprecated. - use: `server.send.msg([address, arg1, arg2])``
Send OSC message to server |
Public Constructors
Public Members
public address: * source
public log: * source
public options: * source
public osc: * source
public process: * source
public processEvents: * source
public receive: * source
public send: * source
public state: * source
public stdout: * source
Public Methods
public args(): array source
Format command line args for scsynth
not yet fully implemented
Return:
array | list of non-default args |
public boot(): Promise source
Boot the server
Start scsynth and establish a pipe connection to receive stdout and stderr.
Does not connect, so UDP is not yet ready for OSC communication.
listen for system events and emit: exit out error
public callAndResponse(callAndResponse: Object, timeout: int): Promise source
Send an OSC command that expects a reply from the server, and resolves with the response.
This is for getting responses async from the server. The first part of the message matches the expected args, and the rest of the message contains the response.
Params:
Name | Type | Attribute | Description |
callAndResponse | Object | Object with call: [osc_msg, 1, 2], response: [osc_response, 1, 2, 3] |
|
timeout | int | in milliseconds before rejecting the Promise |
public oscOnce(matchArgs: Array, timeout: int): Promise source
Wait for a single OSC response from server matching the supplied args.
This is for getting responses async from the server. The first part of the message matches the expected args, and the rest of the message contains the response.
The Promise fullfills with any remaining payload including in the message.
Params:
Name | Type | Attribute | Description |
matchArgs | Array | osc message to match as a single array: |
|
timeout | int | in milliseconds before the Promise is rejected |