I didn't think this topic would become an issue in my composing -- after all, what could be more basic than notating accidentals? -- but recently, while working with a couple of pianists to record my pieces, it came to my attention that my notation isn't always that clear, or even if it's unambiguous, it may still be tricky to read, thereby leading to mistakes in performance.
I currently use Lilypond for my scores, and it offers quite a few alternatives for notating accidentals: https://lilypond.org/doc/v2.23/Documentation/notation/displaying-pitches#automatic-accidentals
I had been using the "default" setting, not having paid attention to this issue until recently, but it turns out that it leads to notation that isn't always the easiest for pianists to read.
So my question is: what's the best style to use? What would you recommend? I see "piano" and "piano-cautionary" as the most likely candidates, as least for piano pieces. But what about other types of music? What do y'all think?
And in general, what conventions do you use in notating accidentals?
P.S. this topic is not talking about spelling notes as sharps or flats. That's a separate issue, and in Lilypond generally isn't a problem because it already requires the composer to input sharps or flats explicitly. The issue is with the printing of accidentals after another one has already printed elsewhere: e.g., if there's a C# in a bar and another C# in the same bar -- should the 2nd # be printed or not? What if they're an octave apart? What if there's a C natural elsewhere in the same bar? Or in the previous bar? Or in another staff of the same instrument (e.g., RH vs LH in a piano score)? Etc..