CZSYSEXY uses a text database to store users’ libraries of sound information. Plain text was chosen as a simple and secure way to store static important data. Users are reminded to back up their important files regularly.
f0 44 00 00 70 20 23 00 00 00... ...00 04 00 00 00 04 00 00 f7
The sysex format that Casio invented for its CZ synthesizers is very opaque. Sysex files are just blocks of binary data, and you can’t tell by looking what you have, or what it will sound like. This format is streamlined and does a good job of communicating with a machine.
Not only is the syex format opaque, it is also different depending on the model of CZ.
The other “native format” for storing and exchanging CZ data is text information written on patch sheets. These are easy to read and share, but difficult to load on your CZ.
Neither binary sysex or hand-written patch sheets were an appropriate file format. Instead I created a text format that is based on YAML. YAML was chosen because it is a nice middle ground between human-readable text, and machine-readable attributes. I wanted the database to be both easy to read and verify, and easy to import into an application.
These are some advantages of YAML:
- A human can read and make sense of a YAML file
- A machine can parse a YAML file relatively quickly
- There are YAML parsing libraries for different languages, so your data is not locked in to using CZSYSEXY.
These are some advantages of a text database:
- Can be read with existing tools
- Can be edited with existing tools
- Plain text will be around for a long time
- Plain text is open and shareable
I decided to have each database item live on one line in the database file. Each line is quite long, and it is much less readable than if I had thrown in all the expected whitespace. I did it this way so the database would be dense rather than sparse, and so you can scroll through the items quickly.
The long lines might cause a problem with your text editor, though. But for most actions, you can just use CZSYSEXY to load, edit, and save your databases.