The key signature mentioned here is the diacritical mark marked after the clef at the beginning of the staff line. This diacritical mark is valid for all notes with the same name in the score. That is to say, wherever the sharp or flat sign in the key signature is marked, all the notes and their namesake notes (octave doublings) encountered in the score will be Press the sharp or flat sign in the clef to raise or lower a semitone.
For example, there is a sharp in the key signature, which is marked on the fifth line. If this note is F, then all F notes in the score (whether they are f, f1, f2, etc. with different pitches) When playing or singing, the pitch should be raised by half a tone. If there are two key signatures, one marked on the fifth line (F sound) and one marked on the third space (C sound), then whenever the two notes F and C are encountered in the score, they will be raised by a semitone. The key signature of flats is the same (flat semitone); unless these notes have temporary diacritical marks in a certain measure, or the diacritical marks at this position in the key signature are canceled after changing to a new key.