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
datato SoundpadParameters:
Name Type Default Description datastring | Buffer | Uint8Array Data which will be sent.
hasResponseboolean false Wait until Soundpad respond?
Returns:
Resolves response if
hasResponseistrue, or resolves the Soundpad instance when the data is sent- Type
- Promise