Skip to content

KennethWussmann/serum-preset-packager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

serum-preset-packager

This CLI tool allows to unpack and pack SerumPreset files (and others) used by Serum 2.

The file format was not open so far and it took a bit of reverse engineering to understand the file format.

Usage

  1. Clone the repo
  2. Install pip dependencies pip install -r requirements.txt

Unpack

Unpacking will decompress and dump the data in the preset file into a JSON file.

Note

The tool also supports some other file extensions used by Serum 2 like .XferArpBank. The legacy .fxp is NOT supported.

python cli.py unpack MyPreset.SerumPreset MyPreset.json

You can now look at and edit the MyPreset.json. Once you are done, you can pack the JSON back.

Pack

Packing means converting the JSON back into a valid Serum 2 preset file.

python cli.py pack MyPreset.json MyPreset.SerumPreset

This will produce a valid SerumPreset that you can load into Serum 2.

File Format

Kudos to @0xdevalias for his Gist on the reverse engineering of the preset file format. That sparked my interest to look further into it.

The file is structured like:

  1. Header + metadata JSON (b"XferJson\x00" + uint64_le(len(json)) + json-bytes)
  2. Zstandard compressed CBOR payload (uint32_le(len(cbor)) + uint32_le(2) + zstd‑frame(cbor-bytes))

Check the implementation for details. Yet unclear is the CBOR data itself. We can unpack and modify what is there, but what are valid properties is unknown. You can probably enumerate by unpacking all preset files you can find and eventually come across all possible values.

Related Projects

About

CLI tool for converting Serum 2 preset files to JSON and vice versa

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages