Baroque Convention for Accidentals:

Accidentals always applied only to the note next to them, and did not carry on through the bar even if there were bars. If there were 4 E sharps in a bar, each one should have its own sharp sign. BUT when space was tight, accidentals were just not repeated even if they should be. However, if we have an f sharp and then an f natural, many composers didn't use a natural sign for the second F, as it was not necessary (because accidentals applied only to one note).

Today's standard:

An accidental applies to all notes (in the same octave) until the end of the bar. Some things you should know: If there is an F sharp tied to an F sharp in the next measure, the second F sharp doesn't need a sharp sign. If there is a b flat, then an octava supra or octava bassa, and if there's another b flat in the same measure, it must have its own flat symbol because it's actually another octave.

Contemporary standard:

Some composers adopting the 12-tone system abide by the above-mentioned baroque convention for its own notation-convenience. One of them is Alois Haba when he says "in Half-tone System". Other 12-tone-composers (say, Schoenberg) write accidentals to EVERY note. If you want F natural, it always needs a natural sign even though the measure contains neither F sharps nor F flats.


[snipped from gnu-music-discuss]

To determine precisely the scope of an accidental in a particular piece one needs to know the conventions in place at the time by the copyist. And this is not straightforward.

The rule for notes tied into the next bar is a special case -- the rule in England before about 1920 was that the scope of an accidental extended to the first note of the next bar, tied or not. By the end of the period, most composers were writing a cautionary accidental on the first note of a new bar in this case, except when the note was tied in which case it was omitted.

In 14th and 15th century music, an accidental applied until the melody moved to a different hexachord.

In 15th and 16th century music, an accidental applied until the end of a `phrase' where a phrase was defined by the textual underlay, if any.

PeterChubb?