He spent the first two years at the court of Margrave Hesse-Darmstad in Mantua, where he was mainly engaged in composing secular music.