Repository navigation
Conversation
Add the custom sampler (0x4001) and custom mastering (0x4003) racks on top of the custom submixer support: - Ngs2CustomSamplerRackOption (1304 bytes) and Ngs2CustomMasteringRackOption (1288 bytes), with their voice states (48 and 16 bytes). - The racks render as the sampler / mastering rack they are built on and run their UserFx2 modules like the custom submixer. - Custom sampler params are the sampler params under the custom rack id; the custom mastering setup param 0x40030000 sets the channel count. - Built-in (non-UserFx2) modules are accepted on these two racks but not run individually; their controls are ignored and logged once. The custom submixer keeps rejecting them. Recorded in docs/dev/TechnicalDebt.md. Seen on PPSA15552 (Dead Cells), which creates both racks at start-up. (It also patches voices to a rack handle, which still fails and is not part of this change.) Tests cover both racks in tests/Ngs2Custom.cpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Dqgm9nUKygsXzr6poJsHJ
adriadam10
left a comment
There was a problem hiding this comment.
Thanks, the layouts match KytyPS5 (Ngs2CustomSamplerRackOption 1304, Ngs2CustomMasteringRackOption 1288, voice states 48/16) and ngs2_custom plus the other Ngs2 tests pass here. A few things before this can merge:
Custom.cpp:23-30,Custom.cpp:112-120: built-in modules are accepted, skipped and only logged to stderr. That returns plausible-but-wrong audio wheremainthrew. Please either throw for any built-in module whose behaviour isn't implemented, or show (a test, or a log from the title) that skipping module0x13is exact for what the title does with it and limit the skip to exactly that id/controls.tests/Ngs2Custom.cpp:256-257,:275,:294-295: the project doesn't allow code comments (CONTRIBUTING); please remove them.docs/dev/TechnicalDebt.md:241: KytyPS5 doesn't read the0x40030000setup param at all (it only checks the rack type), so "as KytyPS5 handles them" is wrong for the mastering setup layout. Please say the custom-submixer layout is an assumption. Since the skip changes behaviour, the line also belongs under "### Functional", not "### Unknown function info".
|
Windows data point for Dead Cells (PPSA15552) with this PR: Windows 10, MinGW/Ninja Release build of the PR head on top of So on this machine it gets past the rack id and does not reach the voice patch to a rack handle mentioned in the description; the Geom call comes first. The option block I captured with a local trace before this PR (not committed) agrees with the layout here: rack id What I did not check: audio, the mastering rack, Linux. AI-assisted (Claude Code). |
|
Linux matches @xXPBSXx's data (Debian 12, GCC 14, RADV gfx1036 and llvmpipe, Two points for review:
AI-assisted: yes (Claude Code). |
|
I reviewed the ready branch for #3759 against this PR and current The useful difference is the built-in module case from Dead Cells: the candidate accepts and skips module I rebased the original one-commit branch onto current If this follow-up is useful, the branch is |
|
Closing in favour of #4417: the points from 10-11 are still open (built-in modules accepted and skipped, |
Add the custom sampler (0x4001) and custom mastering (0x4003) racks on top of the custom submixer support:
Seen on PPSA15552 (Dead Cells), which creates both racks at start-up. (It also patches voices to a rack handle, which still fails and is not part of this change.)
Tests cover both racks in tests/Ngs2Custom.cpp.
Claude-Session: https://claude.ai/code/session_017Dqgm9nUKygsXzr6poJsHJ
What
Adds the NGS2 custom sampler (
0x4001) and custom mastering (0x4003) racks next to the existing custom submixer:Ngs2CustomSamplerRackOption(1304 bytes) andNgs2CustomMasteringRackOption(1288 bytes), and their voice statesNgs2CustomSamplerVoiceState(48) andNgs2CustomMasteringVoiceState(16); the sizes are checked withstatic_assert. Layouts follow KytyPS5, where the same title runs.0x4001xxxx); the custom mastering setup param0x40030000sets the channel count with the custom submixer setup layout.0x4000xxxxoutside UserFx2) are ignored and logged once. The custom submixer keeps rejecting them. Recorded in TechnicalDebt.Tested
ngs2_custom,ngs2_render,ngs2_core_render,ngs2_atrac9,ngs2_filter,ngs2_parse,ngs2_streamandngs2_userfxpass. New cases intests/Ngs2Custom.cppcover both racks (sampler playback with a UserFx2 gain and a built-in module, custom mastering output, voice states).NGS2: rack id 0x4001 is not implemented; with this change it creates both racks (built-in module0x13in the custom sampler) and continues. The title then patches voices to a rack handle, which is not part of this PR.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)