reverse engineering tool for dn2prj project files and dn2pst preset files
The dn-deobfuscator tool can work with multiple file types:
- Elektron Digitone project files (
.dn2prj) - Elektron Digitone preset files (
.dn2pst) - SysEx files (
.syx) with sounds/patches
python -m dn_deobfuscator.app <file_path>This will extract the contents of a .dn2prj or .dn2pst file to the current directory.
You can also extract all patches from a directory containing multiple .dn2pst files:
python -m dn_deobfuscator.app --patches-dir <directory_with_patches> --output-md <output_markdown_file>This will process all .dn2pst files in the specified directory, extract their binary data, and create a consolidated markdown file with patches' names, tags, and hex dumps.
usage: app.py [-h] [--file FILE] [--output OUTPUT] [--sysex SYSEX] [--md MD] [--patches-dir PATCHES_DIR] [--output-md OUTPUT_MD]
-h, --help- Show the help message and exit--file- Path to the file to extract (.dn2prj or .dn2pst)--output- Destination directory for extracted files (default: current directory)--sysex- Path to the .syx file containing Digitone patches--md- Path to output markdown file for sysex extraction--patches-dir- Directory containing .dn2pst patch files--output-md- Path to output markdown file for batch extraction
python -m dn_deobfuscator.app path/to/mysound.dn2pstThis will extract the binary data and create a text representation in the current directory.
python -m dn_deobfuscator.app path/to/myproject.dn2prj -d output_folderpython -m dn_deobfuscator.app path/to/patches.syx -sThis will create a markdown file named patches.syx_patches.md in the current directory, containing all patches found in the SysEx file. Each patch will include:
- Patch name with prefix (e.g., "BD. KICK", "CY. CRASH")
- Patch tags
- Hex dump of the patch binary data
python -m dn_deobfuscator.app path/to/first.syx -s
python -m dn_deobfuscator.app path/to/second.syx -s -aThe -a (append) option allows you to add patches from multiple SysEx files to the same markdown document.
python -m dn_deobfuscator.app path/to/patches.syx -s -d output_folderThis will create the markdown file in the specified output folder.
python -m dn_deobfuscator.app --patches-dir data/dn2_patches --output-md patches_summary.mdThis will:
-
Process all
.dn2pstfiles in thedata/dn2_patchesdirectory -
Extract each patch's binary file, text representation, and metadata (name and tags)
-
Generate a consolidated markdown file (
patches_summary.md) with all patches in the following format:- patch name: <patch_name> - patch tags: <tag1>, <tag2>, <tag3> - patch binary: 00000000 ac 11 d3 03 02 00 05 00 0f 30 30 32 38 00 00 00 |.........0028...| ...
- Created functional test for parsing the "HIDDEN TEARS" Digitone 2 preset file
- Implemented
parse_digitone_presetfunction to extract sound parameters - Identified the correct offset for the algorithm value (0x69)
- Successfully parsed basic parameters from the binary file
- Added detailed comments explaining parameter locations
- Algorithm value: offset 0x69
- Feedback value: offset 0x83
- Filter parameters: around offset 0xA0-0xB0
- Amplifier parameters: around offset 0xB0-0xC0
- FX parameters: around offset 0xC0-0xD0
- LFO parameters: around offset 0xD0-0xF0
- Identify exact offsets for more parameters
- Implement conversion functions for floating-point values
- Add support for more preset files to validate the offsets
- Create a comprehensive mapping of parameter names to offsets
- Implement a function to modify parameters and save them back to the binary file
- Build a user interface for visualizing and editing presets
This section documents the sound preset parameters found in Digitone 2 based on our reverse engineering work and the Digitone 2 User Manual.
| Parameter | Possible Values | Description |
|---|---|---|
| ALGO | 1-8 | FM Algorithm (arrangement of operators) |
| C | 0.00-1.00 | Carrier operator level |
| A | 0.00-1.00 | A operator level |
| B | [0.00-1.00, 0.00-1.00] | B1 and B2 operator levels |
| HARM | -26.00 to +26.00 | Harmonic value - negative values change operator C, positive values change A and B1 |
| DTUN | -48.00 to +48.00 | Detune value |
| FDBK | 0-127 | Feedback amount |
| MIX | -64 to +63 | Mix value between carrier outputs X and Y |
| Parameter | Possible Values | Description |
|---|---|---|
| A Envelope | { atk: 0-127, dec: 0-127, end: 0-127, lev: 0-127 } | A operator envelope |
| B Envelope | { atk: 0-127, dec: 0-127, end: 0-127, lev: 0-127 } | B operators envelope |
| Parameter | Possible Values | Description |
|---|---|---|
| ADEL | 0-127 | A Delay value |
| ATRG | true/false | A Trig (on/off) |
| ARST | true/false | A Reset (on/off) |
| PHRT | "ALL", "OFF" | Phase retrigger mode |
| BDEL | 0-127 | B Delay value |
| BTRG | true/false | B Trig (on/off) |
| BRST | true/false | B Reset (on/off) |
| Parameter | Possible Values | Description |
|---|---|---|
| Ratio Offset C | -16.00 to +16.00 | Carrier ratio offset |
| Ratio Offset A | -16.00 to +16.00 | A operator ratio offset |
| Ratio Offset B1 | -16.00 to +16.00 | B1 operator ratio offset |
| Ratio Offset B2 | -16.00 to +16.00 | B2 operator ratio offset |
| Key Track A | -64 to +63 | A operator key tracking |
| Key Track B1 | -64 to +63 | B1 operator key tracking |
| Key Track B2 | -64 to +63 | B2 operator key tracking |
| Parameter | Possible Values | Description |
|---|---|---|
| Type | "Lowpass", "Bandpass", "Highpass" with 2-pole (12dB/oct) | Filter type |
| Attack | 0-127 | Filter envelope attack |
| Decay | 0-127 | Filter envelope decay |
| Sustain | 0-127 | Filter envelope sustain |
| Release | 0-127 | Filter envelope release |
| Frequency | 0-127 | Filter cutoff frequency |
| Resonance | 0-127 | Filter resonance |
| Env Amount | -64 to +63 | Envelope amount (bipolar) |
| Parameter | Possible Values | Description |
|---|---|---|
| Attack | 0-127 | Amp envelope attack |
| Decay | 0-127 | Amp envelope decay |
| Sustain | 0-127 | Amp envelope sustain |
| Release | 0-127 | Amp envelope release |
| Reset | true/false | Reset flag |
| Mode | "ADSR", "AD" | Envelope mode |
| Pan | "Left", "Center", "Right" | Pan position |
| Volume | 0-127 | Output volume |
| Parameter | Possible Values | Description |
|---|---|---|
| Bit Reduction | true/false | Bit reduction enabled |
| Overdrive | 0-127 | Overdrive amount |
| Sample Rate Reduction | 0-127 | Sample rate reduction amount |
| Sample Rate Routing | "Pre-filter", "Post-filter" | Routing mode |
| Delay | true/false | Delay enabled |
| Reverb | 0-127 | Reverb amount |
| Chorus | 0-127 | Chorus amount |
| Overdrive Routing | "Pre-filter", "Post-filter" | Overdrive routing |
| Parameter | Possible Values | Description |
|---|---|---|
| Speed | 0.00-127.00 | LFO speed |
| Multiplier | 1, 2, 4, 8, 16, 32, 64 | Speed multiplier |
| Fade | 0-127 | Fade time |
| Destination | SYN parameters (HARM, DTUN, FDBK, MIX), FLTR parameters (FREQ, RES), AMP parameters (PAN, VOL) | Target parameter |
| Waveform | "Triangle", "Sine", "Square", "Sawtooth", "Exponential", "Ramp", "Random" | Waveform type |
| Start Phase | 0-127 | Start phase |
| Mode | "FREE", "TRIG", "HOLD", "ONE", "HALF" | LFO mode |
| Depth | -64.00 to +63.00 | Modulation depth |
Note: Parameter values are based on both our reverse engineering of the HIDDEN TEARS preset and the official Digitone 2 User Manual.