The photometric variability of massive stars due to gravity waves excited by core convection - Nature Astronomy