Add filter automation and kick-ducking sidechain to the DAWproject

Low-pass Equalizer band with automated cutoff on Saw Bass, Pad and Lead;
fader-ducking automation generated from the kick notes (DAWproject has no
sidechain routing). New --no-automation flag; READMEs updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
valknarandClaude Sonnet 5.5 committed 2026-11-25 10:39:10 +01:00
1 parent 3e3776a20d
commit fa33c7fd68
4 files changed
+196 -19

No files matched your search

+54 -12
View File
@@ -25,12 +25,13 @@ This README documents the song structure, every pattern, the harmony, the file f
4. [Harmony](#harmony)
5. [Tracks and patterns](#tracks-and-patterns)
6. [Intensity map](#intensity-map)
7. [Sound design guide](#sound-design-guide)
8. [File format details](#file-format-details)
9. [How the script is organised](#how-the-script-is-organised)
10. [Customising the track](#customising-the-track)
11. [Validation](#validation)
12. [Known limitations](#known-limitations)
7. [Filter automation and sidechain](#filter-automation-and-sidechain)
8. [Sound design guide](#sound-design-guide)
9. [File format details](#file-format-details)
10. [How the script is organised](#how-the-script-is-organised)
11. [Customising the track](#customising-the-track)
12. [Validation](#validation)
13. [Known limitations](#known-limitations)
---
@@ -67,6 +68,7 @@ exit-progressive-emulation/
```bash
python3 build_track.py # bare note tracks
python3 build_track.py --devices # adds an instrument-device hint to each track
python3 build_track.py --no-automation # notes only: no filter device, no automation
```
The run prints the length and the note count per track. The seeds are fixed, so output is identical on every run.
@@ -249,24 +251,57 @@ Note count per track and section, as a quick view of where the energy sits:
---
## Filter automation and sidechain
The `.dawproject` carries two kinds of automation, both written as `Points` lanes in the arrangement (about 7,000 breakpoints in total).
### Filter automation
Saw Bass, Pad and Lead each get a standard DAWproject **Equalizer** device holding one **low-pass band**. Its cutoff is automated in Hz, with one breakpoint per bar on an exponential (log-frequency) curve. The filter is a generic device so that it can be expressed in the open format; it is not the Polysynth's own filter.
| Track | Q / order | Cutoff story |
|---|---|---|
| **Saw Bass** | 1.6 / 4 pole | Closed at 150 Hz until the bass enters. Build 1: 180 → 450 Hz offbeat, then 450 → 3,200 Hz as it starts rolling. **Drop 1:** one sweep per 8 bars (500 → 1,500 Hz in the first phrase), every phrase a little brighter. Breakdown: dark drone at 250 Hz, opening to 1,200 Hz. Build 2: 350 → 800 Hz, then 800 → 4,200 Hz. **Drop 2:** 12 phrases of 8 bars, sweeps getting wider (up to 5,000 Hz). Outro: 3,500 → 400 Hz. |
| **Pad** | 0.8 / 2 pole | 400 Hz until the Breakdown, then it blooms to 4,500 Hz. Build 2: 1,500 → 6,000 Hz. Drop 2: breathes between 2,500 and 4,500 Hz over 16 bars. |
| **Lead** | 1.4 / 2 pole | Breakdown: 1,200 → 3,500 Hz. Build 2: 900 → 7,000 Hz (the arp sweeps wide open). Drop 2: alternates 7,000 → 3,000 and 3,000 → 7,000 Hz every 8 bars. |
### Sidechain (kick ducking)
DAWproject has **no sidechain routing** (the schema's Compressor has no sidechain input), so a real sidechain compressor cannot be written into the file. Instead, the pump is **volume-ducking automation** on the channel faders, generated from the actual kick notes:
| Track | Fader level on each kick | Recovery |
|---|---|---|
| Saw Bass | 45 % of its level | 0.5 beat |
| Pad | 25 % of its level | 0.8 beat |
| Lead | 45 % of its level | 0.5 beat |
- Every kick hit drops the fader instantly and it recovers linearly, so the bass, pad and lead breathe around the kick.
- Where kicks come faster than the recovery (the Build 2 kick roll), the fader stays ducked instead of fluttering.
- In the Breakdown there are no kicks, so nothing ducks, and the fader returns to its normal level.
- The ducking is on the channel fader, so you will see a sawtooth on the track's volume lane. It stays editable in Bitwig; scale or delete it there.
To upgrade to a real sidechain in Bitwig: delete the `auto_duck` lanes, put a **Compressor** on the track with its sidechain input set to the **Kick 808** track, and set it to taste.
---
## Sound design guide
The files contain notes and arrangement, not sounds. These are suggestions for turning them into the intended character: heavy, industrial, dark.
| Track | Suggested instrument | Ideas |
|---|---|---|
| **Kick 808** | Drum Machine or Sampler with a long 808 kick | Tune the tail to F (about 43.65 Hz), add soft saturation and a short click. Use it as the **sidechain source** for the bass, pad and lead. |
| **Kick 808** | Drum Machine or Sampler with a long 808 kick | Tune the tail to F (about 43.65 Hz), add soft saturation and a short click. The bass, pad and lead already duck to it (see [sidechain](#sidechain-kick-ducking)); use it as the sidechain source if you switch to a real compressor. |
| **Snare / Clap** | Drum Machine | A tight, cracked industrial snare layered with a clap. Short plate or room reverb, gated. |
| **Hats** | Drum Machine | Closed (key 42) and open (46) hats; keep the open hat short so the groove stays tight. |
| **Jungle Perc** | Drum Machine | Congas, bongos, toms, a rim and maracas on the key map above. Pan some hits wide. The track is panned slightly left by default. |
| **Saw Bass** | Polysynth | Three detuned saws plus a sub sine, low-pass filter with an envelope. Automate the cutoff upwards through each build. Add distortion for grit and sidechain from the kick. |
| **Saw Bass** | Polysynth | Three detuned saws plus a sub sine, low-pass filter with an envelope. The file already automates a separate low-pass band on the track; you can drive the Polysynth's own filter too. Add distortion for grit. |
| **Pad** | Polysynth or Wavetable | Wide, slow-attack pad, low-passed, with long reverb. Most prominent in the Breakdown. |
| **Lead** | Polysynth or Wavetable | Plucky or acid-style saw with delay; automate the filter open towards Drop 2. |
| **FX** | Sampler | Risers, impacts, crashes and reverse crashes on the keys above. |
**Mix starting points** (set in the project): Kick 0.90, Snare 0.72, Clap 0.60, Hats 0.55, Jungle Perc 0.60, Saw Bass 0.82, Pad 0.50, Lead 0.50, FX 0.55 (linear gain), master 0.8.
Further ideas not covered by the generator: filter and drive automation on the bass, a sidechain compressor driven by the kick, a bus compressor and a limiter on the master, and tempo-synced delay on the lead.
Further ideas not covered by the generator: drive automation on the bass, a true sidechain compressor driven by the kick, a bus compressor and a limiter on the master, and tempo-synced delay on the lead.
---
@@ -284,11 +319,12 @@ A zip archive with two files:
| File | Content |
|---|---|
| `metadata.xml` | Title, genre, comment (tempo, key and bar count) |
| `project.xml` | Transport (150 BPM, 4/4), 9 tracks plus a master track, mixer channels (volume and pan), arrangement and section markers |
| `project.xml` | Transport (150 BPM, 4/4), 9 tracks plus a master track, mixer channels (volume and pan), Equalizer filters, arrangement, automation and section markers |
- The arrangement uses `timeUnit="beats"`. Each track holds **8-bar clips** (32 beats) named after the section, such as "Drop 2 3", so the track is easy to rearrange or mute section by section.
- Markers at each section start: Intro, Build 1, Drop 1, Breakdown, Build 2, Drop 2, Outro.
- With `--devices`, each track also gets a `BuiltinDevice` hint (Drum Machine, Polysynth or Sampler).
- Automation lives in `Points` lanes inside each track's arrangement lane: `auto_flt5/6/7` target the filter cutoff (`unit="hertz"`) and `auto_duck5/6/7` target the channel `Volume` (`unit="linear"`). Interpolation is `linear`, with `hold` where the fader waits for the next kick. `--no-automation` leaves out both the filter devices and the lanes.
---
@@ -305,6 +341,7 @@ A zip archive with two files:
| `build_tracks()` | The track table: name, notes, channel, colour, volume, pan, device hint. Each generator gets its own seed (`1337 + n`). |
| `finalize()` | Clamps notes to the arrangement, drops dead notes, sorts |
| MIDI writer | `vlq`, `meta`, `note_events`, `write_midi` |
| Automation | `FILTERS`, `DUCK`, `hold`, `sweep`, `tidy`, `filter_curves`, `duck_points` |
| DAWproject writer | `chunk_clips`, `build_dawproject` |
| `main()` | Builds the tracks, writes the MIDI files and the `.dawproject`, prints a summary |
@@ -318,6 +355,8 @@ A zip archive with two files:
| Percussion groove | `PERC_A`, `PERC_B`, `PERC_C`, each a list of `(step, key, velocity)` |
| Feel of the hats, snares or bass | The matching `gen_*` function |
| Mix levels, colours, pan | The table in `build_tracks()` |
| Filter curves | `filter_curves()` (breakpoints per track via `hold()` and `sweep()`), `FILTERS` for Q and order |
| Pump depth and release | `DUCK` (per track: depth, release in beats) |
| A different variation | Change the seed offsets in `build_tracks()` (`r(n)`) |
After editing, re-run `python3 build_track.py` and re-import into Bitwig.
@@ -330,12 +369,15 @@ xmllint --noout --schema Project.xsd /tmp/dp/project.xml
xmllint --noout --schema MetaData.xsd /tmp/dp/metadata.xml
```
Both schemas come from [bitwig/dawproject](https://github.com/bitwig/dawproject). The shipped file validates with and without `--devices`. The MIDI files were parsed back: 150 BPM, 960 PPQ, nine instrument tracks, and the last note-ons fall within bar 320.
Both schemas come from [bitwig/dawproject](https://github.com/bitwig/dawproject). The shipped file validates with and without `--devices` and `--no-automation`. A script check also confirmed that every automation target resolves to a real parameter id and that breakpoint times strictly increase. The MIDI files were parsed back: 150 BPM, 960 PPQ, nine instrument tracks, and the last note-ons fall within bar 320.
## Known limitations
- **Not yet tested in Bitwig.** The project is schema-valid, but I could not open it in Bitwig from the build machine.
- **Notes, clips, markers, volume and pan only.** No instrument patches, effects, automation or sidechain: those are the next layer, built in the DAW.
- **Notes, clips, markers, volume, pan and the automation above.** No instrument patches or other effects: those are the next layer, built in the DAW.
- **The sidechain is volume ducking, not a compressor.** DAWproject cannot express sidechain routing.
- **The filter is an Equalizer low-pass band, not the instrument's own filter.** Bitwig-specific device parameters cannot be addressed from the open format.
- Whether Bitwig imports the Equalizer band and the automation lanes exactly as written is **untested**.
- The `--devices` option only names a device type; Bitwig may still need you to load the instrument yourself.
- The strictly regular, generated groove is tight by design. Humanisation is limited to small timing jitter on hats, percussion and shaker, plus velocity variation on the hats.
- Chord changes are fixed per section, so the harmony is deliberately simple. The progression carries the track through repetition.