@audiofab-io/fv1-core 0.6.1 → 0.6.2

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.
Files changed (59) hide show
  1. package/blocks/ATL_DEVELOPER_REFERENCE.md +156 -156
  2. package/blocks/control/constant.atl +36 -36
  3. package/blocks/control/entropy_lfo.atl +74 -74
  4. package/blocks/control/envelope.atl +120 -120
  5. package/blocks/control/invert.atl +33 -33
  6. package/blocks/control/pot.atl +149 -149
  7. package/blocks/control/power.atl +76 -76
  8. package/blocks/control/ramp_lfo.atl +122 -122
  9. package/blocks/control/scale_offset.atl +84 -84
  10. package/blocks/control/sincos_lfo.atl +126 -126
  11. package/blocks/control/smoother.atl +48 -48
  12. package/blocks/control/tremolizer.atl +54 -54
  13. package/blocks/effects/delay/micro_stutter.atl +77 -77
  14. package/blocks/effects/delay/mn3011.atl +280 -280
  15. package/blocks/effects/delay/simple_delay.atl +96 -96
  16. package/blocks/effects/delay/triple_tap_delay.atl +176 -176
  17. package/blocks/effects/lo-fi/bit_mangler.atl +74 -74
  18. package/blocks/effects/lo-fi/chiptune.atl +311 -311
  19. package/blocks/effects/lo-fi/tape_degrade.atl +181 -181
  20. package/blocks/effects/modulation/chorus.atl +141 -141
  21. package/blocks/effects/modulation/chorus_4voice.atl +188 -188
  22. package/blocks/effects/modulation/flanger.atl +184 -184
  23. package/blocks/effects/modulation/harmonic_trem.atl +129 -129
  24. package/blocks/effects/modulation/phaser.atl +299 -299
  25. package/blocks/effects/pitch/octave_up_down.atl +80 -80
  26. package/blocks/effects/pitch/pitch_offset.atl +149 -149
  27. package/blocks/effects/pitch/pitch_offset_dual.atl +197 -197
  28. package/blocks/effects/pitch/pitch_shift.atl +115 -115
  29. package/blocks/effects/pitch/sub_octave.atl +100 -100
  30. package/blocks/effects/reverb/ducking_reverb.atl +145 -145
  31. package/blocks/effects/reverb/min_reverb.atl +132 -132
  32. package/blocks/effects/reverb/plate_reverb.atl +344 -344
  33. package/blocks/effects/reverb/room_reverb.atl +293 -293
  34. package/blocks/effects/reverb/smear.atl +90 -90
  35. package/blocks/effects/reverb/spring_reverb.atl +353 -353
  36. package/blocks/filter/1p_high_pass.atl +62 -62
  37. package/blocks/filter/1p_low_pass.atl +58 -58
  38. package/blocks/filter/auto_wah.atl +207 -207
  39. package/blocks/filter/bbd_loss.atl +79 -79
  40. package/blocks/filter/shelving_high_pass.atl +76 -76
  41. package/blocks/filter/shelving_low_pass.atl +76 -76
  42. package/blocks/filter/svf_2p.atl +116 -116
  43. package/blocks/gain_mix/crossfade.atl +93 -93
  44. package/blocks/gain_mix/crossfade2.atl +86 -86
  45. package/blocks/gain_mix/crossfade3.atl +71 -71
  46. package/blocks/gain_mix/gainboost.atl +54 -54
  47. package/blocks/gain_mix/mixer2.atl +76 -76
  48. package/blocks/gain_mix/mixer3.atl +109 -109
  49. package/blocks/gain_mix/mixer4.atl +151 -151
  50. package/blocks/gain_mix/volume.atl +50 -50
  51. package/blocks/io/adc.atl +53 -53
  52. package/blocks/io/dac.atl +61 -61
  53. package/blocks/other/stickynote.atl +24 -24
  54. package/blocks/other/tone_gen_adjustable.atl +137 -137
  55. package/blocks/other/tone_gen_fixed.atl +109 -109
  56. package/dist/blockDiagram/builtinBlocks.js +107 -107
  57. package/dist/blockDiagram/builtinBlocks.js.map +1 -1
  58. package/dist/simulator/FV1Simulator.js +1 -1
  59. package/package.json +1 -1
@@ -1,300 +1,300 @@
1
- ---
2
- {
3
- "type": "effects.modulation.phaser",
4
- "category": "Effects",
5
- "subcategory": "Modulation",
6
- "name": "Phaser",
7
- "description": "Multi-stage phaser with internal SIN1 LFO or external CV control. Produces the classic sweeping notch effect by cascading first-order all-pass filters.",
8
- "color": "#00ffff",
9
- "labelTemplate": "${param.lfoSel == 0 ? 'SIN0' : 'SIN1'}",
10
- "inputs": [
11
- {
12
- "id": "audio_input",
13
- "name": "Audio Input",
14
- "type": "audio",
15
- "required": true
16
- },
17
- {
18
- "id": "lfo_speed",
19
- "name": "LFO Speed",
20
- "type": "control",
21
- "required": false,
22
- "parameter": "rate"
23
- },
24
- {
25
- "id": "lfo_width",
26
- "name": "LFO Width",
27
- "type": "control",
28
- "required": false,
29
- "parameter": "depth"
30
- },
31
- {
32
- "id": "phase_cv",
33
- "name": "Phase CV",
34
- "type": "control",
35
- "required": false,
36
- "parameter": "depth"
37
- }
38
- ],
39
- "outputs": [
40
- {
41
- "id": "mix_out",
42
- "name": "Mix Out",
43
- "type": "audio"
44
- },
45
- {
46
- "id": "wet_out",
47
- "name": "Wet Out",
48
- "type": "audio"
49
- }
50
- ],
51
- "parameters": [
52
- {
53
- "id": "lfoSel",
54
- "name": "LFO Selection",
55
- "type": "select",
56
- "default": 0,
57
- "options": [
58
- { "value": 0, "label": "SIN0" },
59
- { "value": 1, "label": "SIN1" }
60
- ],
61
- "description": "Which SIN oscillator to use (0 or 1)."
62
- },
63
- {
64
- "id": "rate",
65
- "name": "LFO Rate",
66
- "type": "number",
67
- "default": 1.0,
68
- "min": 0.05,
69
- "max": 10.0,
70
- "step": 0.01,
71
- "conversion": "HZ_TO_LFO_RATE",
72
- "description": "Speed of the internal SIN1 modulation LFO."
73
- },
74
- {
75
- "id": "depth",
76
- "name": "Modulation Depth",
77
- "type": "number",
78
- "default": 0.25,
79
- "min": 0.0,
80
- "max": 1.0,
81
- "step": 0.01,
82
- "description": "Depth of the phase sweep."
83
- },
84
- {
85
- "id": "stages",
86
- "name": "Stages",
87
- "type": "select",
88
- "default": 2,
89
- "options": [
90
- { "label": "2 Stages", "value": 1 },
91
- { "label": "4 Stages", "value": 2 },
92
- { "label": "6 Stages", "value": 3 },
93
- { "label": "8 Stages", "value": 4 },
94
- { "label": "10 Stages", "value": 5 }
95
- ],
96
- "description": "Number of all-pass stages. More stages create more notches in the spectrum."
97
- },
98
- {
99
- "id": "mode",
100
- "name": "Control Mode",
101
- "type": "select",
102
- "default": 0,
103
- "options": [
104
- { "label": "Internal LFO", "value": 0 },
105
- { "label": "Manual / Phase CV", "value": 1 }
106
- ],
107
- "description": "Source of phase modulation."
108
- }
109
- ],
110
- "registers": [
111
- "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10",
112
- "temp", "temp1", "phaseReg", "depthReg", "wet"
113
- ]
114
- }
115
- ---
116
- ; Phaser
117
- ; Based on PhaserCADBlock.java
118
- @if ${param.lfoSel} == 0
119
- @equals lfoNum SIN0
120
- @equals lfoRateReg SIN0_RATE
121
- @else
122
- @equals lfoNum SIN1
123
- @equals lfoRateReg SIN1_RATE
124
- @endif
125
-
126
-
127
- @section init
128
- @if isequalto mode 0
129
- skp run, done_lfo
130
- wlds ${lfoNum}, ${param.rate}, 32767
131
- done_lfo:
132
- @endif
133
-
134
- @section main
135
- @if pinConnected(audio_input)
136
-
137
- ; --- Phase Coefficient Setup ---
138
- @if isequalto mode 0
139
- ; Internal LFO Configuration
140
- @if pinConnected(lfo_speed)
141
- rdax ${input.lfo_speed}, ${rate} / 511.0
142
- wrax ${lfoRateReg}, 0.0
143
- @endif
144
- @if pinConnected(lfo_width)
145
- @cv lfo_width
146
- wrax ${reg.depthReg}, 0.0
147
- @else
148
- sof 0.0, ${param.depth}
149
- wrax ${reg.depthReg}, 0.0
150
- @endif
151
-
152
- cho rdal, ${lfoNum}
153
- sof 0.5, 0.5 ; Map -1..1 to 0..1
154
- ; Nonlinear sweep approximation
155
- sof 1.0, -0.5 ; Center at 0.5
156
- sof 1.999, 0.0 ; Expand to -1..1
157
- mulx ${reg.depthReg} ; Scale by depth
158
- sof 0.15, 0.83 ; Map to all-pass stable range [0.83, 0.98]
159
- wrax ${reg.phaseReg}, 0.0
160
- @else
161
- ; External Manual CV
162
- @cv phase_cv
163
- sof 0.15, 0.83 ; Map CV [0..1] to [0.83, 0.98]
164
- wrax ${reg.phaseReg}, 0.0
165
- @endif
166
-
167
- ; --- All-pass Filter Chain ---
168
- ; Use 1/64 attenuation to maintain headroom through the cascade
169
- rdax ${input.audio_input}, 0.015625
170
- wrax ${reg.temp}, 0.0 ; Input to first stage
171
-
172
- ; Stage 1
173
- rdax ${reg.temp}, 1.0
174
- wrax ${reg.temp1}, 0.0
175
- rdax ${reg.p1}, 1.0
176
- wrax ${reg.temp}, 1.0
177
- mulx ${reg.phaseReg}
178
- rdax ${reg.temp1}, 1.0
179
- wrax ${reg.p1}, -1.0
180
- mulx ${reg.phaseReg}
181
-
182
- ; Stage 2
183
- rdax ${reg.temp}, 1.0
184
- wrax ${reg.temp1}, 0.0
185
- rdax ${reg.p2}, 1.0
186
- wrax ${reg.temp}, 1.0
187
- mulx ${reg.phaseReg}
188
- rdax ${reg.temp1}, 1.0
189
- wrax ${reg.p2}, -1.0
190
- mulx ${reg.phaseReg}
191
-
192
- ; Stage 3 & 4
193
- @if stages >= 2
194
- rdax ${reg.temp}, 1.0
195
- wrax ${reg.temp1}, 0.0
196
- rdax ${reg.p3}, 1.0
197
- wrax ${reg.temp}, 1.0
198
- mulx ${reg.phaseReg}
199
- rdax ${reg.temp1}, 1.0
200
- wrax ${reg.p3}, -1.0
201
- mulx ${reg.phaseReg}
202
-
203
- rdax ${reg.temp}, 1.0
204
- wrax ${reg.temp1}, 0.0
205
- rdax ${reg.p4}, 1.0
206
- wrax ${reg.temp}, 1.0
207
- mulx ${reg.phaseReg}
208
- rdax ${reg.temp1}, 1.0
209
- wrax ${reg.p4}, -1.0
210
- mulx ${reg.phaseReg}
211
- @endif
212
-
213
- ; Stage 5 & 6
214
- @if stages >= 3
215
- rdax ${reg.temp}, 1.0
216
- wrax ${reg.temp1}, 0.0
217
- rdax ${reg.p5}, 1.0
218
- wrax ${reg.temp}, 1.0
219
- mulx ${reg.phaseReg}
220
- rdax ${reg.temp1}, 1.0
221
- wrax ${reg.p5}, -1.0
222
- mulx ${reg.phaseReg}
223
-
224
- rdax ${reg.temp}, 1.0
225
- wrax ${reg.temp1}, 0.0
226
- rdax ${reg.p6}, 1.0
227
- wrax ${reg.temp}, 1.0
228
- mulx ${reg.phaseReg}
229
- rdax ${reg.temp1}, 1.0
230
- wrax ${reg.p6}, -1.0
231
- mulx ${reg.phaseReg}
232
- @endif
233
-
234
- ; Stage 7 & 8
235
- @if stages >= 4
236
- rdax ${reg.temp}, 1.0
237
- wrax ${reg.temp1}, 0.0
238
- rdax ${reg.p7}, 1.0
239
- wrax ${reg.temp}, 1.0
240
- mulx ${reg.phaseReg}
241
- rdax ${reg.temp1}, 1.0
242
- wrax ${reg.p7}, -1.0
243
- mulx ${reg.phaseReg}
244
-
245
- rdax ${reg.temp}, 1.0
246
- wrax ${reg.temp1}, 0.0
247
- rdax ${reg.p8}, 1.0
248
- wrax ${reg.temp}, 1.0
249
- mulx ${reg.phaseReg}
250
- rdax ${reg.temp1}, 1.0
251
- wrax ${reg.p8}, -1.0
252
- mulx ${reg.phaseReg}
253
- @endif
254
-
255
- ; Stage 9 & 10
256
- @if stages >= 5
257
- rdax ${reg.temp}, 1.0
258
- wrax ${reg.temp1}, 0.0
259
- rdax ${reg.p9}, 1.0
260
- wrax ${reg.temp}, 1.0
261
- mulx ${reg.phaseReg}
262
- rdax ${reg.temp1}, 1.0
263
- wrax ${reg.p9}, -1.0
264
- mulx ${reg.phaseReg}
265
-
266
- rdax ${reg.temp}, 1.0
267
- wrax ${reg.temp1}, 0.0
268
- rdax ${reg.p10}, 1.0
269
- wrax ${reg.temp}, 1.0
270
- mulx ${reg.phaseReg}
271
- rdax ${reg.temp1}, 1.0
272
- wrax ${reg.p10}, -1.0
273
- mulx ${reg.phaseReg}
274
- @endif
275
-
276
- ; Final Stage Output Load
277
- rdax ${reg.temp}, 1.0
278
-
279
- ; --- Gain Restoration ---
280
- ; Restores the 1/64 attenuation (6 stages of sof -2.0)
281
- sof -2.0, 0.0
282
- sof -2.0, 0.0
283
- sof -2.0, 0.0
284
- sof -2.0, 0.0
285
- sof -2.0, 0.0
286
- sof -2.0, 0.0
287
- wrax ${reg.wet}, 1.0 ; Wet signal in wet register and ACC
288
-
289
- ; --- Output Routing ---
290
- @if pinConnected(mix_out)
291
- rdax ${input.audio_input}, 1.0 ; Dry + Wet
292
- wrax ${output.mix_out}, 0.0
293
- @endif
294
-
295
- @if pinConnected(wet_out)
296
- rdax ${reg.wet}, 1.0
297
- wrax ${output.wet_out}, 0.0
298
- @endif
299
-
1
+ ---
2
+ {
3
+ "type": "effects.modulation.phaser",
4
+ "category": "Effects",
5
+ "subcategory": "Modulation",
6
+ "name": "Phaser",
7
+ "description": "Multi-stage phaser with internal SIN1 LFO or external CV control. Produces the classic sweeping notch effect by cascading first-order all-pass filters.",
8
+ "color": "#00ffff",
9
+ "labelTemplate": "${param.lfoSel == 0 ? 'SIN0' : 'SIN1'}",
10
+ "inputs": [
11
+ {
12
+ "id": "audio_input",
13
+ "name": "Audio Input",
14
+ "type": "audio",
15
+ "required": true
16
+ },
17
+ {
18
+ "id": "lfo_speed",
19
+ "name": "LFO Speed",
20
+ "type": "control",
21
+ "required": false,
22
+ "parameter": "rate"
23
+ },
24
+ {
25
+ "id": "lfo_width",
26
+ "name": "LFO Width",
27
+ "type": "control",
28
+ "required": false,
29
+ "parameter": "depth"
30
+ },
31
+ {
32
+ "id": "phase_cv",
33
+ "name": "Phase CV",
34
+ "type": "control",
35
+ "required": false,
36
+ "parameter": "depth"
37
+ }
38
+ ],
39
+ "outputs": [
40
+ {
41
+ "id": "mix_out",
42
+ "name": "Mix Out",
43
+ "type": "audio"
44
+ },
45
+ {
46
+ "id": "wet_out",
47
+ "name": "Wet Out",
48
+ "type": "audio"
49
+ }
50
+ ],
51
+ "parameters": [
52
+ {
53
+ "id": "lfoSel",
54
+ "name": "LFO Selection",
55
+ "type": "select",
56
+ "default": 0,
57
+ "options": [
58
+ { "value": 0, "label": "SIN0" },
59
+ { "value": 1, "label": "SIN1" }
60
+ ],
61
+ "description": "Which SIN oscillator to use (0 or 1)."
62
+ },
63
+ {
64
+ "id": "rate",
65
+ "name": "LFO Rate",
66
+ "type": "number",
67
+ "default": 1.0,
68
+ "min": 0.05,
69
+ "max": 10.0,
70
+ "step": 0.01,
71
+ "conversion": "HZ_TO_LFO_RATE",
72
+ "description": "Speed of the internal SIN1 modulation LFO."
73
+ },
74
+ {
75
+ "id": "depth",
76
+ "name": "Modulation Depth",
77
+ "type": "number",
78
+ "default": 0.25,
79
+ "min": 0.0,
80
+ "max": 1.0,
81
+ "step": 0.01,
82
+ "description": "Depth of the phase sweep."
83
+ },
84
+ {
85
+ "id": "stages",
86
+ "name": "Stages",
87
+ "type": "select",
88
+ "default": 2,
89
+ "options": [
90
+ { "label": "2 Stages", "value": 1 },
91
+ { "label": "4 Stages", "value": 2 },
92
+ { "label": "6 Stages", "value": 3 },
93
+ { "label": "8 Stages", "value": 4 },
94
+ { "label": "10 Stages", "value": 5 }
95
+ ],
96
+ "description": "Number of all-pass stages. More stages create more notches in the spectrum."
97
+ },
98
+ {
99
+ "id": "mode",
100
+ "name": "Control Mode",
101
+ "type": "select",
102
+ "default": 0,
103
+ "options": [
104
+ { "label": "Internal LFO", "value": 0 },
105
+ { "label": "Manual / Phase CV", "value": 1 }
106
+ ],
107
+ "description": "Source of phase modulation."
108
+ }
109
+ ],
110
+ "registers": [
111
+ "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10",
112
+ "temp", "temp1", "phaseReg", "depthReg", "wet"
113
+ ]
114
+ }
115
+ ---
116
+ ; Phaser
117
+ ; Based on PhaserCADBlock.java
118
+ @if ${param.lfoSel} == 0
119
+ @equals lfoNum SIN0
120
+ @equals lfoRateReg SIN0_RATE
121
+ @else
122
+ @equals lfoNum SIN1
123
+ @equals lfoRateReg SIN1_RATE
124
+ @endif
125
+
126
+
127
+ @section init
128
+ @if isequalto mode 0
129
+ skp run, done_lfo
130
+ wlds ${lfoNum}, ${param.rate}, 32767
131
+ done_lfo:
132
+ @endif
133
+
134
+ @section main
135
+ @if pinConnected(audio_input)
136
+
137
+ ; --- Phase Coefficient Setup ---
138
+ @if isequalto mode 0
139
+ ; Internal LFO Configuration
140
+ @if pinConnected(lfo_speed)
141
+ rdax ${input.lfo_speed}, ${rate} / 511.0
142
+ wrax ${lfoRateReg}, 0.0
143
+ @endif
144
+ @if pinConnected(lfo_width)
145
+ @cv lfo_width
146
+ wrax ${reg.depthReg}, 0.0
147
+ @else
148
+ sof 0.0, ${param.depth}
149
+ wrax ${reg.depthReg}, 0.0
150
+ @endif
151
+
152
+ cho rdal, ${lfoNum}
153
+ sof 0.5, 0.5 ; Map -1..1 to 0..1
154
+ ; Nonlinear sweep approximation
155
+ sof 1.0, -0.5 ; Center at 0.5
156
+ sof 1.999, 0.0 ; Expand to -1..1
157
+ mulx ${reg.depthReg} ; Scale by depth
158
+ sof 0.15, 0.83 ; Map to all-pass stable range [0.83, 0.98]
159
+ wrax ${reg.phaseReg}, 0.0
160
+ @else
161
+ ; External Manual CV
162
+ @cv phase_cv
163
+ sof 0.15, 0.83 ; Map CV [0..1] to [0.83, 0.98]
164
+ wrax ${reg.phaseReg}, 0.0
165
+ @endif
166
+
167
+ ; --- All-pass Filter Chain ---
168
+ ; Use 1/64 attenuation to maintain headroom through the cascade
169
+ rdax ${input.audio_input}, 0.015625
170
+ wrax ${reg.temp}, 0.0 ; Input to first stage
171
+
172
+ ; Stage 1
173
+ rdax ${reg.temp}, 1.0
174
+ wrax ${reg.temp1}, 0.0
175
+ rdax ${reg.p1}, 1.0
176
+ wrax ${reg.temp}, 1.0
177
+ mulx ${reg.phaseReg}
178
+ rdax ${reg.temp1}, 1.0
179
+ wrax ${reg.p1}, -1.0
180
+ mulx ${reg.phaseReg}
181
+
182
+ ; Stage 2
183
+ rdax ${reg.temp}, 1.0
184
+ wrax ${reg.temp1}, 0.0
185
+ rdax ${reg.p2}, 1.0
186
+ wrax ${reg.temp}, 1.0
187
+ mulx ${reg.phaseReg}
188
+ rdax ${reg.temp1}, 1.0
189
+ wrax ${reg.p2}, -1.0
190
+ mulx ${reg.phaseReg}
191
+
192
+ ; Stage 3 & 4
193
+ @if stages >= 2
194
+ rdax ${reg.temp}, 1.0
195
+ wrax ${reg.temp1}, 0.0
196
+ rdax ${reg.p3}, 1.0
197
+ wrax ${reg.temp}, 1.0
198
+ mulx ${reg.phaseReg}
199
+ rdax ${reg.temp1}, 1.0
200
+ wrax ${reg.p3}, -1.0
201
+ mulx ${reg.phaseReg}
202
+
203
+ rdax ${reg.temp}, 1.0
204
+ wrax ${reg.temp1}, 0.0
205
+ rdax ${reg.p4}, 1.0
206
+ wrax ${reg.temp}, 1.0
207
+ mulx ${reg.phaseReg}
208
+ rdax ${reg.temp1}, 1.0
209
+ wrax ${reg.p4}, -1.0
210
+ mulx ${reg.phaseReg}
211
+ @endif
212
+
213
+ ; Stage 5 & 6
214
+ @if stages >= 3
215
+ rdax ${reg.temp}, 1.0
216
+ wrax ${reg.temp1}, 0.0
217
+ rdax ${reg.p5}, 1.0
218
+ wrax ${reg.temp}, 1.0
219
+ mulx ${reg.phaseReg}
220
+ rdax ${reg.temp1}, 1.0
221
+ wrax ${reg.p5}, -1.0
222
+ mulx ${reg.phaseReg}
223
+
224
+ rdax ${reg.temp}, 1.0
225
+ wrax ${reg.temp1}, 0.0
226
+ rdax ${reg.p6}, 1.0
227
+ wrax ${reg.temp}, 1.0
228
+ mulx ${reg.phaseReg}
229
+ rdax ${reg.temp1}, 1.0
230
+ wrax ${reg.p6}, -1.0
231
+ mulx ${reg.phaseReg}
232
+ @endif
233
+
234
+ ; Stage 7 & 8
235
+ @if stages >= 4
236
+ rdax ${reg.temp}, 1.0
237
+ wrax ${reg.temp1}, 0.0
238
+ rdax ${reg.p7}, 1.0
239
+ wrax ${reg.temp}, 1.0
240
+ mulx ${reg.phaseReg}
241
+ rdax ${reg.temp1}, 1.0
242
+ wrax ${reg.p7}, -1.0
243
+ mulx ${reg.phaseReg}
244
+
245
+ rdax ${reg.temp}, 1.0
246
+ wrax ${reg.temp1}, 0.0
247
+ rdax ${reg.p8}, 1.0
248
+ wrax ${reg.temp}, 1.0
249
+ mulx ${reg.phaseReg}
250
+ rdax ${reg.temp1}, 1.0
251
+ wrax ${reg.p8}, -1.0
252
+ mulx ${reg.phaseReg}
253
+ @endif
254
+
255
+ ; Stage 9 & 10
256
+ @if stages >= 5
257
+ rdax ${reg.temp}, 1.0
258
+ wrax ${reg.temp1}, 0.0
259
+ rdax ${reg.p9}, 1.0
260
+ wrax ${reg.temp}, 1.0
261
+ mulx ${reg.phaseReg}
262
+ rdax ${reg.temp1}, 1.0
263
+ wrax ${reg.p9}, -1.0
264
+ mulx ${reg.phaseReg}
265
+
266
+ rdax ${reg.temp}, 1.0
267
+ wrax ${reg.temp1}, 0.0
268
+ rdax ${reg.p10}, 1.0
269
+ wrax ${reg.temp}, 1.0
270
+ mulx ${reg.phaseReg}
271
+ rdax ${reg.temp1}, 1.0
272
+ wrax ${reg.p10}, -1.0
273
+ mulx ${reg.phaseReg}
274
+ @endif
275
+
276
+ ; Final Stage Output Load
277
+ rdax ${reg.temp}, 1.0
278
+
279
+ ; --- Gain Restoration ---
280
+ ; Restores the 1/64 attenuation (6 stages of sof -2.0)
281
+ sof -2.0, 0.0
282
+ sof -2.0, 0.0
283
+ sof -2.0, 0.0
284
+ sof -2.0, 0.0
285
+ sof -2.0, 0.0
286
+ sof -2.0, 0.0
287
+ wrax ${reg.wet}, 1.0 ; Wet signal in wet register and ACC
288
+
289
+ ; --- Output Routing ---
290
+ @if pinConnected(mix_out)
291
+ rdax ${input.audio_input}, 1.0 ; Dry + Wet
292
+ wrax ${output.mix_out}, 0.0
293
+ @endif
294
+
295
+ @if pinConnected(wet_out)
296
+ rdax ${reg.wet}, 1.0
297
+ wrax ${output.wet_out}, 0.0
298
+ @endif
299
+
300
300
  @endif