A general theory of self-induced transparency