MicMusicTransformer(uuid?: string, defaultValue?: { v: number, power: boolean, id: number, isLight: number, mode: number, speed: number, sensitivity: number, a: number, b: number, c: number, brightness: number, colors: Unit[] })
Requires:
@ray-js/panel-sdk≥1.0.0
Description
Local microphone music rhythm standard DP protocol converter for bidirectional conversion between local music rhythm settings and the DP hexadecimal protocol
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | No | DP identifier, defaults to the standard mic_music DP code |
defaultValue | { v: number, power: boolean, id: number, isLight: number, mode: number, speed: number, sensitivity: number, a: number, b: number, c: number, brightness: number, colors: Unit[] } | No | Default music data returned when parsing fails |
Return Value
Type: MicMusicTransformer
MicMusicTransformer instance
Referenced Types
interface
Unit| Property | Type | Required | Description |
|---|---|---|---|
hue | number | Yes | Hue |
saturation | number | Yes | Saturation |
Methods
| Method | Description |
|---|---|
| parser | Parse the DP hexadecimal string into a local music rhythm data object |
| formatter | Format the local music rhythm data object into a DP hexadecimal string |