What a Note remembers about its "anchor": the in-key pitch an accidental (a note outside the key) hangs off, and follows through scale changes (see model/scale/accidentals.h).
Usually nothing needs remembering, because the anchor follows from the note's pitch and the key. A marker is only stored when a scale change left the note somewhere that doesn't say where it came from. It is one of:
- derived (the zero value): no marker. An in-key note is its own anchor; an accidental hangs off the row it is displayed on.
- offset(n): the anchor is n semitones from the note's pitch.
- self(): the note is its own anchor, although the key would derive another one for its pitch.
- tagged(letter, n): the anchor is n semitones from the note's pitch (n == 0: the note itself), and was the note of degree letter 0..6 (see model/scale/scale_degrees.h) in a scale whose successor has no such degree. The anchor kept its pitch when that degree went away, so it may now sit on another degree's pitch or outside the key; the letter lets it find its degree again.
One byte, trivially copyable, and all-zero means derived, so Notes in zeroed raw memory are unmarked. raw() is what song files store.