David Gewirtz Uses ChatGPT to Build 1 Python PDF Tool for Sheet Music
Updated
Updated · ZDNet · Jun 5
David Gewirtz Uses ChatGPT to Build 1 Python PDF Tool for Sheet Music
1 articles · Updated · ZDNet · Jun 5
Summary
A command-line Python script generated by ChatGPT let David Gewirtz strip yellow backgrounds from scanned sheet-music PDFs without directly handing file edits back to the AI.
The workaround addressed 2 problems at once: larger reprints on 8.5-by-11-inch paper and cleaner files for PlayScore 2, which might struggle with colored backgrounds.
ChatGPT could produce edited PDFs itself, but Gewirtz rejected that route because repeated runs can yield different outputs and potentially alter notes, lyrics or layout.
Instead, he prompted ChatGPT to write a deterministic script that turns non-gray or non-black pixels white, handles multi-page PDFs, and outputs a cleaned PDF after required Python libraries were installed.
The episode underscores a broader use case for AI coding assistants: using a non-deterministic model to create a repeatable utility when direct AI file manipulation is too risky.