Volian0/midi2json ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple command line tool in C++ that takes a quantized MIDI file and converts it into a text file using Piano Tiles 2 note notation.

I want it to be easy to compile from the terminal with a single g++ command, and it should work from the command line with a clear input and output file. If there are any important assumptions about the MIDI format, handle them gracefully and make the errors easy to understand.

The main goal is just to turn MIDI notes into the PT2 style text format correctly, so I can use the result for Piano Tiles 2. Keep it lightweight and focused on that one job. If you need to check anything about MIDI parsing or note handling, look up current docs online if you need to.