Your shopping cart is empty!

To build a fugue into B.A.C.H., I started from the basics, from what a textbook fugue is: the module creates a subject, brings it into the voices following the classical plan, and hands everything that is not thematic to a counterpoint solver.
By Gilles de Kaona
The FUGUE algorithm does not replay any score from The Art of Fugue. The reference to Bach goes without saying: it is a natural tribute to a musician who has been part of my life for as long as I can remember. Yet at no point are the master's scores used.
The word fugue is much older than Bach. The Latin fuga means both flight (fugere, to flee) and pursuit (fugare, to chase). It appears as early as the 14th century, describing voices that flee from and pursue one another by imitation (so it was originally a canon). Over four centuries the technique was refined, then taken to a remarkable level of complexity by Bach in The Well-Tempered Clavier and The Art of Fugue.
As you turn the encoders, your own fugues will emerge, more or less complex, and sometimes even on the edge… of no longer really being fugues!
The MATERIAL encoder selects one of eight families. Each one is a model written in scale degrees, and all of them touch the dominant.
| Family | Shape | Rhythm |
|---|---|---|
| ARCH | rises by thirds to the dominant, comes back down by step | six eighth notes, one quarter note |
| FIFTHS | arpeggio on tonic, dominant, octave; returns through the leading tone | eight eighth notes |
| SCALAR | rising scale up to the dominant, then back down | sixteenth notes |
| SYNCOPATED | leap to the dominant, return, another leap | dotted eighth and sixteenth, a quarter note in the middle |
| TURN | a turn (a small ornament of a few notes) around the tonic, then a rise towards the dominant | sixteenth notes, then eighth notes |
| PEDAL | the tonic returns every other note beneath a descending line | eighth notes, final quarter note |
| WEDGE | fans out on either side of the tonic | eighth notes, final quarter note |
| CHORALE | stepwise rise and fall, in chorale style | quarter notes, final half note |
With each new cycle, the engine derives a new statement from the model. The inner durations rotate by one position, which keeps the total length, and therefore the timing of the entries, unchanged. One or two inner notes shift by one degree, without leaving the range of the model. The first and last notes never move, and if the drift has erased the dominant, the nearest inner note restores it. The family is always recognisable; the exact phrase changes from one cycle to the next.
A change of MATERIAL does not take effect immediately. The new value must stay stable for a full beat, then a new exposition starts at the beginning of the next bar. This prevents a sweep of the encoder across three families from triggering three aborted expositions. You can still force the change with the Reset button.
At each new section, the subject may mutate: an inner note moves by one degree, or two neighbouring rhythmic values swap places. The probability follows the inverse of MEMORY, and these mutations accumulate from one section to the next, within one degree of the model (two degrees below 45%). The countersubject is rebuilt behind it.
Even at 100%, two successive cycles never present the same statement: the per-cycle derivation never drops to zero. This is deliberate. A fugue can run indefinitely without ever using exactly the same phrase, and so without producing a loop.
The fugue moves through exposition, episode, middle entry, stretto and coda, then returns to an exposition. Each section ends on a bar line and every entry falls on a whole beat.
Without a stretto, the form still closes: after 2 to 5 middle entries (depending on GROWTH), the coda arrives.
GROWTH sets the length of every section, within a range of 1 to 24 bars. This is recalculated at every step: turning GROWTH shortens or lengthens the section immediately, not just the next one. A shortened section never stops in the middle of a bar.
The answer is the subject transposed to the fifth, that is, to the scale degree closest to seven semitones. Below 50% of INTERACTION, the answer is tonal: on its first two notes, a dominant is answered by the tonic, as in simple fugues.
The countersubject is built, not copied. Its rhythm is offset: its first value lasts half as long as the subject's, so the attacks of the two lines never coincide. Its pitches are exclusively thirds and sixths against the subject, favouring contrary motion and stepwise movement. No fifths, no octaves, no unisons: the counterpoint is invertible at the octave, the thirds becoming sixths. In an exposition, where it accompanies an offset entry it cannot anticipate, it is "allowed" to bend by one degree to avoid a harsh dissonance; otherwise it keeps its contour.
Every note that does not belong to the thematic material is chosen by a solver. It examines the nine degrees around the previous note and gives each one a penalty; the least penalised wins. In decreasing order of weight:
Contrary motion with the other voices is rewarded, and the leading tone is drawn towards the tonic. The fourth is only counted as a dissonance against the actual bass of the moment. A simple harmony, one chord per half bar, is shared by all four voices: tonic and dominant in the exposition, descending fifths in the episode, I-IV-V in the middle entry.
DENSITY never removes a thematic note. It decides how many entries the exposition has (one below 16%, two below 40%, three below 68%, then four) and how many free voices may sound on top (none below 28%, then one, two, three above 80%). It also sets how much they breathe: frequent rests at the bottom of the range, base values moving from quarter notes to eighth notes, and above 70% more and more sixteenth notes.
INTERACTION has two sides. Below 35%, the free voices avoid what the leading voice has just played: the lines are layered without answering one another. Above that, they imitate: they pick up a degree recently stated by the subject, with a delay that tightens from six notes to one as the encoder goes up. INTERACTION also tightens the entries of the exposition and decides whether the answer is tonal.
Everything TENSION does in FUGUE is diatonic, except for one strictly limited case.
MORPH acts continuously on every note played. It widens or narrows the contour of the subject (from half its intervals at the bottom of the range to 1.7 times at the top) and stretches or compresses its rhythm (values doubled at the bottom, halved at the top). At the centre, the subject is played as written. The change follows the encoder within a few sixteenth notes, without jolts. The inversions, retrogrades and augmentations described above are added to this effect beyond their thresholds.
The rules stay the same whatever the encoder settings, but what they produce changes completely. Three extreme settings show it.
Between these extremes, starting with the encoders at their centre, lies the textbook fugue. Everything that moves away from it is still built on the same rules.
So FUGUE is not a ready-made fugue but a composition tool. The module takes care of the overall construction: it leads the voices, avoids parallel fifths, steers the cadence and keeps the form. The musical decisions are yours: how many voices, which subject, how much tension, how long to linger in an episode, when to tighten the entries. And of course in which key, with what velocity response, with which ornaments or unexpected gestures from HUMANIZE.
You listen, you adjust, you start again, the way you work on a piece. The fugue that comes out of it is yours.