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.