Where can I find a list of every rule I need to follow to write a fugue?

There are some clear rules and guidelines for writing a fugue in the Bach WTC style: The harmony, which needs to be completely correct, has clear rules. And, writing invertible counterpoint (subject and countersubject) has clear rules. Other than that, the choices are vast, but you do have clear decisions to make: In the exposition, you have to decide 1) what voices the subjects enter (top, middle, bottom, middle, top, bottom, etc), 2) how altered they will be (tonal vs. real answer), and, 3) will the subject be modulating or not. Then you have to choose a countersubject (maybe), and good snippet from the subject for the episodes. Generally, in major key fugues, Bach first modulates to one or two closely related minor keys (where subjects will be stated. Remember that a descending diatonic line can be harmonized with circle of 5ths). The penultimate subject statement is often in the subdominant area, with a final subject entry, usually, at the close. But an equally, or even more important feature of the fugues, is not a modulation scheme, but a contrapuntal one: the first episode after the exposition often leads to a 'counter exposition', which is like an additional subject statement from the exposition, but with the voices ordered in new manner, to highlight how the countersubject works both above and below the subject. And all the subsequent subject entries, with modulating episodes, are often a logical and complete assortment of the different subject forms (real and tonal) in different positions in the voice order. So that will make your decision making simpler: example, have you used a tonal response yet in the bass voice? It's true though, at the same time, you have complex tonality and harmony rules which need to be tended to.

If you have ability in computer programming, you can generate many possibilities for each decision mentioned above, and listen to the myriad results and choose results which you like.

/r/musictheory Thread