new Soundpad(connectionSettings)
Parameters:
Name | Type | Description |
---|---|---|
connectionSettings |
object | Settings of connecting Soundpad |
Methods
-
connect()
-
Connects to Soundpad
Returns:
Resolves the Soundpad instance when connected Soundpad successfully
- Type
- Promise
-
disconnect()
-
Disconnects Soundpad
Returns:
Resolves the Soundpad instance when disconnected Soundpad successfully.
- Type
- Promise
-
poll()
-
Poll Soundpad
Returns:
Resolves the Soundpad instance when Soundpad respond
- Type
- Promise
-
send(data, hasResponse)
-
Send
data
to SoundpadParameters:
Name Type Default Description data
string | Buffer | Uint8Array Data which will be sent.
hasResponse
boolean false Wait until Soundpad respond?
Returns:
Resolves response if
hasResponse
istrue
, or resolves the Soundpad instance when the data is sent- Type
- Promise