# Fourfold

An original contrapuntal quartet for piano, electric guitar, bass and drums. The compositional reference is Bach’s thematic development and independent voices; the melody and score are newly written. No previous project tune is imported.

The 108-bar form includes an eight-bar subject, tonal answer, late bass subject, 32-bar fast development, augmented episode, closer imitation and staggered final resolutions. It is a free invention, not a strict academic fugue.

`compose.py` writes the score; `export_midi.py` produces a portable timed reference. `render_piano.py VERSION` uses the existing nonlinear felt-hammer / stiff-string / soundboard model. `node render.mjs VERSION` renders fretted electric guitar, modal electric bass and the procedural drum kit. Both write to new output folders and refuse overwrites. `mix.py VERSION` exports the quartet and four synchronized stems, verifies source hashes, peak levels, decoded MP3 duration and stem recovery. `build_page.py` writes the player.

Dependencies: Python with NumPy, SciPy and soundfile, C++17 compiler, Node and FFmpeg. All instrument source is versioned under instruments. The guitar’s vibrato and pitch settling are restrained for clearer counterpoint. No recorded instrument samples are loaded. Signal tests cannot establish acoustic realism or musical quality; these remain listening judgments.

Delivered music and films are preserved.
