fractal-midi 0.1.0-alpha.0
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.
- package/LICENSE +200 -0
- package/NOTICE +28 -0
- package/README.md +147 -0
- package/dist/am4/applicability.d.ts +61 -0
- package/dist/am4/applicability.d.ts.map +1 -0
- package/dist/am4/applicability.js +285 -0
- package/dist/am4/blockTypes.d.ts +43 -0
- package/dist/am4/blockTypes.d.ts.map +1 -0
- package/dist/am4/blockTypes.js +48 -0
- package/dist/am4/cacheEnums.d.ts +46 -0
- package/dist/am4/cacheEnums.d.ts.map +1 -0
- package/dist/am4/cacheEnums.js +734 -0
- package/dist/am4/cacheParams.d.ts +3533 -0
- package/dist/am4/cacheParams.d.ts.map +1 -0
- package/dist/am4/cacheParams.js +1996 -0
- package/dist/am4/editorControlLabels.d.ts +45 -0
- package/dist/am4/editorControlLabels.d.ts.map +1 -0
- package/dist/am4/editorControlLabels.js +15894 -0
- package/dist/am4/index.d.ts +28 -0
- package/dist/am4/index.d.ts.map +1 -0
- package/dist/am4/index.js +31 -0
- package/dist/am4/ir/preset.d.ts +24 -0
- package/dist/am4/ir/preset.d.ts.map +1 -0
- package/dist/am4/ir/preset.js +12 -0
- package/dist/am4/ir/transpile.d.ts +9 -0
- package/dist/am4/ir/transpile.d.ts.map +1 -0
- package/dist/am4/ir/transpile.js +19 -0
- package/dist/am4/locations.d.ts +32 -0
- package/dist/am4/locations.d.ts.map +1 -0
- package/dist/am4/locations.js +58 -0
- package/dist/am4/paramNames.d.ts +55 -0
- package/dist/am4/paramNames.d.ts.map +1 -0
- package/dist/am4/paramNames.js +863 -0
- package/dist/am4/paramNamesGenerated.d.ts +41 -0
- package/dist/am4/paramNamesGenerated.d.ts.map +1 -0
- package/dist/am4/paramNamesGenerated.js +183 -0
- package/dist/am4/parameterBridge.d.ts +46 -0
- package/dist/am4/parameterBridge.d.ts.map +1 -0
- package/dist/am4/parameterBridge.js +300 -0
- package/dist/am4/params.d.ts +9577 -0
- package/dist/am4/params.d.ts.map +1 -0
- package/dist/am4/params.js +4537 -0
- package/dist/am4/setParam.d.ts +414 -0
- package/dist/am4/setParam.d.ts.map +1 -0
- package/dist/am4/setParam.js +819 -0
- package/dist/am4/shared/paramHelpers.d.ts +55 -0
- package/dist/am4/shared/paramHelpers.d.ts.map +1 -0
- package/dist/am4/shared/paramHelpers.js +146 -0
- package/dist/am4/symbolicIds.d.ts +11 -0
- package/dist/am4/symbolicIds.d.ts.map +1 -0
- package/dist/am4/symbolicIds.js +587 -0
- package/dist/am4/typeApplicability.d.ts +39 -0
- package/dist/am4/typeApplicability.d.ts.map +1 -0
- package/dist/am4/typeApplicability.js +466 -0
- package/dist/am4/variantResolverTables.d.ts +51 -0
- package/dist/am4/variantResolverTables.d.ts.map +1 -0
- package/dist/am4/variantResolverTables.js +3128 -0
- package/dist/axe-fx-ii/blockTypes.d.ts +45 -0
- package/dist/axe-fx-ii/blockTypes.d.ts.map +1 -0
- package/dist/axe-fx-ii/blockTypes.js +116 -0
- package/dist/axe-fx-ii/index.d.ts +5 -0
- package/dist/axe-fx-ii/index.d.ts.map +1 -0
- package/dist/axe-fx-ii/index.js +18 -0
- package/dist/axe-fx-ii/paramAliases.d.ts +54 -0
- package/dist/axe-fx-ii/paramAliases.d.ts.map +1 -0
- package/dist/axe-fx-ii/paramAliases.js +146 -0
- package/dist/axe-fx-ii/params.d.ts +11502 -0
- package/dist/axe-fx-ii/params.d.ts.map +1 -0
- package/dist/axe-fx-ii/params.js +2847 -0
- package/dist/axe-fx-ii/setParam.d.ts +560 -0
- package/dist/axe-fx-ii/setParam.d.ts.map +1 -0
- package/dist/axe-fx-ii/setParam.js +888 -0
- package/dist/axe-fx-iii/blockTypes.d.ts +87 -0
- package/dist/axe-fx-iii/blockTypes.d.ts.map +1 -0
- package/dist/axe-fx-iii/blockTypes.js +156 -0
- package/dist/axe-fx-iii/enumOverlay.d.ts +73 -0
- package/dist/axe-fx-iii/enumOverlay.d.ts.map +1 -0
- package/dist/axe-fx-iii/enumOverlay.js +236 -0
- package/dist/axe-fx-iii/index.d.ts +9 -0
- package/dist/axe-fx-iii/index.d.ts.map +1 -0
- package/dist/axe-fx-iii/index.js +20 -0
- package/dist/axe-fx-iii/params.d.ts +179 -0
- package/dist/axe-fx-iii/params.d.ts.map +1 -0
- package/dist/axe-fx-iii/params.js +6913 -0
- package/dist/axe-fx-iii/setParam.d.ts +460 -0
- package/dist/axe-fx-iii/setParam.d.ts.map +1 -0
- package/dist/axe-fx-iii/setParam.js +910 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/shared/checksum.d.ts +10 -0
- package/dist/shared/checksum.d.ts.map +1 -0
- package/dist/shared/checksum.js +14 -0
- package/dist/shared/device.d.ts +195 -0
- package/dist/shared/device.d.ts.map +1 -0
- package/dist/shared/device.js +27 -0
- package/dist/shared/index.d.ts +8 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +11 -0
- package/dist/shared/lineage/amp-lineage.json +8313 -0
- package/dist/shared/lineage/axefx2-amp-lineage.json +5871 -0
- package/dist/shared/lineage/axefx2-delay-lineage.json +226 -0
- package/dist/shared/lineage/axefx2-drive-lineage.json +575 -0
- package/dist/shared/lineage/axefx2-reverb-lineage.json +467 -0
- package/dist/shared/lineage/cab-lineage.json +10777 -0
- package/dist/shared/lineage/chorus-lineage.json +173 -0
- package/dist/shared/lineage/compressor-lineage.json +338 -0
- package/dist/shared/lineage/delay-lineage.json +313 -0
- package/dist/shared/lineage/drive-lineage.json +1844 -0
- package/dist/shared/lineage/flanger-lineage.json +313 -0
- package/dist/shared/lineage/phaser-lineage.json +208 -0
- package/dist/shared/lineage/reverb-lineage.json +793 -0
- package/dist/shared/lineage/wah-lineage.json +117 -0
- package/dist/shared/lineageLookup.d.ts +69 -0
- package/dist/shared/lineageLookup.d.ts.map +1 -0
- package/dist/shared/lineageLookup.js +196 -0
- package/dist/shared/packValue.d.ts +40 -0
- package/dist/shared/packValue.d.ts.map +1 -0
- package/dist/shared/packValue.js +105 -0
- package/dist/shared/types.d.ts +23 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +9 -0
- package/package.json +75 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Axe-Fx II block ID dictionary (generated).
|
|
3
|
+
*
|
|
4
|
+
* Source: Fractal Audio Wiki "MIDI_SysEx" page, "Axe-Fx II MIDI SysEx:
|
|
5
|
+
* Block IDs" table, cached at
|
|
6
|
+
* `docs/_private/wiki-cache/axe-fx-ii-midi-sysex.html`.
|
|
7
|
+
*
|
|
8
|
+
* Wire context: the Axe-Fx II family addresses each block by its
|
|
9
|
+
* 14-bit `effectId` in the GET/SET_BLOCK_PARAMETER_VALUE message
|
|
10
|
+
* (function `0x02`). Multiple instances of the same block group
|
|
11
|
+
* (e.g. Amp 1 + Amp 2) have distinct ids but share the parameter
|
|
12
|
+
* table — see `KNOWN_PARAMS` in `./params.ts`, keyed by group code.
|
|
13
|
+
*
|
|
14
|
+
* **DO NOT EDIT BY HAND** — regenerate via:
|
|
15
|
+
* npx tsx scripts/extract-axe-fx-ii-params.ts
|
|
16
|
+
*
|
|
17
|
+
* Status: 🟢 hardware-verified on Q8.02 (2026-05-10). HW-076 read
|
|
18
|
+
* the active preset's grid layout (12 blocks across 4 rows × 12
|
|
19
|
+
* columns) and the resolved block IDs matched the device's front-
|
|
20
|
+
* panel display + AxeEdit's rendering. HW-075 then wrote params to
|
|
21
|
+
* Amp 1 and Reverb 1 by ID + saw the audible/visible result — block
|
|
22
|
+
* ID resolution proven end to end. Factory bank file references
|
|
23
|
+
* (`samples/factory/Axe-Fx-II_XL+_Bank-{A,B,C}_Q8p02.syx`) line up
|
|
24
|
+
* with the registry as expected.
|
|
25
|
+
*/
|
|
26
|
+
export interface AxeFxIIBlock {
|
|
27
|
+
/** 14-bit `effectId` used in GET/SET_BLOCK_PARAMETER_VALUE. */
|
|
28
|
+
readonly id: number;
|
|
29
|
+
/** Display name (e.g. "Amp 1", "Reverb 2"). */
|
|
30
|
+
readonly name: string;
|
|
31
|
+
/** 3-letter group code shared by all instances (e.g. "AMP"). */
|
|
32
|
+
readonly groupCode: string;
|
|
33
|
+
/** Whether the block exposes a bypass toggle. */
|
|
34
|
+
readonly canBypass: boolean;
|
|
35
|
+
/** Whether the AX8 floorboard exposes this block. */
|
|
36
|
+
readonly availableOnAX8: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const AXE_FX_II_BLOCKS: readonly AxeFxIIBlock[];
|
|
39
|
+
/** Reverse lookup: effectId → block. */
|
|
40
|
+
export declare const BLOCK_BY_ID: Readonly<Record<number, AxeFxIIBlock>>;
|
|
41
|
+
/** Group code → list of effectIds (in order). e.g. AMP → [106, 107]. */
|
|
42
|
+
export declare const IDS_BY_GROUP: Readonly<Record<string, readonly number[]>>;
|
|
43
|
+
/** Resolve a user-supplied block reference (id or name) to its block. */
|
|
44
|
+
export declare function resolveBlock(input: string | number): AxeFxIIBlock | undefined;
|
|
45
|
+
//# sourceMappingURL=blockTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockTypes.d.ts","sourceRoot":"","sources":["../../src/axe-fx-ii/blockTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,WAAW,YAAY;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,qDAAqD;IACrD,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EAwE1C,CAAC;AAEX,wCAAwC;AACxC,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CACc,CAAC;AAE9E,wEAAwE;AACxE,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAUjE,CAAC;AAOL,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,CAG7E"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Axe-Fx II block ID dictionary (generated).
|
|
3
|
+
*
|
|
4
|
+
* Source: Fractal Audio Wiki "MIDI_SysEx" page, "Axe-Fx II MIDI SysEx:
|
|
5
|
+
* Block IDs" table, cached at
|
|
6
|
+
* `docs/_private/wiki-cache/axe-fx-ii-midi-sysex.html`.
|
|
7
|
+
*
|
|
8
|
+
* Wire context: the Axe-Fx II family addresses each block by its
|
|
9
|
+
* 14-bit `effectId` in the GET/SET_BLOCK_PARAMETER_VALUE message
|
|
10
|
+
* (function `0x02`). Multiple instances of the same block group
|
|
11
|
+
* (e.g. Amp 1 + Amp 2) have distinct ids but share the parameter
|
|
12
|
+
* table — see `KNOWN_PARAMS` in `./params.ts`, keyed by group code.
|
|
13
|
+
*
|
|
14
|
+
* **DO NOT EDIT BY HAND** — regenerate via:
|
|
15
|
+
* npx tsx scripts/extract-axe-fx-ii-params.ts
|
|
16
|
+
*
|
|
17
|
+
* Status: 🟢 hardware-verified on Q8.02 (2026-05-10). HW-076 read
|
|
18
|
+
* the active preset's grid layout (12 blocks across 4 rows × 12
|
|
19
|
+
* columns) and the resolved block IDs matched the device's front-
|
|
20
|
+
* panel display + AxeEdit's rendering. HW-075 then wrote params to
|
|
21
|
+
* Amp 1 and Reverb 1 by ID + saw the audible/visible result — block
|
|
22
|
+
* ID resolution proven end to end. Factory bank file references
|
|
23
|
+
* (`samples/factory/Axe-Fx-II_XL+_Bank-{A,B,C}_Q8p02.syx`) line up
|
|
24
|
+
* with the registry as expected.
|
|
25
|
+
*/
|
|
26
|
+
export const AXE_FX_II_BLOCKS = [
|
|
27
|
+
{ id: 100, name: "Compressor 1", groupCode: "CPR", canBypass: true, availableOnAX8: true },
|
|
28
|
+
{ id: 101, name: "Compressor 2", groupCode: "CPR", canBypass: true, availableOnAX8: false },
|
|
29
|
+
{ id: 102, name: "Graphic EQ 1", groupCode: "GEQ", canBypass: true, availableOnAX8: true },
|
|
30
|
+
{ id: 103, name: "Graphic EQ 2", groupCode: "GEQ", canBypass: true, availableOnAX8: true },
|
|
31
|
+
{ id: 104, name: "Parametric EQ 1", groupCode: "PEQ", canBypass: true, availableOnAX8: true },
|
|
32
|
+
{ id: 105, name: "Parametric EQ 2", groupCode: "PEQ", canBypass: true, availableOnAX8: true },
|
|
33
|
+
{ id: 106, name: "Amp 1", groupCode: "AMP", canBypass: true, availableOnAX8: true },
|
|
34
|
+
{ id: 107, name: "Amp 2", groupCode: "AMP", canBypass: true, availableOnAX8: false },
|
|
35
|
+
{ id: 108, name: "Cab 1", groupCode: "CAB", canBypass: true, availableOnAX8: true },
|
|
36
|
+
{ id: 109, name: "Cab 2", groupCode: "CAB", canBypass: true, availableOnAX8: false },
|
|
37
|
+
{ id: 110, name: "Reverb 1", groupCode: "REV", canBypass: true, availableOnAX8: true },
|
|
38
|
+
{ id: 111, name: "Reverb 2", groupCode: "REV", canBypass: true, availableOnAX8: false },
|
|
39
|
+
{ id: 112, name: "Delay 1", groupCode: "DLY", canBypass: true, availableOnAX8: true },
|
|
40
|
+
{ id: 113, name: "Delay 2", groupCode: "DLY", canBypass: true, availableOnAX8: true },
|
|
41
|
+
{ id: 114, name: "Multi Delay 1", groupCode: "MTD", canBypass: true, availableOnAX8: true },
|
|
42
|
+
{ id: 115, name: "Multi Delay 2", groupCode: "MTD", canBypass: true, availableOnAX8: false },
|
|
43
|
+
{ id: 116, name: "Chorus 1", groupCode: "CHO", canBypass: true, availableOnAX8: true },
|
|
44
|
+
{ id: 117, name: "Chorus 2", groupCode: "CHO", canBypass: true, availableOnAX8: false },
|
|
45
|
+
{ id: 118, name: "Flanger 1", groupCode: "FLG", canBypass: true, availableOnAX8: true },
|
|
46
|
+
{ id: 119, name: "Flanger 2", groupCode: "FLG", canBypass: true, availableOnAX8: false },
|
|
47
|
+
{ id: 120, name: "Rotary Speaker 1", groupCode: "ROT", canBypass: true, availableOnAX8: true },
|
|
48
|
+
{ id: 121, name: "Rotary Speaker 2", groupCode: "ROT", canBypass: true, availableOnAX8: false },
|
|
49
|
+
{ id: 122, name: "Phaser 1", groupCode: "PHA", canBypass: true, availableOnAX8: true },
|
|
50
|
+
{ id: 123, name: "Phaser 2", groupCode: "PHA", canBypass: true, availableOnAX8: false },
|
|
51
|
+
{ id: 124, name: "Wah 1", groupCode: "WAH", canBypass: true, availableOnAX8: true },
|
|
52
|
+
{ id: 125, name: "Wah 2", groupCode: "WAH", canBypass: true, availableOnAX8: false },
|
|
53
|
+
{ id: 126, name: "Formant", groupCode: "FRM", canBypass: true, availableOnAX8: true },
|
|
54
|
+
{ id: 127, name: "Volume/Pan 1", groupCode: "VOL", canBypass: true, availableOnAX8: true },
|
|
55
|
+
{ id: 128, name: "Tremolo/Panner 1", groupCode: "TRM", canBypass: true, availableOnAX8: true },
|
|
56
|
+
{ id: 129, name: "Tremolo/Panner 2", groupCode: "TRM", canBypass: true, availableOnAX8: false },
|
|
57
|
+
{ id: 130, name: "Pitch 1", groupCode: "PIT", canBypass: true, availableOnAX8: true },
|
|
58
|
+
{ id: 131, name: "Filter 1", groupCode: "FIL", canBypass: true, availableOnAX8: true },
|
|
59
|
+
{ id: 132, name: "Filter 2", groupCode: "FIL", canBypass: true, availableOnAX8: true },
|
|
60
|
+
{ id: 133, name: "Drive 1", groupCode: "DRV", canBypass: true, availableOnAX8: true },
|
|
61
|
+
{ id: 134, name: "Drive 2", groupCode: "DRV", canBypass: true, availableOnAX8: true },
|
|
62
|
+
{ id: 135, name: "Enhancer", groupCode: "ENH", canBypass: true, availableOnAX8: true },
|
|
63
|
+
{ id: 136, name: "FX Loop", groupCode: "FXL", canBypass: true, availableOnAX8: true },
|
|
64
|
+
{ id: 137, name: "Mixer", groupCode: "MIX", canBypass: false, availableOnAX8: false },
|
|
65
|
+
{ id: 138, name: "Mixer 2", groupCode: "MIX", canBypass: false, availableOnAX8: false },
|
|
66
|
+
{ id: 139, name: "Input Noise Gate", groupCode: "INPUT", canBypass: false, availableOnAX8: true },
|
|
67
|
+
{ id: 140, name: "Output", groupCode: "OUTPUT", canBypass: false, availableOnAX8: true },
|
|
68
|
+
{ id: 141, name: "Controllers", groupCode: "CONTROLLERS", canBypass: false, availableOnAX8: true },
|
|
69
|
+
{ id: 142, name: "Feedback Send", groupCode: "SND", canBypass: false, availableOnAX8: false },
|
|
70
|
+
{ id: 143, name: "Feedback Return", groupCode: "RTN", canBypass: false, availableOnAX8: false },
|
|
71
|
+
{ id: 144, name: "Synth 1", groupCode: "SYN", canBypass: true, availableOnAX8: true },
|
|
72
|
+
{ id: 145, name: "Synth 2", groupCode: "SYN", canBypass: true, availableOnAX8: false },
|
|
73
|
+
{ id: 146, name: "Vocoder", groupCode: "VOC", canBypass: true, availableOnAX8: false },
|
|
74
|
+
{ id: 147, name: "Megatap Delay", groupCode: "MGT", canBypass: true, availableOnAX8: false },
|
|
75
|
+
{ id: 148, name: "Crossover 1", groupCode: "XVR", canBypass: true, availableOnAX8: false },
|
|
76
|
+
{ id: 149, name: "Crossover 2", groupCode: "XVR", canBypass: true, availableOnAX8: false },
|
|
77
|
+
{ id: 150, name: "Gate Expander", groupCode: "GTE", canBypass: true, availableOnAX8: true },
|
|
78
|
+
{ id: 151, name: "Gate Expander 2", groupCode: "GTE", canBypass: true, availableOnAX8: false },
|
|
79
|
+
{ id: 152, name: "Ring Modulator", groupCode: "RNG", canBypass: true, availableOnAX8: true },
|
|
80
|
+
{ id: 153, name: "Pitch 2", groupCode: "PIT", canBypass: true, availableOnAX8: false },
|
|
81
|
+
{ id: 154, name: "Multiband Compressor 1", groupCode: "MBC", canBypass: true, availableOnAX8: false },
|
|
82
|
+
{ id: 155, name: "Multiband Compressor 2", groupCode: "MBC", canBypass: true, availableOnAX8: false },
|
|
83
|
+
{ id: 156, name: "Quad Chorus 1", groupCode: "QCH", canBypass: true, availableOnAX8: false },
|
|
84
|
+
{ id: 157, name: "Quad Chorus 2", groupCode: "QCH", canBypass: true, availableOnAX8: false },
|
|
85
|
+
{ id: 158, name: "Resonator 1", groupCode: "RES", canBypass: true, availableOnAX8: false },
|
|
86
|
+
{ id: 159, name: "Resonator 2", groupCode: "RES", canBypass: true, availableOnAX8: false },
|
|
87
|
+
{ id: 160, name: "Graphic EQ 3", groupCode: "GEQ", canBypass: true, availableOnAX8: false },
|
|
88
|
+
{ id: 161, name: "Graphic EQ 4", groupCode: "GEQ", canBypass: true, availableOnAX8: false },
|
|
89
|
+
{ id: 162, name: "Parametric EQ 3", groupCode: "PEQ", canBypass: true, availableOnAX8: false },
|
|
90
|
+
{ id: 163, name: "Parametric EQ 4", groupCode: "PEQ", canBypass: true, availableOnAX8: false },
|
|
91
|
+
{ id: 164, name: "Filter 3", groupCode: "FIL", canBypass: true, availableOnAX8: false },
|
|
92
|
+
{ id: 165, name: "Filter 4", groupCode: "FIL", canBypass: true, availableOnAX8: false },
|
|
93
|
+
{ id: 166, name: "Volume/Pan 2", groupCode: "VOL", canBypass: true, availableOnAX8: true },
|
|
94
|
+
{ id: 167, name: "Volume/Pan 3", groupCode: "VOL", canBypass: true, availableOnAX8: false },
|
|
95
|
+
{ id: 168, name: "Volume/Pan 4", groupCode: "VOL", canBypass: true, availableOnAX8: false },
|
|
96
|
+
{ id: 169, name: "Looper", groupCode: "LPR", canBypass: true, availableOnAX8: true },
|
|
97
|
+
{ id: 170, name: "Tone Match", groupCode: "TMA", canBypass: true, availableOnAX8: false },
|
|
98
|
+
];
|
|
99
|
+
/** Reverse lookup: effectId → block. */
|
|
100
|
+
export const BLOCK_BY_ID = Object.freeze(Object.fromEntries(AXE_FX_II_BLOCKS.map((b) => [b.id, b])));
|
|
101
|
+
/** Group code → list of effectIds (in order). e.g. AMP → [106, 107]. */
|
|
102
|
+
export const IDS_BY_GROUP = (() => {
|
|
103
|
+
const out = {};
|
|
104
|
+
for (const b of AXE_FX_II_BLOCKS) {
|
|
105
|
+
(out[b.groupCode] ??= []).push(b.id);
|
|
106
|
+
}
|
|
107
|
+
return Object.freeze(Object.fromEntries(Object.entries(out).map(([k, v]) => [k, Object.freeze(v.slice())])));
|
|
108
|
+
})();
|
|
109
|
+
/** Block name (e.g. "Amp 1") → block. Case-insensitive. */
|
|
110
|
+
const NAMES_BY_LOWER = Object.fromEntries(AXE_FX_II_BLOCKS.map((b) => [b.name.toLowerCase(), b]));
|
|
111
|
+
/** Resolve a user-supplied block reference (id or name) to its block. */
|
|
112
|
+
export function resolveBlock(input) {
|
|
113
|
+
if (typeof input === 'number')
|
|
114
|
+
return BLOCK_BY_ID[input];
|
|
115
|
+
return NAMES_BY_LOWER[input.trim().toLowerCase()];
|
|
116
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/axe-fx-ii/index.ts"],"names":[],"mappings":"AAeA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Barrel for fractal-midi/axe-fx-ii.
|
|
2
|
+
//
|
|
3
|
+
// Public surface for Axe-Fx II family data + codec. The II family uses
|
|
4
|
+
// a different wire envelope from the AM4 (function 0x02 GET/SET_BLOCK_
|
|
5
|
+
// PARAMETER_VALUE with 16-bit values packed across three 7-bit septets,
|
|
6
|
+
// vs. the AM4's function 0x01 with 14-bit pidLow/pidHigh + 32-bit float
|
|
7
|
+
// payload). The codec is independent — don't expect AM4 builders to
|
|
8
|
+
// interoperate.
|
|
9
|
+
//
|
|
10
|
+
// Hardware-verified on Axe-Fx II XL+ firmware Quantum 8.02.
|
|
11
|
+
//
|
|
12
|
+
// We re-export everything from each underlying module so this barrel
|
|
13
|
+
// can grow without churn as new helpers land. Curate later if a name
|
|
14
|
+
// conflict surfaces.
|
|
15
|
+
export * from './params.js';
|
|
16
|
+
export * from './blockTypes.js';
|
|
17
|
+
export * from './paramAliases.js';
|
|
18
|
+
export * from './setParam.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Axe-Fx II — param-name fuzzy resolution.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for every code path that resolves a user-typed
|
|
5
|
+
* param name to the device's canonical wire param. Three layers, tried
|
|
6
|
+
* in order:
|
|
7
|
+
*
|
|
8
|
+
* 1. **Exact canonical match** — `name === userInput.toLowerCase()`.
|
|
9
|
+
* Fast path; hits 90%+ of well-formed agent calls.
|
|
10
|
+
*
|
|
11
|
+
* 2. **Normalized fuzzy match against display fields.** User input is
|
|
12
|
+
* normalized to lowercase snake_case (`"Input Drive"`, `"INPUT
|
|
13
|
+
* DRIVE"`, `"input-drive"` all → `"input_drive"`); then compared
|
|
14
|
+
* against each param's canonical `name`, plus the human-display
|
|
15
|
+
* fields `wikiName` (e.g. `"INPUT DRIVE"`), `xmlLabel` (e.g.
|
|
16
|
+
* `"Input Drive"`), and `parameterName` (firmware name, e.g.
|
|
17
|
+
* `"DISTORT_DRIVE"`). Free coverage for anyone who types what they
|
|
18
|
+
* see in AxeEdit.
|
|
19
|
+
*
|
|
20
|
+
* 3. **Per-group hardcoded English aliases.** For the cases where the
|
|
21
|
+
* common English word doesn't match any of the device's labels —
|
|
22
|
+
* `"gain"` on amp (canonical `input_drive`), `"master"`
|
|
23
|
+
* (`master_volume`), `"mid"` (`middle`).
|
|
24
|
+
*
|
|
25
|
+
* Used by both the legacy `axefx2_*` tool surface (`tools/shared.ts`,
|
|
26
|
+
* `tools/applyExecutor.ts`) and the unified-surface descriptor
|
|
27
|
+
* (`descriptor/writer.ts`, `descriptor/reader.ts`). Updating this file
|
|
28
|
+
* updates both surfaces — no cross-module sync drift.
|
|
29
|
+
*/
|
|
30
|
+
import { type AxeFxIIParam } from './params.js';
|
|
31
|
+
import type { AxeFxIIBlock } from './blockTypes.js';
|
|
32
|
+
/**
|
|
33
|
+
* Per-block-group aliases for common English param names that don't
|
|
34
|
+
* appear in any of the device's own labels. Add an entry here ONLY when
|
|
35
|
+
* the canonical word the user reaches for is genuinely absent from the
|
|
36
|
+
* param's `name` / `wikiName` / `xmlLabel` / `parameterName` — fuzzy
|
|
37
|
+
* normalization covers most cases for free.
|
|
38
|
+
*
|
|
39
|
+
* Scoped per group code so the same English word can resolve differently
|
|
40
|
+
* across blocks. "gain" on AMP → `input_drive`, but "gain" on DRV is
|
|
41
|
+
* already the canonical name (no alias entry needed there).
|
|
42
|
+
*/
|
|
43
|
+
export declare const PARAM_ALIASES_AXEFX2: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
44
|
+
/**
|
|
45
|
+
* Resolve a user-supplied param name (string) to its `AxeFxIIParam`
|
|
46
|
+
* within the given block's group, applying the three-layer cascade
|
|
47
|
+
* above. Returns `undefined` if nothing matches at any layer.
|
|
48
|
+
*
|
|
49
|
+
* `block` is the resolved `AxeFxIIBlock` (e.g. Amp 1), not a raw string;
|
|
50
|
+
* the group code drives both the candidate filter and the alias-table
|
|
51
|
+
* key.
|
|
52
|
+
*/
|
|
53
|
+
export declare function findParamFuzzy(block: AxeFxIIBlock, userInput: string): AxeFxIIParam | undefined;
|
|
54
|
+
//# sourceMappingURL=paramAliases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paramAliases.d.ts","sourceRoot":"","sources":["../../src/axe-fx-ii/paramAliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CA6C3F,CAAC;AAkBF;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CA+B/F"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Axe-Fx II — param-name fuzzy resolution.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for every code path that resolves a user-typed
|
|
5
|
+
* param name to the device's canonical wire param. Three layers, tried
|
|
6
|
+
* in order:
|
|
7
|
+
*
|
|
8
|
+
* 1. **Exact canonical match** — `name === userInput.toLowerCase()`.
|
|
9
|
+
* Fast path; hits 90%+ of well-formed agent calls.
|
|
10
|
+
*
|
|
11
|
+
* 2. **Normalized fuzzy match against display fields.** User input is
|
|
12
|
+
* normalized to lowercase snake_case (`"Input Drive"`, `"INPUT
|
|
13
|
+
* DRIVE"`, `"input-drive"` all → `"input_drive"`); then compared
|
|
14
|
+
* against each param's canonical `name`, plus the human-display
|
|
15
|
+
* fields `wikiName` (e.g. `"INPUT DRIVE"`), `xmlLabel` (e.g.
|
|
16
|
+
* `"Input Drive"`), and `parameterName` (firmware name, e.g.
|
|
17
|
+
* `"DISTORT_DRIVE"`). Free coverage for anyone who types what they
|
|
18
|
+
* see in AxeEdit.
|
|
19
|
+
*
|
|
20
|
+
* 3. **Per-group hardcoded English aliases.** For the cases where the
|
|
21
|
+
* common English word doesn't match any of the device's labels —
|
|
22
|
+
* `"gain"` on amp (canonical `input_drive`), `"master"`
|
|
23
|
+
* (`master_volume`), `"mid"` (`middle`).
|
|
24
|
+
*
|
|
25
|
+
* Used by both the legacy `axefx2_*` tool surface (`tools/shared.ts`,
|
|
26
|
+
* `tools/applyExecutor.ts`) and the unified-surface descriptor
|
|
27
|
+
* (`descriptor/writer.ts`, `descriptor/reader.ts`). Updating this file
|
|
28
|
+
* updates both surfaces — no cross-module sync drift.
|
|
29
|
+
*/
|
|
30
|
+
import { KNOWN_PARAMS } from './params.js';
|
|
31
|
+
/**
|
|
32
|
+
* Per-block-group aliases for common English param names that don't
|
|
33
|
+
* appear in any of the device's own labels. Add an entry here ONLY when
|
|
34
|
+
* the canonical word the user reaches for is genuinely absent from the
|
|
35
|
+
* param's `name` / `wikiName` / `xmlLabel` / `parameterName` — fuzzy
|
|
36
|
+
* normalization covers most cases for free.
|
|
37
|
+
*
|
|
38
|
+
* Scoped per group code so the same English word can resolve differently
|
|
39
|
+
* across blocks. "gain" on AMP → `input_drive`, but "gain" on DRV is
|
|
40
|
+
* already the canonical name (no alias entry needed there).
|
|
41
|
+
*/
|
|
42
|
+
export const PARAM_ALIASES_AXEFX2 = {
|
|
43
|
+
AMP: {
|
|
44
|
+
gain: 'input_drive',
|
|
45
|
+
master: 'master_volume',
|
|
46
|
+
mid: 'middle',
|
|
47
|
+
},
|
|
48
|
+
DRV: {
|
|
49
|
+
// The Drive block's gain knob is `gain` on Axe-Fx II, `drive` on
|
|
50
|
+
// AM4. Cross-device users (and any agent who learned the AM4 naming
|
|
51
|
+
// first) reach for "drive" on the Drive block — accept it as an
|
|
52
|
+
// alias here. Also `level` → `volume` (common pedal-output naming).
|
|
53
|
+
drive: 'gain',
|
|
54
|
+
level: 'volume',
|
|
55
|
+
},
|
|
56
|
+
REV: {
|
|
57
|
+
// Reverb decay/length both map to time (canonical Fractal name).
|
|
58
|
+
// Mirrors AM4's PARAM_ALIASES entries.
|
|
59
|
+
decay: 'time',
|
|
60
|
+
length: 'time',
|
|
61
|
+
// Axe-Fx II's canonical name is the unspaced "predelay" — the
|
|
62
|
+
// alias direction here covers users who type "pre_delay" (which
|
|
63
|
+
// would normalize to "pre_delay" and not match) or "Pre Delay".
|
|
64
|
+
pre_delay: 'predelay',
|
|
65
|
+
},
|
|
66
|
+
DLY: {
|
|
67
|
+
// Strymon/Eventide convention: "repeats" instead of "feedback".
|
|
68
|
+
repeats: 'feedback',
|
|
69
|
+
length: 'time',
|
|
70
|
+
},
|
|
71
|
+
CHO: {
|
|
72
|
+
// Boss/MXR convention for modulation rate.
|
|
73
|
+
speed: 'rate',
|
|
74
|
+
},
|
|
75
|
+
FLG: {
|
|
76
|
+
speed: 'rate',
|
|
77
|
+
},
|
|
78
|
+
PHA: {
|
|
79
|
+
speed: 'rate',
|
|
80
|
+
},
|
|
81
|
+
TRM: {
|
|
82
|
+
speed: 'rate',
|
|
83
|
+
},
|
|
84
|
+
// Reverb/Delay/Chorus canonical-name knobs (mix, level, time, etc.)
|
|
85
|
+
// are already common English — fuzzy normalization handles capitalization
|
|
86
|
+
// and separators ("Mix" → "mix", "PRE DELAY" → "pre_delay").
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Normalize a param-name candidate for fuzzy matching. Lower-cases,
|
|
90
|
+
* collapses any run of non-alphanumeric characters to a single `_`, and
|
|
91
|
+
* trims leading/trailing underscores.
|
|
92
|
+
*
|
|
93
|
+
* Examples:
|
|
94
|
+
* "Input Drive" → "input_drive"
|
|
95
|
+
* "INPUT DRIVE" → "input_drive"
|
|
96
|
+
* "input-drive" → "input_drive"
|
|
97
|
+
* "Speaker\nDrive" → "speaker_drive" (xmlLabel for speaker_drive)
|
|
98
|
+
* "DISTORT_DRIVE" → "distort_drive"
|
|
99
|
+
*/
|
|
100
|
+
function normalize(s) {
|
|
101
|
+
return s.trim().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/^_+|_+$/g, '');
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Resolve a user-supplied param name (string) to its `AxeFxIIParam`
|
|
105
|
+
* within the given block's group, applying the three-layer cascade
|
|
106
|
+
* above. Returns `undefined` if nothing matches at any layer.
|
|
107
|
+
*
|
|
108
|
+
* `block` is the resolved `AxeFxIIBlock` (e.g. Amp 1), not a raw string;
|
|
109
|
+
* the group code drives both the candidate filter and the alias-table
|
|
110
|
+
* key.
|
|
111
|
+
*/
|
|
112
|
+
export function findParamFuzzy(block, userInput) {
|
|
113
|
+
const groupUpper = block.groupCode.toUpperCase();
|
|
114
|
+
const candidates = [];
|
|
115
|
+
for (const p of Object.values(KNOWN_PARAMS)) {
|
|
116
|
+
if (p.groupCode === groupUpper)
|
|
117
|
+
candidates.push(p);
|
|
118
|
+
}
|
|
119
|
+
// Layer 1: exact canonical match (fast path).
|
|
120
|
+
const lower = userInput.trim().toLowerCase();
|
|
121
|
+
for (const p of candidates) {
|
|
122
|
+
if (p.name === lower)
|
|
123
|
+
return p;
|
|
124
|
+
}
|
|
125
|
+
// Layer 2: normalized fuzzy match against display fields.
|
|
126
|
+
const normalizedInput = normalize(userInput);
|
|
127
|
+
for (const p of candidates) {
|
|
128
|
+
if (normalize(p.name) === normalizedInput)
|
|
129
|
+
return p;
|
|
130
|
+
if (p.wikiName && normalize(p.wikiName) === normalizedInput)
|
|
131
|
+
return p;
|
|
132
|
+
if (p.xmlLabel && normalize(p.xmlLabel) === normalizedInput)
|
|
133
|
+
return p;
|
|
134
|
+
if (p.parameterName && normalize(p.parameterName) === normalizedInput)
|
|
135
|
+
return p;
|
|
136
|
+
}
|
|
137
|
+
// Layer 3: per-group hardcoded English alias.
|
|
138
|
+
const aliasTarget = PARAM_ALIASES_AXEFX2[groupUpper]?.[lower];
|
|
139
|
+
if (aliasTarget !== undefined) {
|
|
140
|
+
for (const p of candidates) {
|
|
141
|
+
if (p.name === aliasTarget)
|
|
142
|
+
return p;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|