The sharp sign (#) means raising the basic pitch level by a semitone. Flat sign (?), the flat sign means lowering the basic pitch level by a semitone.
It should be noted that in addition to sharp and flat signs, there is also a double sharp sign (×): indicating that the basic tone level is raised by two semitones (two semitones are a whole tone). Double flat sign (?): Indicates lowering the basic pitch level by two semitones (one whole tone). Temporary sharps and flats only work within the same section, and have no effect beyond the section.
The restoration mark (?) indicates that the sound that has been raised or lowered is restored. Diacritical marks can be recorded on the lines and spaces of the staff; they can be recorded in front of the notes and behind the clefs. The diacritical mark recorded after the clef is called the key signature.
Extended information:
The diacritical mark recorded after the clef is called the key signature. Before changing the new key, it will take effect on all the sounds with the same phonetic name in the sequence. If you want to change the key signature in the middle of a piece of music, there may be three situations.
If the key signature change occurs at the beginning of a line of music, the key signature to be changed should be clearly written down at the end of the previous line of music. And move the last bar line forward to record the key signature of the new key.
Increase the number of original sharps or flats. At this time, just write the key signature of the new key to the right of the bar line where the key signature is changed.
Reduce the number of original sharps or flats. At this time, you need to restore the redundant diacritical marks to the left of the bar line where the key signature is changed. Write the key signature of the new key to the right of the bar line.
Change a sharp number into a flat number or a flat number into a sharp number. At this time, you need to restore the original diacritical marks on the left side of the bar line where the key signature is changed, and write the new key signature on the right side of the bar line.
A diacritical mark placed directly before a note is called an accidental. Accidentals are only valid for notes of the same pitch, and only to the nearest bar line. In multi-part music, accidentals are often only valid for one voice. In order to remind the abolition of the previously used accidental mark, sometimes another accidental mark is added after the bar line.
Reference: Baidu Encyclopedia - diacritical marks