Synthstrom Deluge: add an option to write a drum kit#200
Merged
git-moss merged 4 commits intoJul 18, 2026
Conversation
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.
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 path |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, defaultsound) 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 aKITSfolder 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 samefirmwareVersion/earliestCompatibleFirmwareattributes 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.