Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
cb57f3a
Add Kaitai 2KXL SND parser #342
izzyreal Jun 13, 2026
733ea1c
Add Kaitai 2KXL PGM parser #342
izzyreal Jun 13, 2026
4ed7f66
Add Kaitai 2KXL APS parser #342
izzyreal Jun 13, 2026
d4920a2
Add Kaitai 2KXL ALL parser #342
izzyreal Jun 13, 2026
f21e4af
Add Kaitai 2KXL MID parser #342
izzyreal Jun 13, 2026
75ab090
Switch MPC file I/O to Kaitai-backed adapters
izzyreal Jun 14, 2026
2e7a6d9
Expand SND Kaitai parity coverage
izzyreal Jun 19, 2026
355db47
Fix PGM/APS program change semantics and test startup
izzyreal Jun 20, 2026
05dde77
Tighten Kaitai ALL and MID production-seam tests
izzyreal Jun 20, 2026
483b36c
Tighten Kaitai APS production-seam coverage
izzyreal Jun 20, 2026
7b582ec
Fix PGM mixer send-level loading and harden tests
izzyreal Jun 20, 2026
7b160ab
Add focused PGM reader and converter parity tests
izzyreal Jun 20, 2026
deff429
Add ProgramLoader PGM parity coverage
izzyreal Jun 20, 2026
bf1fbfd
Add focused APS loader parity tests
izzyreal Jun 20, 2026
5e59d33
Add focused SND handwritten-path parity tests
izzyreal Jun 20, 2026
0c44fd2
Add focused ALL handwritten-path parity tests
izzyreal Jun 20, 2026
5947293
Broaden PGM handwritten-path parity coverage
izzyreal Jun 20, 2026
56b119b
Fix assign screen slider parameter semantics
izzyreal Jun 20, 2026
7372fb4
Expand APS parity coverage
izzyreal Jun 20, 2026
106ca30
Finish APS Kaitai parity fixes
izzyreal Jun 20, 2026
c6cc1c4
Tighten Kaitai parity coverage for PGM ALL and MID
izzyreal Jun 21, 2026
e9bdcff
Remove handwritten APS implementation
izzyreal Jun 21, 2026
c452d78
Remove handwritten PGM and SND implementations
izzyreal Jun 21, 2026
cca8569
Add direct Kaitai MIDI save path
izzyreal Jun 22, 2026
dfb3c6f
Retire handwritten MIDI and ALL parsers
izzyreal Jul 1, 2026
01df16f
Fix APS drum bus mapping in Kaitai loader
izzyreal Jul 1, 2026
3dff50d
Align APS IO with 16-bit sound references
izzyreal Jul 1, 2026
81ed960
Ignore local build-codex directory
izzyreal Jul 1, 2026
f718bef
Document Kaitai parser maintenance
izzyreal Jul 1, 2026
d2ce8f3
Fix Kaitai MPC2000XL ALL RESIST roundtrip
izzyreal Jul 3, 2026
612c26d
Fix kaitai MID consumption
izzyreal Jul 3, 2026
34eac8b
Add MPC60 SET import support
izzyreal Jul 5, 2026
e561a38
Add vel/dcy sw mode support
izzyreal Jul 8, 2026
b0573a8
Allow parallel test execution
izzyreal Jul 8, 2026
d05b4bf
Add MPC3000 SEQ load flow and real MIDI fixture
izzyreal Jul 10, 2026
557f44d
Add real MPC3000 track-off SEQ fixture
izzyreal Jul 10, 2026
d8f479b
Add real MPC3000 loop-enabled SEQ fixture
izzyreal Jul 10, 2026
bf9d226
Clarify MPC3000 SEQ test offsets
izzyreal Jul 10, 2026
cba9af7
Harden MPC3000 SEQ load coverage
izzyreal Jul 10, 2026
956fa45
Cover ALL note variation modes
izzyreal Jul 10, 2026
e484fff
Cover ALL pitch bend edge cases
izzyreal Jul 10, 2026
f98c687
Add MPC3000 ALL loading and UI coverage
izzyreal Jul 10, 2026
330de2c
Load MPC60 files through Kaitai
izzyreal Jul 13, 2026
700e349
Regenerate legacy MPC sequence parsers
izzyreal Jul 14, 2026
372dcdc
Add MPC3000 SND loading and preview support
izzyreal Jul 14, 2026
102b073
Add MPC3000 PGM hardware parser baseline
izzyreal Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ build-xcode/
editables/
deps/
.idea/
build-codex/
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ FetchContent_Declare(readerwriterqueue
SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps/readerwriterqueue
)

FetchContent_Declare(kaitai_runtime
GIT_REPOSITORY https://github.com/izzyreal/kaitai_struct_cpp_stl_runtime
GIT_TAG cpp-serialization
)

FetchContent_Declare(json-schema-validator
GIT_REPOSITORY https://github.com/pboettch/json-schema-validator.git
GIT_TAG 2.3.0
Expand Down Expand Up @@ -101,6 +106,11 @@ target_include_directories(platform_folders INTERFACE
$<BUILD_INTERFACE:${PlatformFolders_SOURCE_DIR}>
)

message(STATUS "Downloading kaitai runtime...")
set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(kaitai_runtime)
unset(BUILD_TESTS CACHE)

if(NOT TARGET nlohmann_json::nlohmann_json)
FetchContent_Declare(json
URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
Expand Down Expand Up @@ -179,7 +189,7 @@ target_include_directories(mpc PUBLIC
${readerwriterqueue_SOURCE_DIR}
)

target_link_libraries(mpc akaifat ghc_filesystem rtmidi samplerate platform_folders nlohmann_json::nlohmann_json nlohmann_json_schema_validator lodepng)
target_link_libraries(mpc akaifat ghc_filesystem rtmidi samplerate platform_folders nlohmann_json::nlohmann_json nlohmann_json_schema_validator lodepng kaitai_struct_cpp_stl_runtime)

if(MSVC)
target_compile_options(mpc PRIVATE "/MP")
Expand Down
105 changes: 105 additions & 0 deletions PARSERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Kaitai Parser Maintenance

This repo vendors generated C++ Kaitai parsers under:

- `src/main/file/kaitai/generated`

The source `.ksy` files live in:

- `/Users/izmar/git/mpc2000xl_kaitai`

The generator we use is the C++ write-capable compiler from:

- `/Users/izmar/git/kaitai_struct`
- branch: `cpp-serialization`

## Formats currently generated

- `mpc2000xl.snd.ksy`
- `mpc2000xl.pgm.ksy`
- `mpc2000xl.aps.ksy`
- `standard_midi_file_with_running_status.ksy`
- `mpc2000xl.mid.ksy`
- `mpc2000xl.all.ksy`
- `mpc60.set.v1.ksy`
- `mpc60.snd.v1.ksy`
- `mpc3000.snd.v2.ksy`
- `mpc3000.seq.v3.ksy`
- `mpc3000.all.v3.ksy`
- `mpc60.seq.body.ksy`
- `mpc60.seq.v2.ksy`
- `mpc60.all.body.ksy`
- `mpc60.all.v2.ksy`

## Regenerate parsers

From anywhere:

```sh
/Users/izmar/git/kaitai_struct/compiler/jvm/target/universal/stage/bin/kaitai-struct-compiler \
-t cpp_stl \
--cpp-standard 11 \
-w \
--outdir /Users/izmar/git/vmpc-juce/editables/mpc/src/main/file/kaitai/generated \
-I /Users/izmar/git/mpc2000xl_kaitai \
/Users/izmar/git/mpc2000xl_kaitai/mpc2000xl.snd.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc2000xl.pgm.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc2000xl.aps.ksy \
/Users/izmar/git/mpc2000xl_kaitai/standard_midi_file_with_running_status.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc2000xl.mid.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc2000xl.all.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc60.set.v1.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc60.snd.v1.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc3000.snd.v2.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc3000.seq.v3.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc3000.all.v3.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc60.seq.body.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc60.seq.v2.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc60.all.body.ksy \
/Users/izmar/git/mpc2000xl_kaitai/mpc60.all.v2.ksy
```

## Typical update flow

1. Change the relevant `.ksy` file in `mpc2000xl_kaitai`.
2. Regenerate the C++ outputs into `src/main/file/kaitai/generated`.
3. If needed, update the integration layer in:
- `src/main/file/kaitai/SndIo.*`
- `src/main/file/kaitai/PgmIo.*`
- `src/main/file/kaitai/ApsIo.*`
- `src/main/file/kaitai/MidIo.*`
- `src/main/file/kaitai/AllIo.*`
- `src/main/file/kaitai/Mpc3000SeqIo.*`
4. Run downstream tests.
5. Commit both the `.ksy` change and the regenerated vendored C++.

## Verify in editables/mpc

Build tests. Use any build directory you want. Examples below use `build`:

```sh
cmake -G "Ninja Multi-Config" -B build
cmake --build build --target mpc-tests --config Debug
```

Run the focused Kaitai suite:

```sh
./build/Debug/mpc-tests.app/Contents/MacOS/mpc-tests "[kaitai-snd],[kaitai-pgm],[kaitai-aps],[kaitai-mid],[kaitai-all],[kaitai-set]"
```

Run one format only if needed:

```sh
./build/Debug/mpc-tests.app/Contents/MacOS/mpc-tests "[kaitai-aps]"
./build/Debug/mpc-tests.app/Contents/MacOS/mpc-tests "[kaitai-pgm]"
./build/Debug/mpc-tests.app/Contents/MacOS/mpc-tests "[kaitai-snd]"
./build/Debug/mpc-tests.app/Contents/MacOS/mpc-tests "[kaitai-mid]"
./build/Debug/mpc-tests.app/Contents/MacOS/mpc-tests "[kaitai-all]"
./build/Debug/mpc-tests.app/Contents/MacOS/mpc-tests "[kaitai-set]"
```

## Notes

- Do not regenerate with upstream Kaitai compiler unless it has the same C++ serialization support as the `cpp-serialization` branch.
- `generated/` is vendored on purpose. As far as `editables/mpc` is concerned, generated parsers are ordinary source files.
4 changes: 2 additions & 2 deletions cmake/MpcResourceBundling.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function(_bundle_resources)

_generate_mpc_required_resource_manifest()

file(GLOB_RECURSE MPC_RESOURCES "${_mpc_resources_root}/*")
file(GLOB_RECURSE MPC_RESOURCES CONFIGURE_DEPENDS "${_mpc_resources_root}/*")
list(FILTER MPC_RESOURCES EXCLUDE REGEX "\\.DS_Store$")

if (APPLE)
Expand All @@ -62,7 +62,7 @@ function(_bundle_resources)
target_link_libraries(mpc mpc::rc)
endif()

file(GLOB_RECURSE MPC_TEST_RESOURCES "${_mpc_test_resources_root}/*")
file(GLOB_RECURSE MPC_TEST_RESOURCES CONFIGURE_DEPENDS "${_mpc_test_resources_root}/*")
list(FILTER MPC_TEST_RESOURCES EXCLUDE REGEX "\\.DS_Store$")

cmrc_add_resource_library(
Expand Down
Binary file added resources/screens/bg/conversion-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/screens/bg/load-a-set-replace-add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/screens/bg/load-a-set-sound.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/screens/bg/load-a-set.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/screens/bg/mpc3000-all-file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions resources/screens/layer2.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,31 @@
"fblabels" : [ null, null, "CLEAR", "CANCEL", "LOAD", null ],
"fbtypes" : [ null, null, 1, 0, 1, null ]
},
"load-a-set":
{
"fblabels" : [ null, null, "SOUND", "CANCEL", "LOAD", null ],
"fbtypes" : [ null, null, 1, 0, 1, null ]
},
"conversion-table":
{
"labels" : [ "MPC60 Pad:", "Becomes note:" ],
"x" : [ 67, 67 ],
"y" : [ 15, 37 ],
"tfsize" : [ 90, 36 ],
"parameters" : [ "mpc60-pad", "becomes-note" ],
"fblabels" : [ null, null, null, "CANCEL", "DO IT", null ],
"fbtypes" : [ null, null, null, 0, 1, null ]
},
"load-a-set-replace-add":
{
"labels" : [ ":" ],
"x" : [ 77 ],
"y" : [ 21 ],
"tfsize" : [ 60 ],
"parameters" : [ "load-replace-sound" ],
"fblabels" : [ null, null, "CLEAR", "CANCEL", "LOAD", null ],
"fbtypes" : [ null, null, 1, 0, 1, null ]
},
"save-all-file":
{
"labels" : [ "File\u00CEname:" ],
Expand Down
21 changes: 21 additions & 0 deletions resources/screens/layer3.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
{
"load-a-sequence-play":
{
"infowidgets" : [ "position" ],
"infosize" : [ 60 ],
"infox" : [ 95 ],
"infoy" : [ 28 ]
},
"file-exists":
{
"fblabels" : [ null, null, "REPLAC", "CANCEL", "RENAME", null],
"fbtypes" : [ null, null, 1, 0, 1, null ]
},
"load-a-set-sound":
{
"labels" : [ "MPC60 pad:" ],
"x" : [ 64 ],
"y" : [ 21 ],
"tfsize" : [ 90 ],
"parameters" : [ "mpc60-pad" ],
"infowidgets" : [ "file" ],
"infox" : [ 95 ],
"infoy" : [ 35 ],
"infosize" : [ 126 ],
"fblabels" : [ null, null, null, "CANCEL", "LOAD", null ],
"fbtypes" : [ null, null, null, 0, 1, null ]
},
"vmpc-record-jam":
{
"fblabels" : [ null, null, null, "CANCEL", "OK", null],
Expand Down
Loading