The generation of species diversity