Skip to main content

akai-fire-handler

A clean, dependency-light Python library for the Akai Fire controller — full control of the 4×16 RGB pad grid, the 128×64 OLED, and all input (pads, the four endless knobs, the SELECT encoder, and every button) over MIDI.

It works on Linux, macOS, and Windows — anywhere mido + python-rtmidi run. No FL Studio required.

from akai_fire_handler import AkaiFire

fire = AkaiFire()                       # finds the Fire by its MIDI port name
fire.clear_pads()
fire.set_pad(0, 0, 127, 0, 0)           # top-left pad, red (r, g, b each 0–127)
fire.oled_text("AKAI FIRE", "hello")

fire.on_pad = lambda row, col, vel: fire.set_pad(row, col, 0, 127, 0)
fire.on_button = lambda name: print("button:", name)
fire.run()                              # blocking input loop (Ctrl-C to stop)

Install

From GitHub (works today, any OS):

pip install git+https://github.com/jamisonx-dev/akai-fire-handler.git

or from a clone:

pip install .

Dependencies: mido, python-rtmidi (MIDI I/O), and Pillow (OLED text rendering) — all installed automatically.

A PyPI release (pip install akai-fire-handler) is planned but not yet published — use the GitHub install above for now.

Why this exists

The Akai Fire is a lovely, cheap grid controller, but its protocol is undocumented by Akai and it's normally locked to FL Studio. The pieces have been reverse-engineered before (the OLED remap especially — see credits), but there was no single, tested Python library that does the whole job: OLED rendering and RGB pads and input and the threading that keeps it usable in a real application.

This library is extracted from a headless music instrument that has driven a physical Fire in daily use for months. The wire protocol in akai_fire_handler/protocol.py is verified byte-for-byte against that instrument's proven code (8192/8192 OLED pixels, the pad-LED SysEx over hundreds of random inputs, and every input constant — see tests/).

API

Output

Method Does
set_pad(row, col, r, g, b) light one pad (r/g/b 0–127)
set_pad_index(i, r, g, b) light pad i (0–63)
set_pads(cells) light many at once; cells are (row,col,r,g,b) or (index,r,g,b)
clear_pads() all pads off
oled(draws) update the OLED (coalesced, ~25 fps, GIL-friendly)
oled_now(draws) update the OLED synchronously
oled_text(*lines, scale=1) convenience: draw stacked left-aligned lines

draws is a list of (text, x, y, scale). Scale 1 = small, 2 = bold 14px, 3 = 20px, 4 = 36px.

Input (assign any; all optional)

on_pad(row, col, velocity)     on_pad_release(row, col)
on_button(name)                on_button_release(name)
on_dial(knob_index, delta)     on_dial_touch(knob_index)
on_select(delta)               on_select_press()
on_mute(row)

Button names: STEP NOTE DRUM PERFORM SHIFT ALT PAT_SONG PLAY STOP REC PATTERN_UP PATTERN_DOWN BROWSER GRID_LEFT GRID_RIGHT MODE MUTE1..4.

Knob deltas are signed (turn left = negative). Drive input with run() (blocking), start() (background thread), or poll() (from your own loop).

Low-level

akai_fire_handler.protocol is pure — no MIDI, no Pillow, just constants and the SysEx byte builders (pad_leds_sysex, oled_buffer_to_sysex, plot, classify_note, classify_cc, decode_relative, …). Use it if you want to talk to the Fire through your own MIDI stack.

Examples

Tests

The protocol core is proven with no hardware attached:

python -m pytest        # or: python tests/test_protocol.py

Credits

The 128×64 OLED pixel remap is the reverse-engineering published by SEGGER in "Decoding the Akai Fire" (part 3). Everything else (pad-LED SysEx, the full input map, the rendering/coalescing and high-level API) was captured and built for a real instrument.

License

MIT — see LICENSE. "Akai" and "Fire" are trademarks of inMusic / Akai Professional; this project is an independent, unofficial tool, not affiliated with or endorsed by them. The device name is used only to describe what the library talks to.

Metadata

Release files for akai-fire-handler 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akai-fire-handler 0.1.0
File Size Uploaded Provenance Actions
akai_fire_handler-0.1.0.tar.gz 17.8 kB With provenance Details for akai_fire_handler-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for akai-fire-handler 0.1.0
File Interpreter ABI Platform Actions
akai_fire_handler-0.1.0-py3-none-any.whl Python 3 none any Details for akai_fire_handler-0.1.0-py3-none-any.whl

Total release size: 33.3 kB

Release files / akai_fire_handler-0.1.0.tar.gz

Download URL akai_fire_handler-0.1.0.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
30644a10c67257da872a7906e655b5370c76b241a7c612af7bc871694f245dde
BLAKE2b-256 checksum
How to use checksums
534693feb0c15573bd06b54b15c8467e4e77f38069b45a080065535185b50c7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / akai_fire_handler-0.1.0-py3-none-any.whl

Download URL akai_fire_handler-0.1.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6b6d0c441ce36e2502ed65650274ebe9ac3034d6eacf475df2652efbf47b27f
BLAKE2b-256 checksum
How to use checksums
99e893ea0bec023a41a2056434e46de1987510716cf3d12d1f3b4a594579cc8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Security for akai-fire-handler 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for akai_fire_handler-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page