memlnaut-nisps/schemas/modes/xiasri.json

48 lines
4 KiB
JSON
Raw Permalink Normal View History

{
"$schema": "../schema.json",
"_note": "24-param reverb/delay/pitch processor. XIASRI bypasses the voice-space layer — neural-net outputs feed directly into the engine. Indices 3, 22, 23 are not currently consumed (kept as raw slots so the schema stays in lockstep with NPARAMS=24). Per-param ranges and curves taken from XIASRIAudioApp::Process().",
"mode_id": "xiasri",
"engine_id": "xiasri",
"ml": {
"input_channels": ["joy_x", "joy_y", "joy_z", "joy_w"],
"input_size": 4,
"hidden_layers": [10, 10, 14],
"output_size": 24,
refactor(ml): one runtime-configurable training default (S26) The operator's call: "there should be one default learning rate and one default max iterations and they should both be configurable at runtime." There were SIX copies, not the four the audit described, and they did not agree: nisps/ml/mlp.hpp no-arg train() hardcoding 1.f / 1000u / 0.001f — and firmware's ONLY training path calls exactly this, so firmware had no runtime knob at all wasm-iml.ts train() and trainAsync() TS default params (x2) engine-api.ts learningRate ?? 1.0, with no maxIterations knob vcv/src/iml.hpp 200 / 0.1 / 0.00001 — silently divergent external_synth_midi.hpp its own kDefaultLearningRate/kDefaultMaxIterations schemas/modes/*.json x9, identical, read by nobody at runtime Now: schemas/ml_defaults.json is the single declaration (validated against a sibling meta-schema, matching the midi_device.schema.json convention), codegen emits it to C++ and TS in the same run, and MLPCore carries a TrainConfig whose default member initialisers read the generated constant. set_train_config()/nisps_ml_set_train_config() make it runtime-overridable on every target; the explicit-argument train() overload is untouched. min_error joins the tuple — it was duplicated identically and belongs with the other two. The per-mode ml block loses default_learning_rate/default_max_iterations. default_spread stays (genuinely wired on both targets) and input_channels stays (codegen-time validated, real information for sound_analysis_midi). VCV BEHAVIOUR CHANGE, deliberate: MEMLNaut.cpp constructs IML positionally and relies on those defaults, so the module moves to 1000/1.0/0.001 — 5x the max iterations, 10x the learning rate, and a 100x looser early-stop threshold. The old values were never justified anywhere; they arrived with fbc68eb alongside an unrelated module rewrite and no tuning rationale. Firmware and WASM have shipped 1.0/1000 all along. It is now runtime-settable if this turns out worse. The generated header lands in nisps/ml/generated/, not nisps/modes/generated/ where the rest of codegen output lives: training hyperparameters are an ML fact, and nisps/ml sits below nisps/modes, so emitting them there would make mlp.hpp include upward. The agent that built this flagged the directory-crossing rather than hiding it; this is the fix. CI's generated-freshness gate learns the new directory. Gates: run-all-tests.sh ALL GREEN — 4/4 ctest, parity PASS (max delta 2.38e-7), lint clean, manifold typecheck + 17 unit + 33 e2e (which exercise train() and trainAsync() through a real browser).
2026-07-21 17:20:10 +02:00
"default_spread": 0.6
},
"params": [
{ "name": "dl1_mix", "label": "Delay 1 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "delays" },
{ "name": "dl2_mix", "label": "Delay 2 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "delays" },
{ "name": "dl3_mix", "label": "Delay 3 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "delays" },
{ "name": "p03", "label": "Param 03", "min": 0.0, "max": 1.0, "default": 0.5, "curve": "linear", "group": "general" },
{ "name": "allp1_fb", "label": "Allpass 1 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp2_fb", "label": "Allpass 2 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "comb1_fb", "label": "Comb 1 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "comb2_fb", "label": "Comb 2 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "dl1_fb", "label": "Delay 1 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "delays" },
{ "name": "dl2_fb", "label": "Delay 2 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "delays" },
{ "name": "dl3_fb", "label": "Delay 3 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "delays" },
{ "name": "wetdry_mix", "label": "Wet/Dry Mix", "min": 0.0, "max": 1.0, "default": 0.5, "curve": "linear", "group": "mix" },
{ "name": "pitch_transp","label": "Pitch Transpose", "min": 0.0, "max": 1.0, "default": 0.5, "curve": "linear", "group": "pitch" },
{ "name": "pitch_mix", "label": "Pitch Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "pitch" },
{ "name": "allp3_fb", "label": "Allpass 3 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp4_fb", "label": "Allpass 4 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp5_fb", "label": "Allpass 5 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp6_fb", "label": "Allpass 6 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp3_mix", "label": "Allpass 3 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp4_mix", "label": "Allpass 4 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp5_mix", "label": "Allpass 5 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "allp6_mix", "label": "Allpass 6 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "verb" },
{ "name": "dl4_mix", "label": "Delay 4 Mix", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "square", "group": "delays" },
{ "name": "dl4_fb", "label": "Delay 4 Feedback", "min": 0.0, "max": 1.0, "default": 0.0, "curve": "linear", "group": "delays" }
],
"voice_spaces": [
"Direct"
],
"ui": {
"primary_input": "joystick",
"show_voice_space_selector": false,
"show_synth_visualizer": false
}
}