funscript.wiki
Article Talk History

T-Code

T-Code
TypeDevice control protocol
Used byOSR2, SR6, MultiFunPlayer
TransportSerial (USB/BT), WebSocket
Spectcode-spec on GitHub

T-Code is an ASCII-based serial protocol for controlling multi-axis interactive devices in real time. It defines the axis naming convention and command syntax used by OSR2, SR6, and compatible firmware.

Syntax ยง

A T-Code command encodes the target axis, position, and interpolation interval:

<Axis><Position><Interval>
  • Axis โ€” a letter+digit identifier (L0, R0, V0, A0, B0, C0)
  • Position โ€” 1โ€“4 digit value (0000โ€“9999, normalized to 0โ€“1)
  • Interval โ€” I + milliseconds

Examples:

L0500I500    Move L0 (stroke) to 50% over 500ms
R0999I200    Move R0 (twist) to maximum over 200ms
L0000L1500I100    Move L0 and L1 simultaneously

Standard axes ยง

AxisNameDescription
L0StrokePrimary up/down linear motion
L1SurgeForward/backward linear motion
L2SwayLeft/right linear motion
R0TwistRotational axis
R1RollRoll axis
R2PitchPitch axis
V0Vibe 0Vibration channel 0
A0AirPneumatic (suction) control

See also ยง

Protocols

Categories: Protocols