The law only prevents the performance of a copyright work 'in public' (see section 19
). The Copyright Designs and Patents Act does not define what 'in public' means, but over the years various cases have established that it would exclude something done in front of an audience of family members or friends in a domestic setting. Clearly there are limits, and other factors such as whether or not the audience paid to listen to the performance might well be taken into account. However, if the performance was being conducted primarily for, say, family members but in a place where other people had access, such as a pub or hotel bar, then that would be a public performance. While that is largely settled law, it is worth mentioning that recent decisions by the Court of Justice of the European Union have introduced a novel concept, referred to as a "New Public" where a select sub-group of the 'public' may need to be differentiated from the public as a whole. These CJEU decisions were about access to websites, rather than performances of musical works, but they could introduce additional uncertainty in the future as to what constitutes the public.
Looking at your specific examples, a performance in a school where only pupils and members of staff were present would not be a public performance (see section 34
), but if parents were present then it would. Offices would also appear to constitute the public, based on a 1992 Australian case known as Australasian Performing Rights Association Ltd v. Commonwealth Bank of Australia
. A party where only invited guests were present, and held out of earshot of non-guests would probably qualify as non-public, while a performance in a church would almost certainly be a public one.
Improvising a song with new lyrics would infringe the copyright in the music if it was a performance in public, assuming that the music was still protected by copyright.