mixi-cut 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,41 @@
1
+ # WAV files in root (generated output)
2
+ /*.wav
3
+
4
+ # Keep wav/ folder tracked (distributed files)
5
+ !wav/
6
+ !wav/*.wav
7
+
8
+ PLAN.md
9
+ BENCHMARK_REPORT.pdf
10
+ PROTOCOL.pdf
11
+ /.vitepress/
12
+
13
+ __pycache__/
14
+ *.pyc
15
+ .DS_Store
16
+ *.egg-info/
17
+ dist/
18
+ build/
19
+ .venv/
20
+ venv/
21
+ .pytest_cache/
22
+ htmlcov/
23
+ .coverage
24
+ .ruff_cache/
25
+
26
+ # C decoder build artifacts
27
+ decoder_c/build/
28
+ decoder_c/build_test
29
+ decoder_c/*.o
30
+
31
+ # Rust build artifacts
32
+ decoder_rust/target/
33
+ decoder_rust/Cargo.lock
34
+
35
+ # Node / VitePress
36
+ node_modules/
37
+ docs/.vitepress/cache/
38
+ docs/.vitepress/dist/
39
+
40
+ # Workspace settings
41
+ .claude/
@@ -0,0 +1,148 @@
1
+ # Changelog
2
+
3
+ All notable changes to MIXI-CUT will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/).
7
+
8
+ ## [0.3.3] - 2026-12-01
9
+
10
+ First version published on PyPI. The generator, the verifier and the decoders are those of 0.3.2.
11
+
12
+ ### Changed
13
+ - **The source distribution holds the package, its tests and its documents**: 0.3.2 also packed
14
+ an 11 MB test WAV, the documentation site and the CI configuration.
15
+ - **README links are absolute**, so they also work on PyPI.
16
+ - **Python 3.9 is tested in CI**: it was declared as supported and not tested.
17
+
18
+ ### Security
19
+ - **The release workflow runs each action at a fixed commit**, checks that the tag is the version
20
+ of the package, and only the job that publishes can request a PyPI token.
21
+
22
+ ## [0.3.2] - 2026-04-23
23
+
24
+ ### Fixed
25
+ - **Multi-rate encoder off-grid**: inner-groove frame interval (>300s) was
26
+ `cycles_per_frame // 2 = 2125`, not a multiple of the 50-cycle bit
27
+ lattice, so inner-groove bits landed 25 cycles out of phase with the
28
+ outer-groove grid. Now snapped to the lattice (2100 cycles). Guarantees
29
+ every bit sits on the same 50-cycle grid regardless of which frame
30
+ wrote it — prerequisite for any future audio-side frame decoder.
31
+ - **Version strings synchronized across packages**: `src/mixi_cut`,
32
+ `pyproject.toml`, `decoder_rust/Cargo.toml` all at 0.3.2; the Rust
33
+ crate was stuck at 0.2.0.
34
+ - **Hardcoded "v0.3.0" removed from generator**: `generator.py` now
35
+ prints the `__version__` value. Tests read the version from the
36
+ package instead of asserting a literal.
37
+
38
+ ### Documentation
39
+ - `docs/DECODER_GUIDE.md` and `docs/guide/decoder.md` Position Decoding
40
+ section rewritten: now documents the v0.3 85-bit frame (Barker-13 +
41
+ 24-bit position + CRC-16 + RS(4)) instead of the stale v0.2 56-bit
42
+ layout. Added an explicit status note that the current reference
43
+ decoders expose `position = ∫freq/freq` (a cumulative timer), not
44
+ audio-side frame acquisition.
45
+ - `gf256.crc16` docstring no longer claims "CRC-16/ARC (USB)" — the
46
+ MIXI-CUT configuration (poly=0x8005, init=0xFFFF, non-reflected)
47
+ shares ARC's polynomial but is a project-specific CRC, not a named
48
+ standard variant. Interop goal is encoder↔decoder only.
49
+ - `docs/.../decoder.md` brake-detection section flagged as describing
50
+ the v0.2 linear ramp still used by the C and Rust ports; v0.3.1
51
+ 3-regime state machine is Python-only.
52
+
53
+ ### Known limitations (unchanged, documented more honestly)
54
+ - C and Rust decoders remain at v0.2 feature level: single PLL (no
55
+ dual-PLL handoff), linear brake ramp (no 3-regime state machine).
56
+ - No shipping decoder performs Barker/CRC/RS frame acquisition from
57
+ audio; position is always the cumulative PLL frequency integral.
58
+ Bit-level round-trip is covered by `decode_position_bits` and its
59
+ tests. Audio-side frame decoding is a future (minor-release) item.
60
+
61
+ ## [0.3.1] - 2026-04-15
62
+
63
+ ### Fixed
64
+ - **Vinyl brake settle**: 488 ms --> <100 ms via 3-regime adaptive brake (DECEL/SNAP/RELEASE)
65
+ - **Speed range**: 2.0x --> 3.0x via dual-PLL with adaptive bandwidth handoff
66
+
67
+ ### Added
68
+ - **Dual-PLL decoder**: wide (20%) for acquisition + high-speed, narrow (8%) for precision
69
+ - **3-regime brake state machine**: exponential traction, near-zero snap bypass, gradual release
70
+ - **VitePress documentation**: 20-page Apple-style docs site for GitHub Pages
71
+ - **GitHub Pages deploy**: `.github/workflows/docs.yml` with VitePress build
72
+ - **Coverage tests**: 10 new coverage tests (generator, verifier, decoder edge cases)
73
+ - **CLI integration tests**: 11 tests covering all 5 subcommands
74
+ - **Brake tests**: 4 tests for regime transitions, snap-to-zero, settle timing
75
+ - **Speed tests**: 6 tests for 2x/3x/-2x tracking, dual-PLL handoff/fallback
76
+
77
+ ### Changed
78
+ - Protocol constants: 6 new PLL constants, 3 new brake constants
79
+ - Test count: 97 --> 133 (+36 tests)
80
+ - Core coverage: 78% --> 82% (99.7% excluding CLI)
81
+
82
+ ## [0.3.0] - 2026-04-15
83
+
84
+ ### Added
85
+ - **CRC-16 fast-reject**: 16-bit CRC parallel to Reed-Solomon for O(1) frame rejection
86
+ - **Barker-13 sync word**: 13-bit autocorrelation preamble for frame acquisition (<500ms lock)
87
+ - **Multi-rate encoding**: 2x frame density on inner groove (>300s) for better SNR
88
+ - **Velocity subcarrier**: 500 Hz AM-modulated channel for instantaneous speed (bypasses mass-spring latency)
89
+ - **DJ Guide**: complete setup, techniques, and troubleshooting guide (`docs/DJ_GUIDE.md`)
90
+ - **CRC-16 test suite**: 7 new tests for CRC compute/check/roundtrip
91
+ - **Sync word tests**: Barker-13 autocorrelation, sequence, frame prefix
92
+ - **Velocity subcarrier tests**: modulation at various speeds, 500 Hz spectral check
93
+ - **Multi-rate test**: inner groove density verification
94
+ - **v0.2 backward compatibility**: decoder accepts both 56-bit (v0.2) and 85-bit (v0.3) frames
95
+
96
+ ### Changed
97
+ - Protocol version: 0.2.0 → 0.3.0
98
+ - Frame format: 56 bits → 85 bits (13 sync + 24 pos + 16 CRC + 32 RS)
99
+ - Frame period: 0.933s → 1.417s (normal) / 0.708s (inner groove dense mode)
100
+ - Version strings normalized: all "v3" references → "v0.2" (now v0.3)
101
+
102
+ ### Fixed
103
+ - 28 ruff lint errors resolved (unused imports, variable names, formatting)
104
+ - CLI `--category` alias for `--test` in bench command
105
+ - `.gitignore` updated: BENCHMARK_REPORT.pdf, Cargo.lock
106
+
107
+ ## [0.2.0] - 2026-04-14
108
+
109
+ ### Added
110
+ - **Python package**: installable via `pip install mixi-cut`
111
+ - **Unified CLI**: `mixi-cut generate|verify|bench|decode|info`
112
+ - **Preset system**: `--preset dj-12inch|dj-7inch|test-cut|phono|locked-groove`
113
+ - **Reference decoder**: standalone Python decoder module (`mixi_cut.decoder`)
114
+ - **C decoder**: zero-alloc, C99, embeddable (~200 bytes per instance)
115
+ - **Rust decoder**: standalone crate with wasm feature flag (`mixi-decoder`)
116
+ - **JavaScript decoder**: pure JS port for Web Audio API
117
+ - **Web demo**: drag-and-drop WAV decoder (`docs/demo/`)
118
+ - **Position decoding**: `decode_position_bits()` for roundtrip verification
119
+ - **RS validation**: `rs_check()` for syndrome-based codeword validation
120
+ - **Test suite**: 99 tests across Python (77), C (13), Rust (9)
121
+ - **CI/CD**: GitHub Actions with Python 3.10-3.13 + C + Rust jobs
122
+ - **Release pipeline**: automated WAV generation + PyPI publish
123
+ - **Documentation**: Cutting Guide, Decoder Guide, Hardware Guide, Comparison
124
+ - **Community**: CODE_OF_CONDUCT, SECURITY, issue/PR templates
125
+ - **Makefile**: `make test|test-c|test-rust|test-all|bench|release-wavs`
126
+ - **Centralized protocol constants**: `mixi_cut.protocol` — single source of truth
127
+
128
+ ### Fixed
129
+ - **Vinyl brake settle time**: 488ms → 476ms (24ms tracking lag on 500ms ramp)
130
+ - **MassSpring brake detection**: aggressive traction ramp 0.5→0.9 with decel counter
131
+ - **Tonearm findings persistence**: MC results now included in benchmark JSON output
132
+
133
+ ### Changed
134
+ - Protocol version: 0.1.0 → 0.2.0
135
+ - Package structure: monolithic scripts → `src/mixi_cut/` package
136
+ - Backward compatible: `python generate.py` still works
137
+
138
+ ## [0.1.0] - 2026-04-09
139
+
140
+ ### Added
141
+ - Initial release
142
+ - 3 kHz stereo quadrature carrier
143
+ - 24-bit position encoding + Reed-Solomon RS(4)
144
+ - RIAA pre-emphasis (IIR, O(1) memory)
145
+ - Loop mode (phase-continuous locked groove)
146
+ - Benchmark suite with 14 categories + 1000 MC tonearm bounce
147
+ - PDF report generation
148
+ - v3 DJ resilience: PLL integral drain, adaptive stop, vinyl brake detection, dead zone
mixi_cut-0.3.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fabrizio Salmi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,321 @@
1
+ Metadata-Version: 2.5
2
+ Name: mixi-cut
3
+ Version: 0.3.3
4
+ Summary: Open-source DVS timecode generator for vinyl lathe cutting
5
+ Project-URL: Homepage, https://github.com/fabriziosalmi/mixi-cut
6
+ Project-URL: Documentation, https://github.com/fabriziosalmi/mixi-cut#readme
7
+ Project-URL: Repository, https://github.com/fabriziosalmi/mixi-cut
8
+ Project-URL: Issues, https://github.com/fabriziosalmi/mixi-cut/issues
9
+ Author: Fabrizio Salmi
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: dj,dvs,lathe-cut,timecode,turntable,vinyl
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: End Users/Desktop
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Multimedia :: Sound/Audio
24
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
25
+ Requires-Python: >=3.9
26
+ Requires-Dist: numpy>=1.24
27
+ Requires-Dist: soundfile>=0.12
28
+ Provides-Extra: all
29
+ Requires-Dist: fpdf2>=2.7; extra == 'all'
30
+ Requires-Dist: matplotlib>=3.7; extra == 'all'
31
+ Requires-Dist: pytest-cov>=4.0; extra == 'all'
32
+ Requires-Dist: pytest>=7.0; extra == 'all'
33
+ Requires-Dist: ruff>=0.4; extra == 'all'
34
+ Provides-Extra: bench
35
+ Requires-Dist: fpdf2>=2.7; extra == 'bench'
36
+ Requires-Dist: matplotlib>=3.7; extra == 'bench'
37
+ Provides-Extra: dev
38
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
39
+ Requires-Dist: pytest>=7.0; extra == 'dev'
40
+ Requires-Dist: ruff>=0.4; extra == 'dev'
41
+ Description-Content-Type: text/markdown
42
+
43
+ # MIXI-CUT
44
+
45
+ **Open-source DVS timecode protocol --- generate, decode, cut.**
46
+
47
+ [![CI](https://github.com/fabriziosalmi/mixi-cut/actions/workflows/ci.yml/badge.svg)](https://github.com/fabriziosalmi/mixi-cut/actions/workflows/ci.yml)
48
+ [![Docs](https://github.com/fabriziosalmi/mixi-cut/actions/workflows/docs.yml/badge.svg)](https://fabriziosalmi.github.io/mixi-cut/)
49
+ [![License: MIT](https://img.shields.io/badge/License-MIT-cyan.svg)](https://github.com/fabriziosalmi/mixi-cut/blob/main/LICENSE)
50
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org)
51
+
52
+ MIXI-CUT generates stereo timecode WAV files designed to be **cut onto vinyl with a lathe**. The signal uses **3 kHz stereo quadrature** (L = sin, R = cos) with absolute position encoding (Barker-13 sync + CRC-16 + Reed-Solomon). Reference decoders in **Python, C, Rust, and JavaScript**.
53
+
54
+ > *"The best timecode is the one you can cut yourself."* --- ~8 EUR per vinyl vs ~40 EUR commercial.
55
+
56
+ **[Documentation](https://fabriziosalmi.github.io/mixi-cut/)** | **[Protocol Spec](https://github.com/fabriziosalmi/mixi-cut/blob/main/PROTOCOL.md)** | **[Changelog](https://github.com/fabriziosalmi/mixi-cut/blob/main/CHANGELOG.md)**
57
+
58
+ ## Quick Start
59
+
60
+ ```bash
61
+ # Install (from source)
62
+ git clone https://github.com/fabriziosalmi/mixi-cut.git
63
+ cd mixi-cut
64
+ pip install -e .
65
+
66
+ # Generate a 15-minute DJ timecode
67
+ mixi-cut generate --preset dj-12inch --output side_a.wav
68
+
69
+ # Verify before cutting
70
+ mixi-cut verify side_a.wav --strict
71
+
72
+ # Decode (reference decoder)
73
+ mixi-cut decode side_a.wav
74
+ ```
75
+
76
+ ## Comparison
77
+
78
+ | Feature | Serato CV02.5 | Traktor MK2 | **MIXI-CUT v0.3** |
79
+ |---------|---------------|-------------|---------------------|
80
+ | Carrier | 1.0 kHz | 2.5 kHz | **3.0 kHz** |
81
+ | Encoding | Mono | Mono | **Stereo quadrature** |
82
+ | Scratch resolution | ~1.0 ms | ~0.4 ms | **~0.33 ms** |
83
+ | Error correction | Unknown | Unknown | **CRC-16 + RS(4)** |
84
+ | Sync word | Unknown | Unknown | **Barker-13** |
85
+ | Velocity channel | No | No | **500 Hz AM** |
86
+ | Speed range | Unknown | Unknown | **0.02x -- 3.0x** |
87
+ | Brake settle | Unknown | Unknown | **<100 ms** |
88
+ | Noise tolerance | Unknown | Unknown | **SNR = -24 dB** |
89
+ | Min ADC bits | 16-bit | 16-bit | **4-bit** |
90
+ | Decoder languages | 1 (proprietary) | 1 (proprietary) | **4 (open source)** |
91
+ | Vinyl cost | ~40 EUR | ~35 EUR | **~8 EUR** |
92
+ | License | Proprietary | Proprietary | **MIT** |
93
+
94
+ ## Features
95
+
96
+ - **Generate** timecode WAVs with presets for 7", 10", 12" vinyl at 33-1/3 or 45 RPM
97
+ - **Verify** WAV files before cutting (carrier, quadrature, position encoding)
98
+ - **Decode** with reference decoders in Python, C, Rust, JavaScript
99
+ - **Benchmark** with 14-category stress test suite (1000 Monte Carlo simulations)
100
+ - **Barker-13 sync** for frame acquisition in <500 ms
101
+ - **CRC-16 fast-reject** for O(1) corrupted frame detection
102
+ - **Dual-PLL decoder** with adaptive bandwidth handoff (narrow 8% + wide 20%)
103
+ - **3-regime brake** with exponential traction for <100 ms vinyl brake settle
104
+ - **Multi-rate encoding** with 2x density on inner groove
105
+ - **Velocity subcarrier** at 500 Hz for instant speed readout
106
+ - **RIAA pre-emphasis** for PHONO input compatibility
107
+ - **Loop mode** for phase-continuous locked-groove cutting
108
+
109
+ ## Installation
110
+
111
+ ```bash
112
+ git clone https://github.com/fabriziosalmi/mixi-cut.git
113
+ cd mixi-cut
114
+ pip install -e ".[all]"
115
+ ```
116
+
117
+ ## CLI
118
+
119
+ ```bash
120
+ # Generate
121
+ mixi-cut generate --preset dj-12inch # 15-min DJ vinyl
122
+ mixi-cut generate --preset test-cut # 60s test for iteration
123
+ mixi-cut generate --preset dj-7inch # 4-min 7" single
124
+ mixi-cut generate --preset phono # with RIAA pre-emphasis
125
+ mixi-cut generate --preset locked-groove # single revolution
126
+ mixi-cut generate --duration 480 --output custom.wav
127
+
128
+ # Verify
129
+ mixi-cut verify side_a.wav --strict
130
+
131
+ # Benchmark
132
+ mixi-cut bench # full 14-category suite
133
+ mixi-cut bench --category tonearm # specific category
134
+
135
+ # Decode
136
+ mixi-cut decode side_a.wav
137
+
138
+ # Protocol info
139
+ mixi-cut info
140
+ ```
141
+
142
+ <details>
143
+ <summary>Legacy generate.py is still supported</summary>
144
+
145
+ ```bash
146
+ python generate.py # 15-min timecode
147
+ python generate.py --duration 480 # 8 minutes
148
+ python generate.py --edm-test # 60s test
149
+ python generate.py --loop --riaa # PHONO with loop
150
+ ```
151
+ </details>
152
+
153
+ ## Presets
154
+
155
+ | Preset | Duration | RPM | RIAA | Loop | Use case |
156
+ |--------|----------|-----|------|------|----------|
157
+ | `dj-12inch` | 15 min | 33-1/3 | No | Yes | Standard DJ vinyl |
158
+ | `dj-7inch` | 4 min | 45 | No | Yes | 7" single |
159
+ | `test-cut` | 60s | 33-1/3 | No | No | Quick iteration |
160
+ | `phono` | 15 min | 33-1/3 | Yes | Yes | PHONO preamp input |
161
+ | `locked-groove` | 1.8s | 33-1/3 | No | Yes | Single revolution |
162
+
163
+ ## Decoders
164
+
165
+ MIXI-CUT has reference decoder implementations in 4 languages:
166
+
167
+ | Language | Location | Tests | Target |
168
+ |----------|----------|-------|--------|
169
+ | **Python** | `src/mixi_cut/decoder.py` | 133 | Reference, scripting |
170
+ | **C** | `decoder_c/` | 13 | Embedded (STM32, ESP32, RPi) |
171
+ | **Rust** | `decoder_rust/` | 9 | Native apps, Wasm |
172
+ | **JavaScript** | `docs/demo/app.js` | --- | Browser (Web Audio API) |
173
+
174
+ ### C Decoder (zero-alloc, embeddable)
175
+
176
+ ```c
177
+ #include "mixi_decoder.h"
178
+
179
+ mixi_decoder_t dec;
180
+ mixi_decoder_init_default(&dec);
181
+
182
+ mixi_result_t result;
183
+ mixi_decoder_process(&dec, left, right, 128, &result);
184
+ printf("Speed: %.2f, Lock: %.3f\n", result.speed, result.lock);
185
+ ```
186
+
187
+ - Zero heap allocations, ~200 bytes per instance
188
+ - C99 compliant, no external dependencies
189
+ - Targets: STM32F4, ESP32-S3, Raspberry Pi
190
+
191
+ ### Rust Decoder
192
+
193
+ ```rust
194
+ use mixi_decoder::{Decoder, DecoderConfig};
195
+
196
+ let mut dec = Decoder::new(DecoderConfig::default());
197
+ let result = dec.process(&left, &right);
198
+ println!("Speed: {:.2}x, Lock: {:.3}", result.speed, result.lock);
199
+ ```
200
+
201
+ - `cargo add mixi-decoder`
202
+ - Wasm support via `--features wasm`
203
+ - CLI: `mixi-decode file.wav`
204
+
205
+ ### Web Demo
206
+
207
+ Open `docs/demo/index.html` or visit the [live demo](https://fabriziosalmi.github.io/mixi-cut/demo/) --- drag a WAV file to decode in-browser.
208
+
209
+ ## Benchmark Results
210
+
211
+ 14-category stress test with 1000+ Monte Carlo simulations:
212
+
213
+ | Category | Result | Verdict |
214
+ |----------|--------|---------|
215
+ | Noise floor | Survives SNR = -24 dB | Pass |
216
+ | Wow/flutter | Tolerates +/-5% | Pass |
217
+ | Dust/scratches | 1000/sec | Pass |
218
+ | Speed range | 0.02x -- 3.0x | Pass |
219
+ | Vinyl brake settle | <100 ms | Pass |
220
+ | Stop response | 3 ms | Pass |
221
+ | Ground loop hum | Immune at +6 dB | Pass |
222
+ | ADC clipping | Survives 1.2x overdrive | Pass |
223
+ | ADC quantization | Works at 4-bit | Pass |
224
+ | Channel crosstalk | 70% L/R bleed tolerated | Pass |
225
+ | Multi-skip | 10 rapid skips recovered | Pass |
226
+ | EDM beat drift | < 1.2 ms over 64 bars | Pass |
227
+ | Tonearm bounce | 0 ms P99, 100% success | Pass |
228
+ | Carrier frequency | 3 kHz confirmed optimal | Pass |
229
+
230
+ ```bash
231
+ python benchmark.py # run full suite
232
+ python benchmark.py --pdf # generate PDF report
233
+ python benchmark.py --compare # regression check
234
+ ```
235
+
236
+ ## Project Structure
237
+
238
+ ```
239
+ mixi-cut/
240
+ src/mixi_cut/ # Python package
241
+ protocol.py # Constants, presets, frame format
242
+ gf256.py # GF(2^8) + Reed-Solomon + CRC-16
243
+ encoder.py # Position encoding (Barker-13, multi-rate)
244
+ carrier.py # Quadrature carrier + RIAA
245
+ decoder.py # Dual-PLL decoder + 3-regime brake
246
+ generator.py # WAV orchestrator
247
+ verifier.py # WAV verification
248
+ cli.py # CLI entry point
249
+ decoder_c/ # C decoder (zero-alloc, embeddable)
250
+ include/mixi_decoder.h
251
+ src/mixi_decoder.c
252
+ test/test_decoder.c
253
+ decoder_rust/ # Rust crate (wasm-ready)
254
+ src/lib.rs
255
+ src/bin/decode.rs
256
+ docs/ # VitePress documentation site
257
+ .vitepress/ # Theme + config
258
+ guide/ # User guides
259
+ api/ # API reference
260
+ demo/ # Web demo (JavaScript decoder)
261
+ tests/ # 133 Python tests
262
+ benchmark.py # 14-category benchmark suite
263
+ generate.py # Legacy generator (backward compat)
264
+ pyproject.toml # package metadata
265
+ ```
266
+
267
+ ## Documentation
268
+
269
+ Full documentation at **[fabriziosalmi.github.io/mixi-cut](https://fabriziosalmi.github.io/mixi-cut/)**.
270
+
271
+ | Document | Audience |
272
+ |----------|----------|
273
+ | [Protocol Spec](https://github.com/fabriziosalmi/mixi-cut/blob/main/PROTOCOL.md) | Protocol specification (v0.3) |
274
+ | [Cutting Guide](https://github.com/fabriziosalmi/mixi-cut/blob/main/docs/CUTTING_GUIDE.md) | Lathe operators |
275
+ | [DJ Guide](https://github.com/fabriziosalmi/mixi-cut/blob/main/docs/DJ_GUIDE.md) | DJs --- setup, techniques, troubleshooting |
276
+ | [Decoder Guide](https://github.com/fabriziosalmi/mixi-cut/blob/main/docs/DECODER_GUIDE.md) | Developers implementing a decoder |
277
+ | [Hardware Guide](https://github.com/fabriziosalmi/mixi-cut/blob/main/docs/HARDWARE_GUIDE.md) | Embedded engineers (STM32/ESP32) |
278
+ | [Comparison](https://github.com/fabriziosalmi/mixi-cut/blob/main/docs/COMPARISON.md) | vs Serato, Traktor, RekordBox |
279
+ | [Contributing](https://github.com/fabriziosalmi/mixi-cut/blob/main/CONTRIBUTING.md) | Contributors |
280
+ | [Changelog](https://github.com/fabriziosalmi/mixi-cut/blob/main/CHANGELOG.md) | Release history |
281
+
282
+ ## Development
283
+
284
+ ```bash
285
+ # Setup
286
+ git clone https://github.com/fabriziosalmi/mixi-cut.git
287
+ cd mixi-cut
288
+ pip install -e ".[all]"
289
+
290
+ # Test (155 tests across 3 languages)
291
+ make test # Python (133 tests)
292
+ make test-c # C decoder (13 tests)
293
+ make test-rust # Rust decoder (9 tests)
294
+ make test-all # All of the above
295
+
296
+ # Lint
297
+ make lint
298
+
299
+ # Benchmark
300
+ make bench
301
+
302
+ # Generate + verify
303
+ make generate
304
+ make verify
305
+ ```
306
+
307
+ ## Downloads
308
+
309
+ Pre-generated WAV files in [Releases](https://github.com/fabriziosalmi/mixi-cut/releases):
310
+
311
+ | File | Duration | Use |
312
+ |------|----------|-----|
313
+ | `mixi_timecode_60s.wav` | 60s | Test cut |
314
+ | `mixi_timecode_240s.wav` | 4 min | 7" single |
315
+ | `mixi_timecode_480s.wav` | 8 min | Short side |
316
+ | `mixi_timecode_600s.wav` | 10 min | Standard side |
317
+ | `mixi_timecode_900s.wav` | 15 min | Full side |
318
+
319
+ ## License
320
+
321
+ MIT --- No DRM, no vendor lock-in, free forever.