If the composer wants any extra sharps or flats during the piece, or he wants to cancel the ones in the key signature, these can be written in the music. These are called accidentals. An accidental is always written before the note it belongs to (we say “C sharp” but we write the sharp sign and then the note C). As an example: in a piece in G major all Fs are F sharps. If the composer wants a C sharp he writes a sharp sign in front of the C that needs to be sharpened. This will last for the rest of the bar (measure). If he wants a B flat he has to write it in. If he wants an F instead of the usual F sharp he writes a natural sign. There are also double sharps (the sign looks like an x) and double flats (two flat signs). An F double sharp is an F sharp that has been sharpened. It is the same note as G.