I really like the idea of storing track comments, made possible by a tool from fladd. (http://www.renoise.com/tools/track-comments)
What I really want, though, is pattern comments. (EDIT: Not quite. See additional edit below)
I looked at the code for the track comments tool and saw that fladd very smartly used track names/numbers to anchor the comments. Observers on track edits are used to update the comment index (which are stored in the song comments field).
Patterns (as best I can tell) do not have an editable identifier. You cannot name a pattern. You can locate a pattern using a track name and a pattern index, but then you have to carefully watch for pattern insertions/deletions. (EDIT: Not really. I’m confusing pattern withPatternTrack.)
EDIT: Patterns can be named. Pattern names can be edit/read via Lua. But now I see what I want is PatternTrack comments.
After some experimenting I found that you can edit an fx column entry to hold almost arbitrary values. There are some range constraints, but the value does not have to have any interpretable meaning. For example, I can enter NG A1 as an fx command. It has no meaning to Renoise; Renoise (happily) just ignores it. But custom tool code can use it to associate data.
My scheme now is to anchor pattern comments by inserting a custom fx value; each would be unique to the song.
This would allow for patterns (or comment anchors) to be moved around without losing the association with the comment data.
(This also allows for per-line comments.)
My casual empirical usage suggests that such “nonsense” fx values do not interfere with the regular operation of Renoise.
One obvious downside is that there are only 8 available track fx columns; using one for comments might interfere with a later desire to have all 8 columns available for something else. I find this a negligible issue, one I think is rare to happen in actual use. And if a comment fx is in the way it can be moved to another line.
Are there other possible issues? A future version of Renoise might become strict about fx entries. I’ll worry abut that if it ever comes to pass. I’m concerned with some edge case with the current version of Renoise, something I’ve just not considered because of my own workflow.
Thoughts?