In the final chapter of his Harmonielehre, Arnold Schoenberg analyzes a brief passage from his own compositional output. (You can find it here, on written page 418 [page 432 of the PDF].)
I'm looking for the earliest instance of a composer publishing an analysis of his/her own music.
Ideally the answer(s) will involve a relatively specific analysis. I can imagine, for instance, that a composer in 1100 may have included one of his compositions in a tonary, indicating his own "analysis" of the mode of the piece. This is great to know, but I'm looking for analyses that are a bit more in-depth than this. Think of Hindemith's own analyses, etc. Obviously there's some bit of opinion inherent in my question, but I think it's still clear enough for an acceptable question.
I have a few hypotheses--Descartes, for instance--but I'm curious what the collective knowledge has to share.