Question on writing chromatic scales
When writing a chromatic scale, if a note that is present in the key sig is preceded by the same note with an accidental in the same bar, is it necessary to cancel out the ?preceding accidental? For example in a chromatic run with key sig of A flat, I would put a natural sign before the first A and then a flat next to the 2nd A (even though the flat is present in the key sig). This means it would also follow the rule of cancelling accidentals within the same bar.
The only exception I can see is if the A flat is the first beat of a new bar so wouldn't cancel out the preceding accidental and just take on the key sig.