Made a tool to generate definition files

I made a quick little visual MIDI studio designer for generating instrument definition files. The main idea: lay out your instruments on a canvas, wire them up to the Hapax’s MIDI outputs (A, B, C, USB Host), load their CC/NRPN specs from midi.guide, and export proper .txt definition files — no hand-editing required.

How it works:

  1. The Hapax sits at the center of your canvas as a permanent node with all its I/O (MIDI A/B/C, USB Host/Device, CV Gate 1-4)
  2. Drag instruments from the sidebar (or create custom ones) and connect them to the Hapax’s outputs
  3. Load CC and NRPN mappings for each instrument — either upload a CSV or browse the midi.guide database directly from the app
  4. Set the MIDI channel, instrument type (POLY/DRUM/MPE), and configure up to 8 ASSIGN encoders per instrument
  5. Export and it generates a definition file for every instrument connected to the Hapax

The exported files include all the sections:

  • VERSION, TRACKNAME, TYPE, OUTPORT, OUTCHAN — auto-populated from your canvas routing (port is detected from which Hapax output you wired to)

  • [DRUMLANES] — populated when instrument type is DRUM, with channel/note/lane/name mappings

  • [CC] — organized by section with parameter names cleaned to 12 characters for the Hapax display

  • [NRPN] — MSB:LSB:7 format, also grouped by section

  • [ASSIGN] — your 1-8 encoder assignments with default values

  • [PC], [AUTOMATION] — included as empty sections for manual editing later

    Other stuff it does:

  • Feedback loop detection — warns you if your MIDI routing creates a cycle (respects Local Off)

  • Type-safe connections — won’t let you wire a MIDI output to an audio input

  • Save/load your entire studio layout as JSON so you can iterate on it

Definitely a work in progress, interested to hear any feedback.

10 Likes

sticky!

1 Like

:+1: great work, have to check it out

on the flip side, what’s the process for adding a different instrument? Deluge community firmware now supports instrument definitions as well and I could see this as a more efficient way of getting them into my Deluge

Fantastic. Just got my Hapax and haven’t started making definitions yet. But this will make it a lot easier!

That should be pretty straightforward. Do you have a link to the deluge instrument definition specs? I can change the main purple node that is always on the canvas to be switchable between controllers. Change it to a deluge and it’ll kick out deluge definition files and vice versa. Only hesitation is it could be a slippery slope of adding more and more different controllers.

1 Like