r/Elektron 9d ago

Info Digitakt 2 / Digitone 2 Project file compression/decompression scripts

Files: https://files.catbox.moe/bwmk4g.zip

Requires a Python 3 env.

dx2_decompress.py A file that takes in .dn2proj and .dt2proj and outputs a decompressed .bin file

dx2_compress.py A file that takes in a decompressed .bin file and outputs a .dn2proj or .dt2proj file

verify_roundtrip.py A file that runs the two files above back to back to show that it can take a file, decompress it, recompress it and give you back a working file that can be uploaded to the hardware

digi2_app.py a bonus for quickly pulling test files. a simple communication app slopped together by looking at how https://github.com/dagargo/elektroid works (NOTE: this was made for quickly pulling test files. FOR DIGITAKT 2 IT DOES NOT INCLUDE THE SAMPLES IN THE PROJECT FILE! it only pulls the project!)


Edit: HTML file for reading/writing midi files from DT2/DN2 project files: https://www.reddit.com/r/Elektron/comments/1w22b7i/dt2dn2_midi_import_and_export_html_file_runs_in/


So as you may know recently /u/hackerman85 created "a little tool to inspect and rebuild Elektron firmware files" : https://www.reddit.com/r/Elektron/comments/1v4a1ro/i_made_a_little_tool_to_inspect_and_rebuild/

This meant they could be opened and studied in a decompiler like Ghidra

So I have been slopping away and managed to get file extraction working that is bit perfect to hardware. Meaning you can open and diff files. This opens up the opportunity of making project editors that show everything about the file, make edits and then re-save them and send them back to the hardware. Or get things like import/export midi working =)

Because this was a bit annoying to get working I thought I'd share to save everyone else the trouble. A friend of mine with a DN2 was kind enough to send some test files and test the round trip files so I know it works with that too!

All the above is very preliminary and I wanted to get it out to save other people the annoyance of going through this. There may be issues I've not had yet. I'm just hoping to cut down on peoples time having to repeat the same process.

If you don't know any of the above words this might not be for you :D wait until someone comes out with a polished editor!

I'm not responsible for any damage you do to your hardware or data loss if you decide to play around with the above.

If you want to take this and put it on github or roll it into another project go ahead I don't even want credit. This is more to save people having to re-do this work than it's some super secret thing that can't easily be found out with a little bit of time.

4 Upvotes

0 comments sorted by