A fugue has the reputation of being a very complicated musical idea – and indeed it is if you're planning to compose one. It’s the musical equivalent of constructing the Times crossword and a difficult Sudoku puzzle at the same time. But listening to one and following how it is put together is intriguing and fun – it can have the obsessive interest of untangling string and the logical surprises of trying to follow the staircases in an M.C. Escher drawing: interesting patterns, intriguingly fitted together.

In essence, a fugue is a conversation in which everyone talks about the same thing at once, and you have to listen carefully to follow all the different speakers. Sometimes one of the speakers is more prominent; sometimes everyone piles in together. But importantly the speakers keep repeating what the others have said – a fugue is about one part imitating another.

Fugues developed from musical counterpoint of the 16th century, in which parts imitating each other (polyphony) was a big contrast with music written in block chords (homophony). The German organist Michael Praetorius wrote in the early 1600s that ‘in constructing a good fugue one must with special diligence and careful thought seek to bring together as many ways as possible in which the same material can be combined with itself: interwoven, duplicated, used in direct and contrary motion; in short, brought together in an orderly, artistic and graceful way and carried through to the end.’

J.S. Bach in particular is associated with fugues, with his collection of 48 Preludes and Fugues among his most famous and influential works. Bach wrote very many fugues for keyboard (organ and harpsichord) and included them in his choral works. In the case of The Art of Fugue, Bach never specified what instruments it was to be played on, and some people have thought it more a game at inventing complex musical ideas than something actually to perform. But it also means you can hear many different versions – single keyboard (organ, harpsichord, piano), two harpsichords, string quartets, instrumental ensembles, and even jazz ensembles.

The parts that make up a fugue have particular names that give some indication of what their musical function is:

Voice – a single musical line, like having one singer. A fugue with three voices has three separate musical lines. The more voices there are the more complex it becomes.

Entry – the point where a voice starts playing. Voices have their entries one after each other, and then can drop out and re-enter all through the piece.

Subject – the main melody, and the first thing each voice plays. It keeps coming back all through the piece, usually with a prominent final statement near the end. The subject for The Art of Fugue is famously very chromatic.

Countersubject – when the second voice comes in with the subject (in a different key), the first voice has to play something else complementary and distinctive: this is the countersubject.

Episode – passages of music that use parts of the subject and countersubject in a more free way to link the formally constructed sections.

Stretto – when a voice interrupts another before it has really finished, like a musical chase.

Augmentation – when the subject is made longer, so it sounds, for example, as if it is being played half as fast.

Diminution – when the subject is made shorter, so it could sound as though it is being played twice as fast.

Pedal – a long note sustained for several bars in one voice, while all the other voices move round it. This often happens as an indication that we’re nearing the end of the fugue.

Mirror fugue – when a theme is inverted, or turned upside down, in another voice. For example, if the notes go up in the subject in voice 1, they go down by the same degree in voice 2.

One endearing example of a fugue is seen in the final movement of Britten's The Young Person's Guide to the Orchestra:

But Bach will always be the acknowledged master of these musical conundrums. The Art of Fugue is a wonderful compendium of absolutely everything you need to know about fugues.

Tetractys – The Art of Fugue is supported by Outset in partnership with The Luxury Collection, and staged with generous philanthropic support from David Hancock, Linda and Philip Harley and two anonymous donors.