Subsequently, on 5 December 1676 he was appointed as an organist at the Basilica of Santi Giovanni e Paolo with a salary of 40 ducats a year (a position he held until 1679).
From 1676 he started to be active as a composer: in this period he wrote about ten works in Venice and Milan and various sacred music (including some motets for Ippolito Bentivoglio).
[1][2] On May 1, 1686, Gianettini left his offices at San Marco to take the place of maestro di cappella at the court of Francesco II, Duke of Modena.
With the outbreak of the Spanish succession war, Modena was occupied by the French and in 1702 he had to flee with Duke Rinaldo I (successor of Francesco II) to Bologna.
Gianettini created oratorios, of which La morte di Cristo is the best known[citation needed], as well as about 20 stage works, cantatas, masses and other sacred music.