# ot-tools-io
rust library crate for reading/writing binary data files used by the [Elektron Octatrack DPS-1](https://www.elektron.se/en/octratrack-mkii-explorer)
## License
[GNU GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html)
## About
Library crate for reading/writing Octatrack binary data files.
Most of this is just the [`serde`](https://serde.rs) and
[`bincode`](https://github.com/bincode-org/bincode) crates with a bunch of
function definitions for reading/writing different files or creating new types.
The majority of fields contained within binary data files have been reverse engineered.
See the list in [./TODO.md](ot-tools-io/TODO.md) for information about missing/unknown data fields.
## Current Features (mostly working-ish)
- Read Octatrack binary data files and deserialize into rust types
- Serialize rust types and write into Octatrack binary data files
- Convert Octatrack binary data files into YAML (string or file)
- Convert Octatrack binary data files into JSON (string or file)
- Convert JSON (string or file) into Octatrack binary data files
- Convert YAML (string or file) into Octatrack binary data files
## Notes
The JSON / YAML data structures are a bit ... weird. I have done my best to not
parse the underlying data into new structures, keeping it so that the library
returns data that is *as-close-to-the-raw-data-as-possible*.
Like, the arrangements data could do with some work to deal with all the
`{"empty": ""}` arranger rows. Header fields *probably* don't need to be there
and can be injected in during deserialization.
## Credits
The following projects were used a starting references for the initial
serialization/deserialization efforts of data files (mostly the `.ot` files).
Without them, ot-tools probably wouldn't exist.
- [Digichain by brian3kb](https://github.com/brian3kb/digichain)
- [OctaChainer by KaiDrange](https://github.com/KaiDrange/OctaChainer)
A special shout out to [OctaEdit by Rusty](http://www.octaedit.com) (no longer available)
which showed the community what it was possible to do.
Hopefully there are lots of moonbeams and bunny rabbits wherever you are.
Other rust based credits:
- the [serde](https://serde.rs) framework made reverse engineering data files a lot easier,
`ot-tools-io` probably wouldn't exist without serde.
- same with [bincode](https://github.com/bincode-org/bincode) for reading the binary data