Complex sentence: Emperor Joseph II, in 1778, was in the process of setting up an opera company for the purpose of performing German opera.One condition required to join this new company was that Mozart should write, to his unhappiness, an opera buffa or, comic opera.
Split into simpler sentences: Emperor Joseph II, in 1778, was in the process of setting up an opera company for the purpose of performing German opera. So as to become part of this new company it was requested of Mozart that he write, to his unhappiness, an opera buffa or, comic opera.