Metadata-Version: 2.1
Name: xkey
Version: 0.1.0
Summary: Novation SysEx utilities.
Author-email: Peter Adkins <peter@sunkenlab.com>
License: AGPL-3.0
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: tests
Requires-Dist: black ; extra == 'tests'
Requires-Dist: coverage ; extra == 'tests'
Requires-Dist: ruff ; extra == 'tests'
Requires-Dist: types-setuptools ; extra == 'tests'
Requires-Dist: isort ; extra == 'tests'
Requires-Dist: mypy ; extra == 'tests'
Requires-Dist: pip-tools ; extra == 'tests'
Requires-Dist: mock ; extra == 'tests'
Requires-Dist: pytest ; extra == 'tests'
Requires-Dist: pytest-cov ; extra == 'tests'
Requires-Dist: responses ; extra == 'tests'
Requires-Dist: tox ; extra == 'tests'
Requires-Dist: sphinx ; extra == 'tests'
Requires-Dist: furo ; extra == 'tests'

### xKey

xKey provides a set of Novation SysEx utilities. It was intended to allow easy encoding
and decoding of SysEx firmware updates from Novation.

Although this project was designed to support FLKey and Launchkey devices, others
Novation firmware updates may be compatible with these utilities. However only software
for these devices has been tested so far.

This project was generated by reverse engineering the software update process used by
Novation FLKey MIDI keyboards. As a result of this, the exact use and terminology used
by Novation may differ from that reflected in this project.

> :warning: **Tampering with firmware updates may break your device!**
>
> Firmware updates encoded and decoded using this utility may result in an unusable and
> unrecoverable device. This tool is provided with no warranty or guarantees.

### Installation

xKey can be installed directly from PyPi. xKey currently has no external runtime
dependencies as it only utilises functions exposed by the Python standard library.

```shell
pip install xkey
```

### Example Usage

**Decode an input SysEx format firmware update into binary**

```
$ xkey decode launchkeymk3-firmware-217.syx 
2023-04-22 17:50:58,705 - [INFO] Reading SysEx from launchkeymk3-firmware-217.syx
2023-04-22 17:50:58,712 - [INFO] SysEx file appears to be for Novation launchkey-mk3
2023-04-22 17:50:58,712 - [INFO] SysEx file appears to contain build 000217
2023-04-22 17:50:58,712 - [INFO] Encoded file size 96788-bytes (CRC32 0x49ca849c)
2023-04-22 17:50:58,821 - [INFO] Writing decoded SysEx to launchkeymk3-firmware-217.syx.bin
```

**Encode an input binary format firmware update into SysEx**

```
$ xkey encode launchkeymk3-firmware-217.syx.bin --model launchkey-mk3 --build 217
2023-04-22 17:52:07,454 - [INFO] Starting encoding of SysEx for launchkey-mk3, build 000217
2023-04-22 17:52:07,454 - [INFO] Reading binary from launchkeymk3-firmware-217.syx.bin
2023-04-22 17:52:07,613 - [INFO] Input binary file size 96788-bytes (CRC32 0x49ca849c)
2023-04-22 17:52:07,613 - [INFO] Writing encoded SysEx to launchkeymk3-firmware-217.syx.bin.syx
```
