An .akp is a keygroup program for the Akai S5000/S6000 samplers — the map that tells the sampler which sample to play for each key and velocity. It is a RIFF file (form type APRG) of little-endian IFF chunks: a prg header, then out, tune, lfo, mods, and one kgrp per keygroup. Each kgrp is itself nested IFF — kloc (key range), three env, a filt, and up to four zone chunks, each naming the sample it plays. The audio itself lives in sibling .wav files, so the program holds references, not samples. The tabs open each structure, drawn byte by byte from a real S6000 program. Hover a field to light its bytes, click a field with a + for its table. Color marks kind (see the key).
The Akai program is pure mapping: it carries no audio, only the rules that turn a MIDI note into a sample. The file is a RIFF of form type APRG, and the interesting part is that it nests — the top level lists program-wide chunks (prg, out, tune, lfo, mods), and then a kgrp chunk per keygroup that contains its own chunk stream (kloc, env, filt, zone). Each zone names an external .wav. The program below is a real S6000 acoustic-guitar patch.
.akp layout..akp (RIFF/APRG), samples as .wav, and multis as .akm. A three-file split: mapping, audio, and arrangement..akp to migrate S-series libraries into soft samplers.kgrp chunk's payload is itself a stream of IFF chunks (kloc, env, filt, zone). A reader walks the outer chunks, then re-enters each kgrp to walk its inner ones — the same IFF reader, recursed one level.0x00000000 for the RIFF size field rather than the real body length — a firmware quirk. A strict RIFF reader that trusts the size reads nothing; the real bound is the file length, so the chunks are walked regardless.zone stores a sample name, not audio — the S6000 loads the matching .wav from the same volume. So the zones are references: they name the samples a program needs, and a missing sibling .wav is a broken program, not a broken file.The file opens like any RIFF — a RIFF magic, a size, a form type — but the form type is APRG (Akai program) and the size field is left zero. The first chunk, prg, is the program header: its bytes carry the MIDI program number and the declared keygroup count, which should match the number of kgrp chunks the file actually holds. Both maps are from a real S6000 program.
Hover riff_size — zero, not the body length.
The program header. Hover keygroups — declared 9, matching the 9 kgrp chunks.
riff_size is 0, the walk is sized from the actual file length and chunks are read until they run out — the same degrade-gracefully rule a stale RIFF size calls for in WAV. Every Akai program does this, so it is expected, not an error.prg body's third byte is the keygroup count (9 here). It should equal the number of kgrp chunks present; a mismatch marks a truncated or hand-edited program. The second byte is the MIDI program number the sampler assigns.A kgrp chunk is one keygroup, and its payload is a whole IFF stream of its own. The first inner chunk is kloc — the key location: the low and high MIDI notes this keygroup answers to. After it come three env (amplitude/filter/aux envelopes), a filt, and the zone chunks. The map is the start of a real kgrp, showing its first inner chunk, kloc.
Hover low_key / high_key — this keygroup covers MIDI notes 88-127.
kloc sets the window (low..high MIDI note); the four zone chunks that follow are the velocity layers within it. A program spreads keygroups across the keyboard, each a slice of the range — nine of them here, covering the guitar top to bottom.kgrp body is re-entered with the same chunk iterator used at the top level — recursion, not a second parser.A zone is one velocity layer of a keygroup, and its most important content is a sample name: the .wav the sampler plays when a key in this group is struck in this zone's velocity band. The name is stored length-prefixed — a flag byte, a length, then the ASCII — followed by the zone's tuning and level parameters. Up to four zones stack per keygroup; unused ones carry an empty name. The map is a real zone naming "12 STRING G5".
Hover sample_name — the external .wav this zone references.
[flag][length][bytes] — byte 1 is the name length, and exactly that many ASCII bytes follow. A length of 0 means an empty zone (no sample for that velocity band), so only a non-zero length names a real reference..wavs you need alongside the .akp for it to make sound.