TBbard
TBbard is a desktop automation tool for Final Fantasy XIV’s in-game music performance system. It decodes traditional MIDI files, adapts their notes to the game’s three-octave instrument range, and then orchestrates the required keyboard input in real time.
Workflow
- Import & Decode — MIDI files are parsed into an intermediate representation tailored to FFXIV Bard’s custom scripting language.
- Adaptation — Notes outside the game’s range are remapped to the optimal octave, velocities are normalised, and frame-based delays are inserted so repeated notes register correctly.
- Playback — The generated script drives a Java automation layer that injects keystrokes, optionally slowed or accelerated based on the user’s latency with the game.

User Interface
The Swing UI keeps playback controls and instrument filters accessible while exposing the generated script for manual tweaking. Drag-and-drop support for MIDI files speeds up experimentation, and settings like tempo multipliers or octave bias can be persisted between sessions.

Engineering Challenges
- Input Sampling Limits — The game only samples inputs once per frame, so TBbard inserts spacer frames between repeated notes to avoid missed triggers.
- Limited Octave Range — FFXIV instruments span only three octaves. TBbard determines a “target” octave band, then remaps distant notes while keeping harmonies recognisable.
- MIDI Oddities — Some files toggle notes by sending a zero-velocity “note on” instead of a distinct “note off” event. TBbard detects these cases to prevent duplicate keys from sticking.
- Privilege Requirements — Windows’ drag-and-drop is disabled when UAC elevation differs between processes. Documentation and fallback import options ensure users can still load files while running the app as administrator for input injection.
Platform & Stack
- Java automation with JNI hooks for precise key events
- Swing-based desktop interface for quick feature additions
- Script format designed specifically for Final Fantasy XIV bard playback