Today’s hack was brief, maybe an hour. I had Thaura generate a “piano roll” in text, and then write a program to convert that into a MIDI file. It eventually worked.
(I got the theme from a video about 80s and 90s industrial music.)
I took the code artifact and tried to run it – it needed a package, so I created a venv, and still hit a bug. So it was time to bring in Thaura Work.
Once again, it tried to fix the venv. (I’m not sure what’s going on, but it tries to replace the venv python with Thaura Desktop.) So I told it to create an AGENTS.md to prevent itself from messing with the venv. I’m not sure if this will work, but maybe it will.
AGENTS.md
# AGENTS
## Virtual Environment
A Python virtual environment lives in `.venv/`. **Do not modify, recreate, or reinstall packages inside it.** Treat it as immutable β assume whatever the user has installed there is correct.
## Running Python
Always execute Python through the venv's interpreter:
```bash
.venv/bin/python3 script.py
```
Or install/run tools via the venv's pip:
```bash
.venv/bin/pip install package
```
Never fall back to system `python3` or bare `pip` for anything related to this project.
It didn’t fix the bug correctly, so I told it to read the pypi page for the mido library. It spidered over to readthedocs and read the docs. Then it fixed my problem.
It generated the midi file above. Then, I went to an online synth, https://spessasus.github.io/SpessaSynth/, loaded the midi file, and rendered it. I converted the wav to midi in Audacity: