Skip to content

Synthstrom Deluge: add an option to write a drum kit#200

Merged
git-moss merged 4 commits into
git-moss:mainfrom
douglas-carmichael:add-deluge-kit-export
Jul 18, 2026
Merged

Synthstrom Deluge: add an option to write a drum kit#200
git-moss merged 4 commits into
git-moss:mainfrom
douglas-carmichael:add-deluge-kit-export

Conversation

@douglas-carmichael

Copy link
Copy Markdown
Contributor

The Deluge creator only ever wrote a synth (sound) preset, even though the detector already reads both sound and kit files. This adds the missing direction: a drum-kit writer.

A new Output Type creator option (a dropdown with Synth (Sound) / Drum Kit; CLI DelugeOutputType=sound|kit, default sound) selects what is written. Modelled on the existing Tonverk "Output Engine" option. A kit turns every zone into its own drum (a <sound> inside the kits ), laid out low to high; the preset is written to a KITSfolder with its samples alongside inSAMPLES//`, mirroring the SD-card layout the sound path already uses.

The type is chosen explicitly rather than auto-detected: a one-sample-per-note layout is not necessarily a kit - a per-note-sampled synth bass looks identical - so guessing would misclassify those.

I cross-checked the kit structure against the Deluge firmware source (Kit::writeToFile / SoundDrum::writeToFileAsInstrument) and a factory kit: the <kit> root carries the same firmwareVersion / earliestCompatibleFirmware attributes as a sound, followed by a kit-level <defaultParams> block and one <sound> (with <name>) per drum. Only v4-compatible, element-based structure is used, matching the sound writer.

A kit holds at most one drum per note (36 up to 127), so at most 92 drums are written; a larger source is truncated with a logged warning instead of silently.

Verified by converting a 40-drum DecentSampler kit to a Deluge kit and reading it back through the Deluge detector as 40 drums, and by confirming an over-size source is capped to 92 with the warning. Documented in README-FORMATS.md, CHANGELOG entry added.

The Deluge creator only wrote synth (sound) presets. A new Output Type
creator option (Synth/Kit; CLI DelugeOutputType=sound|kit, default
sound) now also writes a drum kit: every zone becomes its own drum (a
<sound> inside the kit's <soundSources>), laid out low to high. The
type is chosen explicitly rather than auto-detected because a
one-sample-per-note layout is not necessarily a kit - a per-note synth
bass looks identical.

The kit XML follows the official firmware (kit root with the
firmware-version attributes, a kit-level defaultParams block and one
sound per drum). A kit holds at most one drum per note (36 up to 127),
so at most 92 drums are written; a larger source is truncated with a
logged warning rather than silently.

Verified against the firmware source and a factory kit, and by
round-tripping through the Deluge detector: a 40-drum kit reads back as
40 drums, and an over-size source is capped to 92.
A Deluge kit drum is a single sample, so a source with several zones on
the same note (velocity layers or round-robins) must collapse to one
drum. The kit path now reuses getMappedZones - the same by-note
reduction the synth path uses - which keeps one zone per note, the
loudest velocity layer. Verified: a kit with two notes each carrying a
soft and a loud layer writes two drums, each the loud layer; a
one-sample-per-note kit (40 notes) is unchanged at 40 drums.
@douglas-carmichael

Copy link
Copy Markdown
Contributor Author

Added a second commit: velocity layers and round-robins are now consolidated by note. A Deluge kit drum is a single sample, so a source with several zones on the same note previously produced several duplicate drums. The kit path now reuses the synth paths getMappedZones`, keeping one zone per note (the loudest velocity layer). Verified with a synthetic kit of two notes each carrying a soft and a loud layer -> two drums, each the loud layer; the 40-note SSS043 kit is unchanged at 40 drums.

@git-moss
git-moss merged commit 7ff5297 into git-moss:main Jul 18, 2026
douglas-carmichael added a commit to douglas-carmichael/ConvertWithMoss that referenced this pull request Jul 18, 2026
Rebased onto main after the drum-kit feature (git-moss#200) was merged.

- Consolidate kit (opt-in, CLI DelugeConsolidateKit): reduces a kit to
  one drum per recognized type and orders the drums by drum role - kick
  on the lowest row - following the factory TR-808 layout, so a beat can
  be programmed without switching rows. Several drums of a type collapse
  to the first; unrecognized drums are kept and appended. The classifier
  handles full names, numbered variants (kic2, sna3) and the 4-character
  truncations the factory kits use.
- Each consolidated drum is labelled by its role (Kick, Snare, ...) for
  a clean read-out; the sample files keep their original names.
- Fixed: kit drums were pitched by their keyboard mapping note (a drum
  on note 35 played 25 semitones too low, audible on toms); kit drums
  now play at natural pitch (transpose 0) like the factory kits, keeping
  only an explicit detune.
git-moss pushed a commit that referenced this pull request Jul 18, 2026
)

Rebased onto main after the drum-kit feature (#200) was merged.

- Consolidate kit (opt-in, CLI DelugeConsolidateKit): reduces a kit to
  one drum per recognized type and orders the drums by drum role - kick
  on the lowest row - following the factory TR-808 layout, so a beat can
  be programmed without switching rows. Several drums of a type collapse
  to the first; unrecognized drums are kept and appended. The classifier
  handles full names, numbered variants (kic2, sna3) and the 4-character
  truncations the factory kits use.
- Each consolidated drum is labelled by its role (Kick, Snare, ...) for
  a clean read-out; the sample files keep their original names.
- Fixed: kit drums were pitched by their keyboard mapping note (a drum
  on note 35 played 25 semitones too low, audible on toms); kit drums
  now play at natural pitch (transpose 0) like the factory kits, keeping
  only an explicit detune.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants