ORIX DJ
Mix the Music. Program the Experience.
A native macOS DJ application with its own real-time audio engine, four decks, Metal waveforms, real DSP effects,
and ORIX Script: a small deterministic language that programs a mix in beats and bars.
Local files only. No account. Mixing works with the network unplugged.
The badges are local SVG files written by
Scripts/badges.pyfrom the measured reports indocs/reports/. Every number in this README was measured on this code base; section 31 says how, and section 36 says what was not verified. Every screenshot was captured from the running application byScripts/screenshots.sh.
Contents
- Overview · 2. ORIX Philosophy · 3. Application Preview ·
- Decks · 5. Waveforms · 6. Beat Grid, Tempo and Key ·
- Sync, Time Stretch and Key Lock · 8. Mixer ·
- Effects · 10. Cues, Loops and Pads · 11. Library ·
- Auto DJ · 13. Recording and Export · 14. MIDI ·
- ORIX Script · 16. Compiler and Runtime ·
- Automation Studio · 18. Simulator and Debugger ·
- Presets and Visual Builder · 20. Docs Tab ·
- Claude Studio · 22. Performance Mode · 23. Projects ·
- Architecture · 25. Audio Engine · 26. Technology Stack ·
- Repository Layout · 28. Installation ·
- Build Instructions · 30. Testing · 31. Measurements ·
- Privacy and Security · 33. Accessibility ·
- Localization · 35. Release Status ·
- Known Limitations · 37. ORIX Ecosystem, Author, License
1. Overview
ORIX DJ is a DJ application written for the Mac, not ported to it. The audio engine, the time stretcher, the effects, the track analysis, the waveform renderer and the automation language are first-party Swift; the only frameworks are Apple's (Core Audio, AVFoundation, Accelerate, Metal, Core MIDI, SQLite).
What sets it apart is ORIX Script. A transition, a build-up or a whole routine is a short text file, timed in beats and bars, checked by a compiler before it can touch the mix, and executed with sample-accurate scheduling. The same script runs identically in the simulator and on the live engine.
| Decks | 2 or 4, each with varispeed, key lock, key shift, sync, quantize, slip-free loops, 8 hot cues |
| Engine | own Core Audio render graph, no allocation and no lock on the audio thread |
| Effects | 18 real DSP effects, three slots per deck plus a master rack |
| Analysis | tempo and beat grid, musical key, BS.1770 loudness, three-band waveform |
| Automation | ORIX Script: compiler, runtime, scheduler, simulator, debugger, 24 presets, visual builder |
| Assistant | Claude Studio, with the user's own Anthropic API key, optional |
| Formats | whatever AVFoundation decodes: MP3, AAC, ALAC, FLAC, WAV, AIFF |
| Size | 22 MB application, 7.4 MB disk image |
2. ORIX Philosophy
- Native. One Mac application, Swift 6, SwiftUI and AppKit, Metal for the waveforms.
- Local first. The music is the user's files. There is no account, no telemetry, no streaming service.
- Honest. The application displays only values it measures. The documentation states what was verified and what was not.
- Deterministic automation. A script does the same thing every time. There is no AI in Auto DJ and none in the execution of a script.
- AI as an option, not a dependency. Claude Studio writes and explains scripts when the user provides a key; everything else works without it.
3. Application Preview
| Studio, light | Four decks |
|---|---|
![]() |
![]() |
| Automation Studio | Performance mode |
|---|---|
![]() |
![]() |
4. Decks
Each deck loads a track fully decoded to 32-bit float in memory (limit: 150 minutes per track), so seeking, loops and scrubbing never wait for the disk.
- Play, pause, cue (set and return), scrub on the waveform, seek on the overview.
- Tempo fader (±8 %), tempo reset.
- Key lock and key shift in semitones.
- Sync to the master deck (tempo and phase), quantize to the beat.
- Reverse and brake.
- Two displays: horizontal waveform or vinyl.

5. Waveforms
The scrolling waveform is one full-screen Metal fragment pass over a summary texture (150 columns per second of audio, low, mid and high bands in separate colours). It shows the beat grid, the cue point, hot cues and the active loop, and zooms from 1 to 32 seconds. The overview shows the whole track, the played part and the markers.

6. Beat Grid, Tempo and Key
Analysis runs when a track is imported and is stored in the library.
| Property | Method |
|---|---|
| Tempo and first beat | spectral-flux onset envelope, autocorrelation, phase search; search range 78 to 156 BPM |
| Key | chromagram correlated with the Krumhansl-Kessler profiles; shown in musical and Camelot notation |
| Loudness | integrated loudness after ITU-R BS.1770, used for optional gain matching |
| Waveform | three-band summary, 150 columns per second |
The beat grid has a constant tempo. Tracks whose tempo drifts (live drums, old recordings) get a grid that is right on average only, and the grid cannot be edited by hand in this version. Measured accuracy is in section 31.
7. Sync, Time Stretch and Key Lock
- Varispeed uses Catmull-Rom interpolation.
- Key lock uses a first-party WSOLA time stretcher (2048-sample frames, coarse-to-fine similarity search).
- Sync matches the tempo of the master deck and bends the phase until the beats line up; with quantize on, a deck that starts is placed on the master grid.
- Starts from silence are sample-exact; seeks, pauses and loop wraps are de-clicked over 4 ms.
8. Mixer
Per channel: trim, three-band EQ with full kill, a bipolar filter knob (low-pass to the left, high-pass to the right), fader, cue button, level meter. Master: crossfader with a selectable curve, master level, a look-ahead limiter with a gain-reduction meter that shows the real reduction, cue mix and cue level.
Cue (headphone) routing needs an output device with at least four channels; with a stereo device the cue bus is not audible.
9. Effects
Eighteen effects, each with its own DSP, tempo-synced where it makes sense, with a 12 ms fade on enable and disable.
| Family | Effects |
|---|---|
| Space | reverb, delay, echo |
| Modulation | flanger, phaser, chorus, tremolo, auto-pan |
| Filter | high-pass, low-pass, band-pass |
| Dynamics | gate, compressor, limiter |
| Distortion | distortion, bitcrusher |
| Rhythm and generator | beat repeat, noise |

10. Cues, Loops and Pads
Eight hot cues per deck, a main cue, beat loops from a quarter beat to 16 beats on screen (any length from a script) with halve and double, manual loop in and out, and beat jumps.
11. Library
A local SQLite database. Tracks are referenced where they are, never copied or uploaded.
- Import of files and folders, background analysis, missing-file detection.
- Columns for title, artist, album, genre, BPM, key, duration, rating, play count, date added.
- Search, sort, crates, playlists, smart crates (rule-based), history.
- Drag a track to a deck, or load with the keyboard.

12. Auto DJ
Auto DJ plays a queue and mixes from one track to the next. It is deterministic: it chooses the next track by tempo distance and harmonic compatibility (Camelot), chooses the transition from the tracks' properties, and writes the transition as an ORIX Script that can be read, edited and reused. There is no AI in it.

13. Recording and Export
Recording starts only when the user presses record, and a red indicator stays visible for as long as it runs. The master bus is tapped on the audio thread into a lock-free ring and written by a separate thread. Takes can be exported to WAV, AIFF, ALAC, AAC or FLAC.

14. MIDI
Core MIDI input and output, hot-plug, MIDI learn (touch a control on screen, move a control on the hardware),
mapping profiles, soft takeover, and sixteen automation triggers that a mapping can fire for scripts
(on trigger(1) { … }).
No controller was tested: the MIDI code is verified against virtual Core MIDI endpoints only, and ORIX DJ ships no ready-made mapping for any commercial controller.

15. ORIX Script
ORIX Script is a small language made for one job: moving the controls of a DJ rig in musical time. Files have the
extension .orixdj.
automation "Build And Drop Swap" quantize bar {
if not deck.B.loaded or deck.B.playing {
print("Deck B must be loaded, paused and cued on its drop.")
stop
}
deck.B.sync(true)
deck.B.volume = 0dB
fx.noise.level = -60dB
fx.noise.cutoff = 500Hz
fx.noise.enable()
// Scheduled first, so that they overlap the ramp below.
at bar 7 { deck.A.loop(1 beat) }
at bar 8 { deck.A.loopHalve() }
at beat 31 { deck.A.loopHalve() }
at beat 32 { deck.A.volume = -60dB }
over 8 bars curve exp {
deck.A.filter.highpass -> 1200Hz
fx.noise.level -> -12dB
fx.noise.cutoff -> 10kHz
}
deck.B.play()
fx.noise.disable()
deck.A.pause()
deck.A.loopExit()
deck.A.filter.highpass = 20Hz
deck.A.volume = 0dB
}- Typed values with units:
0dB,1200Hz,250ms,50%,1 beat,8 bars. Mixing up units is a compile error. - Musical time:
wait,at bar,at beat,over … { target -> value }with linear, ease-in, ease-out, smooth and exponential curves,every,quantize. - Structure: variables, conditions, bounded loops, functions, events (
on deck.A.trackEnd,on bar,on trigger(1)). - Deterministic and bounded: no file access, no network, no unbounded loop, no recursion, an instruction budget per tick, a declared list of the controls a script may touch.
16. Compiler and Runtime
flowchart LR
S[".orixdj source"] --> L[Lexer] --> P[Parser] --> A[AST]
A --> C["Compiler<br/>types, units, ranges,<br/>capabilities, loop bounds"]
C -->|diagnostics| E[Editor]
C --> PL[Program plan]
PL --> VM["Runtime<br/>cooperative tasks in beat time"]
VM --> H["Automation host<br/>4 ms scheduler thread,<br/>30 ms look-ahead"]
VM --> SIM["Simulator and debugger<br/>same runtime, simulated rig"]
H -->|timestamped events| Q[Lock-free control queue]
Q --> R["Render thread<br/>events applied on the exact sample"]
No script code runs on the audio thread. The scheduler thread runs the script slightly ahead of time and sends timestamped parameter changes; the render thread splits its buffer at each timestamp and applies the change on the exact sample.
17. Automation Studio
A native editor for ORIX Script: syntax colouring, completion generated from the language schema, problems as you type with a position and a suggested fix, a formatter, version history for every script, and a console that accepts single statements against the live rig.
| Editor with problems | Console |
|---|---|
![]() |
![]() |
Running a script while music is playing asks for confirmation first.
18. Simulator and Debugger
The simulator runs a script on a simulated rig, faster than real time, and draws what it would do: every parameter change on a timeline in bars. The debugger adds breakpoints, stepping, and inspection of variables and tasks. Both use the same runtime as the live engine.
| Simulator | Debugger |
|---|---|
![]() |
![]() |
19. Presets and Visual Builder
Twenty-four presets, each a readable script: Eight Bar Transition, Bass Swap, Harmonic Transition, Smooth Crossfade, Quick Cut, Filter Sweep, Low-Pass Dive, Echo Out, Dub Echo Throw, Reverb Wash, Beat Repeat, Gate Pattern, Progressive Build-up, Snare Roll Build, Drop Preparation, Tape Stop Drop, Loop Roll, Loop and Hold, Auto DJ Blend, Play Next on Track End, Stutter Cut, Ping-Pong Delay Ride, Four Deck Layering, Beat Counter.
The visual builder assembles a script from blocks and shows the generated source beside it.
| Presets | Visual builder |
|---|---|
![]() |
![]() |
20. Docs Tab
The whole manual is inside the application and works offline: 29 chapters, 14 worked examples, full-text search, and a Run button on every example. The reference chapters are generated from the same schema the compiler uses, so they cannot drift from the language. A test compiles and simulates all 150 code examples of the documentation and checks that the 59 examples of errors really produce the stated error.

The same text is in docs/orix-script/.
21. Claude Studio
Claude Studio is an optional assistant for ORIX Script: generate a script from a description, explain one, fix compile errors, or convert a description of a routine. It needs the user's own Anthropic API key.
- The key is stored in the macOS Keychain, nowhere else. It is not written to preferences, projects, logs or screenshots.
- Requests go directly from the Mac to
api.anthropic.comover HTTPS. There is no ORIX server in between. - What is sent: the request, the language reference, and the script being worked on. Audio is never sent. Track titles are not sent unless the user ticks the option.
- Generated code is compiled, shown with its diagnostics, and placed in the editor. It is never run automatically.
| No key configured | A generation (debug stub, see below) |
|---|---|
![]() |
![]() |
The right-hand screenshot was made with the debug build's local stub, which replays a canned response. No request to the real Anthropic API was made during development (no key was available), so the live path is verified against the stub and by unit tests of the request and stream parsing only.
22. Performance Mode
A full-window layout for playing: large waveforms, transport, pads, and the running automations, with everything else hidden.

23. Projects
A project (.orixdjproject, a package with a JSON document) stores the deck contents, mixer and effect settings,
output routing, scripts, the MIDI profile and the Auto DJ queue. Projects are autosaved. Tracks are referenced, not
embedded. Loops are not restored when a project is reopened.
24. Architecture
flowchart TB
subgraph App["ORIX DJ.app (SwiftUI + AppKit)"]
UI["Studio · Library · Automation Studio · Docs · Claude Studio · Settings"]
MW[Metal waveform renderer]
AM["AppModel (@Observable, main actor)"]
end
subgraph Core["ORIXDJCore (Swift package)"]
ENG["ORIXDJEngine<br/>DJEngine, RenderCore, DeckVoice,<br/>AutomationHost, Recorder, AutoDJ, Session"]
SCR["ORIXScript<br/>lexer, parser, compiler, runtime, simulator"]
DSP["ORIXDSP<br/>18 effects, filters, limiter"]
ANA["ORIXAnalysis<br/>tempo, key, loudness, waveform"]
LIB["ORIXLibrary<br/>SQLite store, import"]
MIDI["ORIXMIDI<br/>Core MIDI, mappings"]
end
UI --> AM --> ENG
MW --> ENG
ENG --> DSP
ENG --> SCR
ENG --> ANA
AM --> LIB
AM --> MIDI
MIDI --> ENG
ENG --> CA[(Core Audio output unit)]
AM -. "HTTPS, user's key, optional" .-> ANT[(api.anthropic.com)]
One address space of parameters (deck.A.volume, mixer.crossfader, fx.master.1.mix, …) is shared by the user
interface, MIDI mappings and scripts, so the three can never disagree about what a control is.
Details: docs/architecture/overview.md.
25. Audio Engine
sequenceDiagram
participant UI as UI / MIDI / Script scheduler
participant Q as SPSC control queue
participant RT as Render thread (Core Audio)
participant SN as Snapshots (seqlock)
UI->>Q: timestamped event (no lock)
RT->>Q: drain events due in this buffer
RT->>RT: split buffer at event times (blocks of at most 64 frames)
RT->>RT: decks → stretch → EQ, filter → deck effects → mix → master effects → limiter
RT->>SN: positions, levels, load
SN-->>UI: read at display rate
Rules of the render thread: no allocation, no lock, no Objective-C message, no file access, no script code. Documents: audio engine, deck engine, DSP, mixer, automation, analysis, waveform, recording, persistence, AI integration.
26. Technology Stack
| Layer | Technology |
|---|---|
| Language | Swift 6, strict concurrency checking |
| Interface | SwiftUI, AppKit where needed (text editor, tables, menus) |
| Audio | Core Audio output unit (AUHAL), AVFoundation for decoding and encoding, Accelerate |
| Graphics | Metal (waveforms), SwiftUI Canvas (overview, meters) |
| MIDI | Core MIDI |
| Storage | SQLite (library), JSON packages (projects), Keychain (API key) |
| AI | Anthropic Messages API over HTTPS with streaming; no SDK, no third-party code |
| Build | Swift Package Manager, XcodeGen, shell scripts |
| Third-party dependencies | none in the application |
27. Repository Layout
App/ the application: sources, resources, localization
Packages/ORIXDJCore the engine, DSP, analysis, library, MIDI and ORIX Script, with their tests
UITests/ XCUITest scenarios
Scripts/ build, test, screenshots, signing, notarization, packaging, hygiene check
docs/ architecture, design, development, release, research, reports, ORIX Script manual
design/ icon sources
RELEASE-REPORT.md what was built, measured, verified and left open for 1.0.0Size: 17,392 lines of core sources, 6,122 lines of core tests, 15,966 lines of application sources.
28. Installation
- Download
ORIX-DJ-1.0.0.dmg(checksums), open it and drag ORIX DJ to Applications. - Open it. Add a folder of music in the Library.
- Optional: Settings → AI, to enter an Anthropic API key for Claude Studio.
Requirements: a Mac with Apple Silicon, macOS 15 or later. No music ships with the application; the demo tracks
used for the screenshots are synthesized by the application when it is launched with -ORIXDemo YES.
29. Build Instructions
Requirements: Xcode 26 or later, XcodeGen.
Scripts/build.sh generate # write the Xcode project from project.yml
Scripts/build.sh debug # debug build
Scripts/build.sh app # release build
Scripts/build.sh core-test # the 241 core tests
Scripts/build.sh uitest # the 9 UI scenarios
Scripts/build.sh bench # build the measurement tool
Scripts/check.sh # repository hygiene (headers, no credentials, no audio, network scope)Signing, notarization and packaging are described in docs/release/ and need the
owner's Developer ID certificate and notary profile; neither is in the repository. Setup:
docs/development/setup.md.
30. Testing
| Suite | Result |
|---|---|
Core tests (swift test) |
241 tests in 44 suites, all passing |
| UI tests (XCUITest) | 9 scenarios, all passing |
| Documentation examples | 150 examples compile and simulate; 59 error examples produce the stated error |
| Presets | all 24 compile and run in the simulator |
Core line coverage, measured with llvm-cov (report):
| Module | Lines covered |
|---|---|
| ORIXAnalysis | 99.4 % |
| ORIXMIDI | 96.5 % |
| ORIXLibrary | 95.7 % |
| ORIXDSP | 94.9 % |
| ORIXScript | 94.0 % |
| ORIXDJEngine | 81.6 % |
| Total | 91.6 % |
The SwiftUI layer is not in that figure; it is exercised only by the 9 UI scenarios.
Test strategy: docs/development/testing.md.
31. Measurements
Measured on a MacBook Pro (Apple M5 Max), macOS 27.0, release build, 48 kHz, with other processes running. These
are measurements on one machine, not guarantees. Raw output:
engine-benchmark.txt, live-device.txt.
Render cost, offline (time to render one buffer, against the time the buffer lasts):
| Load | Buffer | Mean | p99 | Mean load |
|---|---|---|---|---|
| 2 decks, EQ and filter | 256 | 12.1 µs | 46.8 µs | 0.23 % |
| 4 decks, EQ and filter | 256 | 20.3 µs | 56.8 µs | 0.38 % |
| 4 decks, key lock, 14 effects, limiter | 256 | 70.5 µs | 149.3 µs | 1.32 % |
| 4 decks, key lock, 14 effects, limiter | 64 | 18.4 µs | 62.9 µs | 1.38 % |
On a real output device (Core Audio real-time thread, master at −60 dB, 20 s per run, same heavy load):
| Buffer | Callbacks | Mean | Max | Overloads | Timed automation commands | Late |
|---|---|---|---|---|---|---|
| 256 | 3,756 | 61.5 µs | 246.2 µs | 0 | 560 | 0 |
| 512 | 1,881 | 236.0 µs | 2,895.5 µs | 0 | 560 | 0 |
The device in that run was a Bluetooth headphone that reports 160 ms of its own latency; an earlier run on the built-in speakers reported 798 frames of device latency and 21.96 ms of output latency at 256 frames. The largest gap between two scheduler ticks was 4.12 ms for a nominal 4 ms.
Accuracy
| Property | Result |
|---|---|
| Phase error between two synced decks | mean 0.0066 ms, worst 0.021 ms |
| Start of a scripted, quantized deck against the grid | 0 samples |
| Pitch with key lock, rates 0.84 to 1.16 | within ±0.04 cents of 440 Hz |
| Stretch residual on a pure tone | 26 to 34 dB below the tone |
| Analysis of a 5-minute track | 0.35 s |
Real music. Sixty tracks from the author's own music library were analysed (table, no audio in the repository). For the twenty with a well-known tempo, the detected tempo is within ±1 BPM of the commonly published value; those reference values were recalled, not independently verified. Of eleven tracks with a commonly published key, six match exactly, two are the relative key and three are a fifth away. Two complete transitions were rendered offline between real tracks with the Bass Swap and Eight Bar Transition presets: no late command, no clipping. Nobody has listened to them yet.
32. Privacy and Security
- No account, no analytics, no crash reporting, no update check.
- The only network code in the application is the Anthropic client, used only when the user asks Claude Studio for
something.
Scripts/check.shfails the build if network code appears anywhere else. - The API key lives in the Keychain and is never logged.
- Hardened Runtime, no entitlement, no helper, no privileged operation.
- Scripts cannot read files, open connections or run code outside the language.
Report: docs/reports/security.md.
33. Accessibility
Controls carry a label, a value and, where it applies, adjustable actions; notices are announced to VoiceOver; state is paired with text or shape, not colour alone; a colour-blind-safe and a monochrome waveform palette are provided. Walking the accessibility tree in the UI tests found and fixed three classes of defects.
Gaps: Reduce Motion, Increase Contrast and Reduce Transparency are not read by the application (the waveform
keeps scrolling); breakpoints can be set only with the mouse; contrast ratios are computed from the colour
tokens, not measured on screen; nobody has used the application with VoiceOver.
Report: docs/reports/accessibility.md.
34. Localization
English and Canadian French (1,270 strings). The French was written with the application and has not been proofread by a second person.

35. Release Status
| Item | State |
|---|---|
| Version | 1.0.0 (build 1), arm64, macOS 15.0 or later |
| Signature | Developer ID Application, Hardened Runtime, no entitlement |
| Notarization, application | Accepted, submission eafc4e24-d278-4460-8cef-0d7827e2481e, stapled |
| Notarization, disk image | Accepted, submission 4c301728-4b75-4c88-b3b2-831d986bcbaa, stapled |
| Gatekeeper | accepted (spctl) |
| Install check | disk image opened and application launched on two other Macs (M4 Pro; M2 with 8 GB), macOS 26.5.1 |
ORIX-DJ-1.0.0.dmg |
7,383,880 bytes, SHA-256 ec9de1ab4f05c7f8ae7f5122202de6e9ee0ec8e92444e6f0b13941b984208ee2 |
ORIX-DJ-1.0.0.zip |
6,308,251 bytes, SHA-256 63026b4e44b86ea2a58a44e6e617e2def6746de5aee0b1c6851c27a221393873 |
| Publication | published on 2026-11-21 with the owner's approval: DMG, ZIP, checksums; the published files were downloaded back and their checksums and notarization verified |
Full account: RELEASE-REPORT.md.
36. Known Limitations
Not verified:
- Sound quality by ear. Everything about audio was measured, nothing was listened to: the stretcher, the 18 effects, the limiter and the two rendered mixes.
- MIDI hardware. Virtual endpoints only. No controller is claimed to be compatible.
- Multi-channel audio interfaces. Cue routing is verified offline only.
- The live Anthropic API. Stub and unit tests only.
- VoiceOver by a person; macOS 15 (built for it, run on 26 and 27 only); French proofreading.
- Long sessions. No continuous session of an hour or more was run.
- Many mouse interactions in the secondary screens are covered by neither a UI test nor a manual pass.
Not implemented:
- Audio Unit hosting, stems separation, streaming services, DVS (timecode vinyl), video, Intel Macs.
- Variable-tempo beat grids. Tempo detection outside 78 to 156 BPM is folded into that range.
- Loop state in saved projects. Metadata tags in exported files.
- Ready-made controller mappings.
37. ORIX Ecosystem, Author, License
ORIX DJ is part of the ORIX family of native applications (Sheet, Docs, Clean, Monitor, Calc, Scan, Audio, Camera, Secure, Arcade): orixlab.dev.
Author: Simon-Pierre Boucher · contact@spboucher.ai
Copyright © 2026 Simon-Pierre Boucher. All rights reserved. The source is published for reading; no licence to reuse it is granted.











