Skip to main content
The Melody device is our inโ€‘house engineered interactive haptic hardware hub.
All WiFi playback requests are executed live against:
https://api.getmelody.io" Authenticated requests must include:
Authorization: Bearer <YOUR_JWT_TOKEN>
Content-Type: application/json

1. Playback Protocol (Read / Write)

Select the active playback protocol before issuing any control commands.
FieldTypeValues
playbackProtocolenumHDC, HSC, HPS, HLC

๐Ÿ›ฐ Playback Source (Read)

Indicates the current origin of device control.
FieldTypeValues
playbackSourceenumIDLE, MANUAL, WIFI, BLE

๐ŸŽต HSC โ€” Haptics Script Control

Transport: WiFi only
Behavior: Script playback from a remote .funscript file via URL. The server orchestrates timeline playback.

โ–ถ Start Playback (Write)

FieldTypeDescription
timeuint32Start time in milliseconds
scriptUrlstringPublic URL of the funscript file
scriptSizeuint32Script size in bytes

โน Stop Playback (Write)

Interrupt and stop script playback.

๐Ÿ“Š Script Status (Read)

FieldTypeDescription
playingboolWhether script playback is active
currentScriptTimeuint32Current playback time (ms)
currentScriptIndexuint32Current script frame index
playbackRatefloatPlayback speed multiplier (configurable in settings)
Use for: synchronized sensations for videos, VR players, and timeline-driven playback systems.

๐ŸŽ› HDC โ€” Haptics Direct Control

Transport: WiFi, BLE
Behavior: Immediate position control. Every new command interrupts active movement.

๐ŸŽฏ Motion Command (Write)

FieldTypeRangeDescription
positionuint320 โ†’ 10000Target position (0.01% resolution)
timeuint32msMovement duration in milliseconds

๐Ÿ“Š Motion Status (Read)

FieldTypeDescription
playingboolWhether movement is active
destinationPositionuint32Last issued target position
Use for: UI manual controls, external timeline drivers, and interruptible positional motion.

๐Ÿ“ˆ HPS โ€” Haptics Points Stream

Transport: WiFi, BLE
Behavior: Stream sequential position + timestamp points. The device calculates velocity using timeโ€‘delta differences between points.
Requirements:
  • Minimum 2 points required for velocity calculation
  • Maximum 64 points per message

โž• Add Points (Write)

FieldTypeRangeDescription
timeuint64msTimestamp in the senderโ€™s timescale
posuint320 โ†’ 10000Position (0.01% resolution)
Note: If time delta between points is negative, the previous point timestamp is treated as 0.

โ–ถ Play Stream (Write)

Starts stream playback using buffered points.

โธ Pause Stream (Write)

Pauses without clearing the buffer.

๐Ÿงน Flush Stream (Write)

Clears the buffered point queue.

๐Ÿ“Š Stream Status (Read)

FieldTypeDescription
playingboolWhether point stream is active
currentStreamTimeuint32Current playback time (ms)
pointsLeftuint32Remaining points in the buffer
Use for: Real-time haptic streaming, dynamic timelines, and smooth motion derived from timeโ€‘delta input.

๐Ÿ” HLC โ€” Haptics Loop Control

Transport: WiFi, BLE
Behavior: Automatic, repeating up/down stroking loop inside a defined percentage range.

โš™ Set Loop Parameters (Write)

FieldTypeRangeDescription
velocityuint320 โ†’ 100%Percent of max velocity
lowLimituint320โ€“99%Loop low position, must be < highLimit
highLimituint321โ€“100%Loop high position, must be > lowLimit

โ–ถ Start Loop (Write)

Begins automatic haptic loop.

โธ Stop Loop (Write โ€” โ€œPauseโ€ command)

Stops loop playback safely and clears active loop state.

๐Ÿ“Š Loop Status (Read)

FieldTypeDescription
playingboolWhether loop is active
velocityuint32Current loop velocity (%)
lowLimituint32Active low loop position (%)
highLimituint32Active high loop position (%)
Use for: Continuous and rhythmic motion patterns driven by firmware.

Summary

ProtocolInterruptibleTransportTiming Model
HSCโœ—WiFi onlyScript timeline
HDCโœ“WiFi, BLEClient duration
HPSโœ“WiFi, BLETimeโ€‘delta velocity
HLCโœ“WiFi, BLEFirmware autoโ€‘loop
Youโ€™re ready to send playback and motion commands โ€” just set the protocol first, then explore the reference tabs for deeper technical detail.