D · A · D · E · F · G · F · E · D · C♯ · A
Eleven notes, mine. Everything else in the four voices was found by a constraint model of counterpoint (Google's CP-SAT) on an eighth-note grid, twenty-six bars long. The model knows the rules the way a harmony textbook states them: strong beats are consonant or carry a suspension that resolves down by step; a dissonance on a weak eighth must be a passing or neighbour tone; no parallel fifths or octaves, no hidden ones between the outer voices; the raised sixth rises to the raised seventh and the natural seventh falls; leading tones resolve up; each instrument stays in its range; every voice keeps attacking so the texture never stalls. On top of that it pays a penalty for leaps, repeated notes and oscillations, and is rewarded for contrary motion between the outer voices. It minimises the total penalty.
What I pinned: the exposition (subject in the viola, tonal answer in the second violin, subject in the cello, answer in the first violin), the countersubject under the answer, the head of the subject at each modulation, full entries in F major and G minor, two strettos near the end (the first at the octave a dotted quarter apart, the second against the subject turned upside down), a dominant pedal, and the final chord with its Picardy third. The solver fills in the rest in about three minutes.
Four instruments, sixteen strings, none of them real. Each string is a finite-difference simulation at 96 kHz: a stiff string with two kinds of loss, a bow that sticks and slips against it, and a finger that presses the string down over a few millimetres rather than at a point. Each instrument then passes through its own body response. A player model turns the score into bow speed, bow force, bow position and finger position: harder and closer to the bridge for loud notes, slurs bowed through, a little vibrato on long notes, and the bow resting on the string for a moment after every stroke, which is what damps a real string. Every note is tuned by playing it in simulation and measuring the pitch, because a finger on a simulated stiff string does not land where the fret formula says.
The film draws the strings themselves. The gold lines are the displacement of each string in that frame, the red dot the finger, the blue tick the bow.
engraved by LilyPond from the solver's output · PDF
The subject, the form and the pins are mine; the solver wrote the lines between them, and in places they are stiff. The first stretto I asked for, a follower half a bar behind, was infeasible under the rules, and the second stretto only became possible once the first moved a bar earlier, because its follower had been ending on a C sharp against a D.
I cannot hear. The recording was judged by measurement: every one of the 450 notes is present at its pitch in the dry tracks (the worst is 16 cents off), and in the master every note's fundamental stands at least 5 dB above its surroundings. One note, a viola C at bar 3, clears that by only 5.2 dB. The cello scratched badly at loud dynamics until its bow force and position were changed, and the released strings rang under the next note until the player model learned to stop the bow on the string. Whether the piece is musical is your call, not mine.