windows app · in development
Kontrol Harmonic Zenyth
four decks. one S3. written from scratch.
// what it is
KHZ is DJ software built for one controller, the Native Instruments Traktor Kontrol S3. It has its own mixing engine, its own track analysis and its own screen, and it reads every knob, button, fader and jog wheel on the S3 directly over USB.
Not a copy of Traktor. KHZ is independent software, written from nothing. It talks to the S3 through the same USB interface any DJ app can use: standard USB audio for sound, and raw HID reports for the controls and lights. It is not affiliated with Native Instruments.
- C++20
- CMake
- hidapi · USB HID
- miniaudio · decode, play, mix
- raylib · window and graphics
- Windows · MinGW-w64
// four decks, four colours
Each deck keeps its colour everywhere: on screen, on the S3's pads and deck lights, and on the jog ring of whichever deck is selected. The colours can be changed in the menu. By default the crossfader puts A and C on its left and B and D on its right. Holding Shift and pressing two deck buttons on the same side merges them into one channel, so up to six tracks can play at once.
// the pads in move and loop mode
moveloop
With both mode buttons off, the eight pads split down the middle. The left half moves through the track (Shift makes each jump four times longer). The right half controls the loop, from 1/64 of a beat up to 32 beats.
The other pad modes: Hotcue (eight per deck), Samples (mark a stretch of the track and the pad replays it over the deck) and Beat FX (one effect per pad).
// what works
Decks and mixing
- Four decks at 48 kHz, four channels out: main on 1–2, headphones on 3–4
- Gain, 3-band EQ, resonant filter and fader per channel
- Headphone cue before the fader, with a mix knob that blends in the main output
- Seven crossfader curves, from Transition (the default) to Fast Cut
- Tempo up to ±50 %, or ±100 % while Shift is held, through a clean 16-tap resampler
- Key lock (time-stretching that keeps the pitch), sync with a master deck, and live BPM per deck
- Scratching: touch the jog wheel and the track stops under your hand
- Master EQ and compressor, then a look-ahead brick-wall limiter
Loops and effects
- Loops from 1/64 to 32 beats, exact to the sample and snapped to the beat grid
- Loop shown on the waveform, flashing while it plays
- Eight beat effects per deck: flanger, phaser, gate, echo, reverb, crush, sweeping filter and beat roll
- At depth 0 an effect leaves the audio completely untouched
Track analysis
- Beat detection: within 0.005 BPM and about 2 ms per beat on synthetic test tracks
- Musical key in Camelot notation, with key colours around the wheel
- Three-band colour waveforms and a whole-track overview that flashes as the track nears its end
- Beatgrid editor with five draggable points, auditioned in the headphones only
- All of it runs in the background and is saved next to each track
Library and pads
- Import chosen folders, browse them as a tree, search, favourites and a queue
- Two browse cursors, one per side of the S3, that never get in each other's way
- BPM, key, grid and time columns, with titles and artists from each file's tags
- Eight hotcues and eight sample pads per deck, in colours you pick
// status — read this first
KHZ is in development and runs on one S3 on Windows. It isn't available to download or buy yet. Everything above is built, but not all of it has been tried on the controller yet:
| Checked how | What |
|---|---|
| on the S3 | KHZ finds the S3 and reads its controls live. The play buttons and the light colours on the pads and decks are confirmed on the hardware. |
| measured | Loops, beat detection, tempo, key lock, sync, the effects, deck merging and the master limiter are checked by built-in self-tests and against known answers. |
| not yet tried | Pressing the pads, the Grid, Queue and View buttons and the merge gestures on the S3 itself, and how scratching and sync feel on two real decks. |
The oldest open problem is an occasional audio glitch that hasn't been caught in the act yet. Logging runs on every session to find it.
// still to build
- Slip mode
- Playlists and crates
- Harmonic mixing help: compatible keys highlighted and sorting by key and BPM
- Recording a set to a file
- Remapping the S3's controls in settings
- A MIDI and arrangement view
// under the hood
The S3 is a class-compliant USB audio and HID device, so it needs no special driver for its controls. KHZ identifies it by vendor 0x17cc and product 0x1900 and asks for its state with GET_REPORT control transfers: on this unit, waiting for the controller to send reports returned nothing. Buttons arrive in report 0x01; knobs, faders and jog wheels in report 0x02. The controls were mapped press by press on the hardware, and no other app's code is used.