Flexible perceptual encoding by discrete gamma events