He began to write for the theater in 1639 . Soon after that the first public opera house opened in Venice . He began to write for the stage in 1639 ( Le nozze di Teti e di Peleo ) soon after the first public opera house opened in Venice .