@audiofab-io/fv1-core 0.2.3 → 0.4.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/blocks/ATL_DEVELOPER_REFERENCE.md +156 -0
- package/blocks/control/constant.atl +36 -0
- package/blocks/control/entropy_lfo.atl +74 -0
- package/blocks/control/envelope.atl +121 -0
- package/blocks/control/invert.atl +33 -0
- package/blocks/control/pot.atl +150 -0
- package/blocks/control/power.atl +77 -0
- package/blocks/control/ramp_lfo.atl +122 -0
- package/blocks/control/scale_offset.atl +84 -0
- package/blocks/control/sincos_lfo.atl +126 -0
- package/blocks/control/smoother.atl +48 -0
- package/blocks/control/tremolizer.atl +55 -0
- package/blocks/effects/delay/micro_stutter.atl +77 -0
- package/blocks/effects/delay/mn3011.atl +281 -0
- package/blocks/effects/delay/simple_delay.atl +96 -0
- package/blocks/effects/delay/triple_tap_delay.atl +176 -0
- package/blocks/effects/lo-fi/bit_mangler.atl +74 -0
- package/blocks/effects/lo-fi/chiptune.atl +311 -0
- package/blocks/effects/lo-fi/tape_degrade.atl +181 -0
- package/blocks/effects/modulation/chorus.atl +141 -0
- package/blocks/effects/modulation/chorus_4voice.atl +188 -0
- package/blocks/effects/modulation/flanger.atl +184 -0
- package/blocks/effects/modulation/guitar_synth.atl +350 -0
- package/blocks/effects/modulation/harmonic_trem.atl +129 -0
- package/blocks/effects/modulation/organ_synth.atl +326 -0
- package/blocks/effects/modulation/phaser.atl +300 -0
- package/blocks/effects/pitch/octave_up_down.atl +80 -0
- package/blocks/effects/pitch/pitch_offset.atl +149 -0
- package/blocks/effects/pitch/pitch_offset_dual.atl +197 -0
- package/blocks/effects/pitch/pitch_shift.atl +115 -0
- package/blocks/effects/pitch/sub_octave.atl +100 -0
- package/blocks/effects/reverb/ducking_reverb.atl +145 -0
- package/blocks/effects/reverb/min_reverb.atl +132 -0
- package/blocks/effects/reverb/plate_reverb.atl +344 -0
- package/blocks/effects/reverb/room_reverb.atl +293 -0
- package/blocks/effects/reverb/smear.atl +90 -0
- package/blocks/effects/reverb/spring_reverb.atl +353 -0
- package/blocks/filter/1p_high_pass.atl +63 -0
- package/blocks/filter/1p_low_pass.atl +59 -0
- package/blocks/filter/auto_wah.atl +207 -0
- package/blocks/filter/bbd_loss.atl +79 -0
- package/blocks/filter/shelving_high_pass.atl +76 -0
- package/blocks/filter/shelving_low_pass.atl +76 -0
- package/blocks/filter/svf_2p.atl +116 -0
- package/blocks/gain_mix/crossfade.atl +93 -0
- package/blocks/gain_mix/crossfade2.atl +86 -0
- package/blocks/gain_mix/crossfade3.atl +71 -0
- package/blocks/gain_mix/gainboost.atl +54 -0
- package/blocks/gain_mix/mixer2.atl +76 -0
- package/blocks/gain_mix/mixer3.atl +109 -0
- package/blocks/gain_mix/mixer4.atl +152 -0
- package/blocks/gain_mix/volume.atl +51 -0
- package/blocks/io/adc.atl +53 -0
- package/blocks/io/dac.atl +61 -0
- package/blocks/other/stickynote.atl +24 -0
- package/blocks/other/tone_gen_adjustable.atl +137 -0
- package/blocks/other/tone_gen_fixed.atl +109 -0
- package/dist/blockDiagram/blocks/BlockDirectoryLoader.d.ts +13 -0
- package/dist/blockDiagram/blocks/BlockDirectoryLoader.d.ts.map +1 -0
- package/dist/blockDiagram/blocks/BlockDirectoryLoader.js +44 -0
- package/dist/blockDiagram/blocks/BlockDirectoryLoader.js.map +1 -0
- package/dist/blockDiagram/blocks/BlockRegistry.d.ts +48 -0
- package/dist/blockDiagram/blocks/BlockRegistry.d.ts.map +1 -0
- package/dist/blockDiagram/blocks/BlockRegistry.js +109 -0
- package/dist/blockDiagram/blocks/BlockRegistry.js.map +1 -0
- package/dist/blockDiagram/blocks/TemplateBlock.d.ts +20 -0
- package/dist/blockDiagram/blocks/TemplateBlock.d.ts.map +1 -0
- package/dist/blockDiagram/blocks/TemplateBlock.js +82 -0
- package/dist/blockDiagram/blocks/TemplateBlock.js.map +1 -0
- package/dist/blockDiagram/blocks/base/BaseBlock.d.ts +248 -0
- package/dist/blockDiagram/blocks/base/BaseBlock.d.ts.map +1 -0
- package/dist/blockDiagram/blocks/base/BaseBlock.js +402 -0
- package/dist/blockDiagram/blocks/base/BaseBlock.js.map +1 -0
- package/dist/blockDiagram/builtinBlocks.d.ts +9 -0
- package/dist/blockDiagram/builtinBlocks.d.ts.map +1 -0
- package/dist/blockDiagram/builtinBlocks.js +4912 -0
- package/dist/blockDiagram/builtinBlocks.js.map +1 -0
- package/dist/blockDiagram/compiler/BlockTemplate.d.ts +37 -0
- package/dist/blockDiagram/compiler/BlockTemplate.d.ts.map +1 -0
- package/dist/blockDiagram/compiler/BlockTemplate.js +860 -0
- package/dist/blockDiagram/compiler/BlockTemplate.js.map +1 -0
- package/dist/blockDiagram/compiler/CodeOptimizer.d.ts +75 -0
- package/dist/blockDiagram/compiler/CodeOptimizer.d.ts.map +1 -0
- package/dist/blockDiagram/compiler/CodeOptimizer.js +443 -0
- package/dist/blockDiagram/compiler/CodeOptimizer.js.map +1 -0
- package/dist/blockDiagram/compiler/GraphCompiler.d.ts +63 -0
- package/dist/blockDiagram/compiler/GraphCompiler.d.ts.map +1 -0
- package/dist/blockDiagram/compiler/GraphCompiler.js +656 -0
- package/dist/blockDiagram/compiler/GraphCompiler.js.map +1 -0
- package/dist/blockDiagram/compiler/TopologicalSort.d.ts +63 -0
- package/dist/blockDiagram/compiler/TopologicalSort.d.ts.map +1 -0
- package/dist/blockDiagram/compiler/TopologicalSort.js +268 -0
- package/dist/blockDiagram/compiler/TopologicalSort.js.map +1 -0
- package/dist/blockDiagram/index.d.ts +30 -0
- package/dist/blockDiagram/index.d.ts.map +1 -0
- package/dist/blockDiagram/index.js +29 -0
- package/dist/blockDiagram/index.js.map +1 -0
- package/dist/blockDiagram/types/Block.d.ts +178 -0
- package/dist/blockDiagram/types/Block.d.ts.map +1 -0
- package/dist/blockDiagram/types/Block.js +5 -0
- package/dist/blockDiagram/types/Block.js.map +1 -0
- package/dist/blockDiagram/types/CodeGenContext.d.ts +235 -0
- package/dist/blockDiagram/types/CodeGenContext.d.ts.map +1 -0
- package/dist/blockDiagram/types/CodeGenContext.js +554 -0
- package/dist/blockDiagram/types/CodeGenContext.js.map +1 -0
- package/dist/blockDiagram/types/Connection.d.ts +17 -0
- package/dist/blockDiagram/types/Connection.d.ts.map +1 -0
- package/dist/blockDiagram/types/Connection.js +5 -0
- package/dist/blockDiagram/types/Connection.js.map +1 -0
- package/dist/blockDiagram/types/Graph.d.ts +28 -0
- package/dist/blockDiagram/types/Graph.d.ts.map +1 -0
- package/dist/blockDiagram/types/Graph.js +24 -0
- package/dist/blockDiagram/types/Graph.js.map +1 -0
- package/dist/blockDiagram/types/IR.d.ts +79 -0
- package/dist/blockDiagram/types/IR.d.ts.map +1 -0
- package/dist/blockDiagram/types/IR.js +6 -0
- package/dist/blockDiagram/types/IR.js.map +1 -0
- package/dist/blockDiagram/utils/SpinCADConverter.d.ts +17 -0
- package/dist/blockDiagram/utils/SpinCADConverter.d.ts.map +1 -0
- package/dist/blockDiagram/utils/SpinCADConverter.js +307 -0
- package/dist/blockDiagram/utils/SpinCADConverter.js.map +1 -0
- package/dist/effect/compileEffect.d.ts +51 -0
- package/dist/effect/compileEffect.d.ts.map +1 -0
- package/dist/effect/compileEffect.js +133 -0
- package/dist/effect/compileEffect.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +17 -5
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "filter.bbd_loss",
|
|
4
|
+
"name": "BBD Bucket Loss",
|
|
5
|
+
"category": "Filter",
|
|
6
|
+
"description": "Dynamic 12dB/oct low-pass filter that mimics the fidelity loss of analog delay lines (BBD). Fix: Steeper cascade for more pronounced effect.",
|
|
7
|
+
"color": "#24f26f",
|
|
8
|
+
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"id": "input",
|
|
11
|
+
"name": "Audio In",
|
|
12
|
+
"type": "audio"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "coupling",
|
|
16
|
+
"name": "Time Coupling",
|
|
17
|
+
"type": "control",
|
|
18
|
+
"required": false,
|
|
19
|
+
"parameter": "loss_base"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"outputs": [
|
|
23
|
+
{
|
|
24
|
+
"id": "out",
|
|
25
|
+
"name": "Audio Out",
|
|
26
|
+
"type": "audio"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"parameters": [
|
|
30
|
+
{
|
|
31
|
+
"id": "loss_base",
|
|
32
|
+
"name": "Max Loss",
|
|
33
|
+
"type": "number",
|
|
34
|
+
"default": 0.85,
|
|
35
|
+
"min": 0.0,
|
|
36
|
+
"max": 1.0,
|
|
37
|
+
"step": 0.01,
|
|
38
|
+
"description": "How much high-frequency is lost at maximum delay time."
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"registers": [
|
|
42
|
+
"lp1",
|
|
43
|
+
"lp2",
|
|
44
|
+
"k_coeff"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
---
|
|
48
|
+
; BBD Bucket Loss Filter
|
|
49
|
+
; A 2-pole cascaded LPF (12dB/oct) where the coefficient tracks the Coupling input.
|
|
50
|
+
; Fix: Cascaded structure for a much more visible 'analog' roll-off.
|
|
51
|
+
|
|
52
|
+
@section main
|
|
53
|
+
@if pinConnected(input)
|
|
54
|
+
|
|
55
|
+
; 1. Calculate dynamic coefficient k from Coupling input
|
|
56
|
+
@cv coupling
|
|
57
|
+
; ACC has Coupling value (0 to 1).
|
|
58
|
+
; Formula: k = 1.0 - (ACC * loss_base * 0.95)
|
|
59
|
+
; But let's map it aggressively to 0.02 (very dark) to 0.9 (bright)
|
|
60
|
+
sof -0.88, 0.9
|
|
61
|
+
wrax ${reg.k_coeff}, 0.0
|
|
62
|
+
|
|
63
|
+
; 2. First Stage (6dB/oct)
|
|
64
|
+
rdax ${input.input}, 1.0
|
|
65
|
+
rdax ${reg.lp1}, -1.0
|
|
66
|
+
mulx ${reg.k_coeff}
|
|
67
|
+
rdax ${reg.lp1}, 1.0
|
|
68
|
+
wrax ${reg.lp1}, 0.0
|
|
69
|
+
|
|
70
|
+
; 3. Second Stage (Total 12dB/oct)
|
|
71
|
+
rdax ${reg.lp1}, 1.0
|
|
72
|
+
rdax ${reg.lp2}, -1.0
|
|
73
|
+
mulx ${reg.k_coeff}
|
|
74
|
+
rdax ${reg.lp2}, 1.0
|
|
75
|
+
wrax ${reg.lp2}, 1.0
|
|
76
|
+
|
|
77
|
+
; 4. Final Output
|
|
78
|
+
wrax ${output.out}, 0.0
|
|
79
|
+
@endif
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "filter.shelving_hpf",
|
|
4
|
+
"name": "Shelving HPF",
|
|
5
|
+
"category": "Filter",
|
|
6
|
+
"description": "High-pass filter with adjustable shelf depth",
|
|
7
|
+
"color": "#24f26f",
|
|
8
|
+
"width": 180,
|
|
9
|
+
"inputs": [
|
|
10
|
+
{
|
|
11
|
+
"id": "in",
|
|
12
|
+
"name": "Input",
|
|
13
|
+
"type": "audio",
|
|
14
|
+
"required": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "shelf_ctrl",
|
|
18
|
+
"name": "Shelf",
|
|
19
|
+
"type": "control",
|
|
20
|
+
"required": false
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"outputs": [
|
|
24
|
+
{
|
|
25
|
+
"id": "out",
|
|
26
|
+
"name": "Output",
|
|
27
|
+
"type": "audio"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"parameters": [
|
|
31
|
+
{
|
|
32
|
+
"id": "frequency",
|
|
33
|
+
"name": "Frequency (Hz)",
|
|
34
|
+
"type": "number",
|
|
35
|
+
"default": 1000,
|
|
36
|
+
"min": 20,
|
|
37
|
+
"max": 10000,
|
|
38
|
+
"conversion": "LOGFREQ",
|
|
39
|
+
"description": "The corner frequency of the shelving filter in Hz.",
|
|
40
|
+
"step": 1
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "shelf",
|
|
44
|
+
"name": "Shelf Depth",
|
|
45
|
+
"type": "number",
|
|
46
|
+
"default": -6,
|
|
47
|
+
"min": -40,
|
|
48
|
+
"max": -3,
|
|
49
|
+
"conversion": "DBLEVEL",
|
|
50
|
+
"step": 0.01
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"registers": [
|
|
54
|
+
"hpf_state",
|
|
55
|
+
"temp"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
---
|
|
59
|
+
; Shelving HPF
|
|
60
|
+
rdax ${input.in}, 1.0
|
|
61
|
+
|
|
62
|
+
@if pinConnected(shelf_ctrl)
|
|
63
|
+
; Shelf modulated by control input
|
|
64
|
+
@comment "Dynamic shelf control"
|
|
65
|
+
wrax ${reg.temp}, -(1.0 - ${shelf})
|
|
66
|
+
rdfx ${reg.hpf_state}, ${frequency}
|
|
67
|
+
wrlx ${reg.hpf_state}, -1.0
|
|
68
|
+
mulx ${input.shelf_ctrl}
|
|
69
|
+
rdax ${reg.temp}, 1.0
|
|
70
|
+
@else
|
|
71
|
+
; Fixed shelf depth
|
|
72
|
+
rdfx ${reg.hpf_state}, ${frequency}
|
|
73
|
+
wrhx ${reg.hpf_state}, -(1.0 - ${shelf})
|
|
74
|
+
@endif
|
|
75
|
+
|
|
76
|
+
wrax ${output.out}, 0.0
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "filter.shelving_lpf",
|
|
4
|
+
"name": "Shelving LPF",
|
|
5
|
+
"category": "Filter",
|
|
6
|
+
"description": "Low-pass filter with adjustable shelf depth",
|
|
7
|
+
"color": "#24f26f",
|
|
8
|
+
"width": 180,
|
|
9
|
+
"inputs": [
|
|
10
|
+
{
|
|
11
|
+
"id": "in",
|
|
12
|
+
"name": "Input",
|
|
13
|
+
"type": "audio",
|
|
14
|
+
"required": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "shelf_ctrl",
|
|
18
|
+
"name": "Shelf",
|
|
19
|
+
"type": "control",
|
|
20
|
+
"required": false
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"outputs": [
|
|
24
|
+
{
|
|
25
|
+
"id": "out",
|
|
26
|
+
"name": "Output",
|
|
27
|
+
"type": "audio"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"parameters": [
|
|
31
|
+
{
|
|
32
|
+
"id": "frequency",
|
|
33
|
+
"name": "Frequency (Hz)",
|
|
34
|
+
"type": "number",
|
|
35
|
+
"default": 1000,
|
|
36
|
+
"min": 20,
|
|
37
|
+
"max": 10000,
|
|
38
|
+
"conversion": "LOGFREQ",
|
|
39
|
+
"description": "The corner frequency of the shelving filter in Hz.",
|
|
40
|
+
"step": 1
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "shelf",
|
|
44
|
+
"name": "Shelf Depth",
|
|
45
|
+
"type": "number",
|
|
46
|
+
"default": -6,
|
|
47
|
+
"min": -40,
|
|
48
|
+
"max": -3,
|
|
49
|
+
"conversion": "DBLEVEL",
|
|
50
|
+
"step": 0.01
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"registers": [
|
|
54
|
+
"lpf_state",
|
|
55
|
+
"temp"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
---
|
|
59
|
+
; Shelving LPF
|
|
60
|
+
rdax ${input.in}, 1.0
|
|
61
|
+
|
|
62
|
+
@if pinConnected(shelf_ctrl)
|
|
63
|
+
; Shelf modulated by control input
|
|
64
|
+
@comment "Dynamic shelf control"
|
|
65
|
+
wrax ${reg.temp}, -(1.0 - ${shelf})
|
|
66
|
+
rdfx ${reg.lpf_state}, ${frequency}
|
|
67
|
+
wrhx ${reg.lpf_state}, -1.0
|
|
68
|
+
mulx ${input.shelf_ctrl}
|
|
69
|
+
rdax ${reg.temp}, 1.0
|
|
70
|
+
@else
|
|
71
|
+
; Fixed shelf depth
|
|
72
|
+
rdfx ${reg.lpf_state}, ${frequency}
|
|
73
|
+
wrlx ${reg.lpf_state}, -(1.0 - ${shelf})
|
|
74
|
+
@endif
|
|
75
|
+
|
|
76
|
+
wrax ${output.out}, 0.0
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "filter.svf_2p",
|
|
4
|
+
"name": "2-Pole SVF",
|
|
5
|
+
"category": "Filter",
|
|
6
|
+
"description": "2-pole State Variable Filter",
|
|
7
|
+
"color": "#24f26f",
|
|
8
|
+
"width": 180,
|
|
9
|
+
"inputs": [
|
|
10
|
+
{
|
|
11
|
+
"id": "in",
|
|
12
|
+
"name": "Input",
|
|
13
|
+
"type": "audio",
|
|
14
|
+
"required": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "f_cv",
|
|
18
|
+
"name": "Freq CV",
|
|
19
|
+
"type": "control",
|
|
20
|
+
"required": false,
|
|
21
|
+
"parameter": "frequency"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"outputs": [
|
|
25
|
+
{
|
|
26
|
+
"id": "lp",
|
|
27
|
+
"name": "Low Pass",
|
|
28
|
+
"type": "audio"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "bp",
|
|
32
|
+
"name": "Band Pass",
|
|
33
|
+
"type": "audio"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "hp",
|
|
37
|
+
"name": "High Pass",
|
|
38
|
+
"type": "audio"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "notch",
|
|
42
|
+
"name": "Notch",
|
|
43
|
+
"type": "audio"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"parameters": [
|
|
47
|
+
{
|
|
48
|
+
"id": "frequency",
|
|
49
|
+
"name": "Frequency (Hz)",
|
|
50
|
+
"type": "number",
|
|
51
|
+
"min": 20,
|
|
52
|
+
"max": 10000,
|
|
53
|
+
"default": 1000,
|
|
54
|
+
"conversion": "SVFFREQ",
|
|
55
|
+
"description": "Center or cutoff frequency."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "q",
|
|
59
|
+
"name": "Resonance (Q)",
|
|
60
|
+
"type": "number",
|
|
61
|
+
"min": 0.5,
|
|
62
|
+
"max": 100.0,
|
|
63
|
+
"step": 0.001,
|
|
64
|
+
"default": 0.707,
|
|
65
|
+
"conversion": "SVF_DAMP",
|
|
66
|
+
"description": "The maximum resonance filter peak."
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"registers": [
|
|
70
|
+
"lp_state",
|
|
71
|
+
"bp_state"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
---
|
|
75
|
+
@section header
|
|
76
|
+
; Resonance bounds: Calculate Damping (d = 1/Q)
|
|
77
|
+
equ d_target (${param.q})
|
|
78
|
+
|
|
79
|
+
@section main
|
|
80
|
+
; --- 2-Pole SVF (Standard Hal Chamberlin Topology) ---
|
|
81
|
+
|
|
82
|
+
; 1. Calculate High Pass (H = I - L_old - d * B_old)
|
|
83
|
+
; Fixed Damping (saves register usage & CPU cycles)
|
|
84
|
+
rdax ${input.in}, 1.0 ; ACC = I
|
|
85
|
+
rdax ${reg.lp_state}, -1.0 ; ACC = I - L_old
|
|
86
|
+
rdax ${reg.bp_state}, -(d_target) ; ACC = I - L_old - d_fixed * B_old = HighPass
|
|
87
|
+
|
|
88
|
+
@if pinConnected(hp)
|
|
89
|
+
wrax ${output.hp}, 1.0 ; EXPORT High Pass (ACC remains H)
|
|
90
|
+
@endif
|
|
91
|
+
|
|
92
|
+
@if pinConnected(notch)
|
|
93
|
+
; Perfect Chamberlin Notch: H + L_old
|
|
94
|
+
rdax ${reg.lp_state}, 1.0 ; ACC = H + L_old
|
|
95
|
+
wrax ${output.notch}, -1.0 ; EXPORT Notch, ACC = - (H + L_old)
|
|
96
|
+
rdax ${reg.lp_state}, 1.0 ; ACC = -H - L_old + L_old = -H
|
|
97
|
+
sof -1.0, 0.0 ; ACC = H (Restoring H for next integration step)
|
|
98
|
+
@endif
|
|
99
|
+
|
|
100
|
+
; 2. Calculate Band Pass update (B_new = B_old + F * H)
|
|
101
|
+
; High Pass is currently in ACC
|
|
102
|
+
@mulcv f_cv ; ACC = F * H
|
|
103
|
+
rdax ${reg.bp_state}, 1.0 ; ACC = F * H + B_old = B_new
|
|
104
|
+
@if pinConnected(bp)
|
|
105
|
+
wrax ${output.bp}, 1.0 ; EXPORT Band Pass
|
|
106
|
+
@endif
|
|
107
|
+
wrax ${reg.bp_state}, 1.0 ; REG_B = B_new, ACC = B_new
|
|
108
|
+
|
|
109
|
+
; 3. Calculate Low Pass update (L_new = L_old + F * B_new)
|
|
110
|
+
; Band Pass is currently in ACC
|
|
111
|
+
@mulcv f_cv ; ACC = F * B_new
|
|
112
|
+
rdax ${reg.lp_state}, 1.0 ; ACC = F * B_new + L_old = L_new
|
|
113
|
+
@if pinConnected(lp)
|
|
114
|
+
wrax ${output.lp}, 1.0 ; EXPORT Low Pass
|
|
115
|
+
@endif
|
|
116
|
+
wrax ${reg.lp_state}, 0.0 ; REG_L = L_new, ACC = 0
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.crossfade",
|
|
4
|
+
"name": "Crossfade",
|
|
5
|
+
"category": "Gain/Mixing",
|
|
6
|
+
"description": "Crossfades between two audio inputs based on a control signal",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"id": "input1",
|
|
10
|
+
"name": "Input 1",
|
|
11
|
+
"type": "audio"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "input2",
|
|
15
|
+
"name": "Input 2",
|
|
16
|
+
"type": "audio"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "input0",
|
|
20
|
+
"name": "Fade",
|
|
21
|
+
"type": "control"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"outputs": [
|
|
25
|
+
{
|
|
26
|
+
"id": "output",
|
|
27
|
+
"name": "Output",
|
|
28
|
+
"type": "audio"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"parameters": [
|
|
32
|
+
{
|
|
33
|
+
"id": "fade",
|
|
34
|
+
"name": "Fade",
|
|
35
|
+
"type": "number",
|
|
36
|
+
"min": 0,
|
|
37
|
+
"max": 1,
|
|
38
|
+
"step": 0.01,
|
|
39
|
+
"default": 0.5
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "gain1",
|
|
43
|
+
"name": "Input 1 Gain",
|
|
44
|
+
"type": "number",
|
|
45
|
+
"min": -12,
|
|
46
|
+
"max": 0,
|
|
47
|
+
"default": -6,
|
|
48
|
+
"conversion": "DBLEVEL"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "gain2",
|
|
52
|
+
"name": "Input 2 Gain",
|
|
53
|
+
"type": "number",
|
|
54
|
+
"min": -12,
|
|
55
|
+
"max": 0,
|
|
56
|
+
"default": -6,
|
|
57
|
+
"conversion": "DBLEVEL"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"color": "#2468f2"
|
|
61
|
+
}
|
|
62
|
+
---
|
|
63
|
+
@section header
|
|
64
|
+
@comment "Generated from spincad source file crossfade.spincad"
|
|
65
|
+
|
|
66
|
+
@section main
|
|
67
|
+
; Dynamic interpolation or fixed fallback crossfade
|
|
68
|
+
|
|
69
|
+
@if pinConnected(input0)
|
|
70
|
+
; Dynamic crossfade using control input (Fade)
|
|
71
|
+
@if pinConnected(input1)
|
|
72
|
+
rdax ${input.input1}, -${gain1}
|
|
73
|
+
@endif
|
|
74
|
+
@if pinConnected(input2)
|
|
75
|
+
rdax ${input.input2}, ${gain2}
|
|
76
|
+
@endif
|
|
77
|
+
|
|
78
|
+
mulx ${input.input0}
|
|
79
|
+
|
|
80
|
+
@if pinConnected(input1)
|
|
81
|
+
rdax ${input.input1}, ${gain1}
|
|
82
|
+
@endif
|
|
83
|
+
@else
|
|
84
|
+
; Fallback to static parameter fade
|
|
85
|
+
@if pinConnected(input1)
|
|
86
|
+
rdax ${input.input1}, ((1.0 - ${fade}) * ${gain1})
|
|
87
|
+
@endif
|
|
88
|
+
@if pinConnected(input2)
|
|
89
|
+
rdax ${input.input2}, (${fade} * ${gain2})
|
|
90
|
+
@endif
|
|
91
|
+
@endif
|
|
92
|
+
|
|
93
|
+
wrax ${output.output}, 0.0
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.crossfade2",
|
|
4
|
+
"name": "Crossfade 2",
|
|
5
|
+
"category": "Gain/Mixing",
|
|
6
|
+
"description": "Curbed crossfade between two audio inputs.",
|
|
7
|
+
"color": "#2468f2",
|
|
8
|
+
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"id": "input1",
|
|
11
|
+
"name": "Input 1",
|
|
12
|
+
"type": "audio"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "input2",
|
|
16
|
+
"name": "Input 2",
|
|
17
|
+
"type": "audio"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "fade",
|
|
21
|
+
"name": "Fade",
|
|
22
|
+
"type": "control"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"outputs": [
|
|
26
|
+
{
|
|
27
|
+
"id": "output",
|
|
28
|
+
"name": "Output",
|
|
29
|
+
"type": "audio"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"parameters": [
|
|
33
|
+
{
|
|
34
|
+
"id": "fade",
|
|
35
|
+
"name": "Fade",
|
|
36
|
+
"type": "number",
|
|
37
|
+
"default": 0.5,
|
|
38
|
+
"min": 0,
|
|
39
|
+
"max": 1,
|
|
40
|
+
"step": 0.01
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"registers": [
|
|
44
|
+
"temp"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
---
|
|
48
|
+
; Crossfade 2
|
|
49
|
+
@section main
|
|
50
|
+
|
|
51
|
+
@if pinConnected(fade)
|
|
52
|
+
; Input 2 path
|
|
53
|
+
@if pinConnected(input2)
|
|
54
|
+
clr
|
|
55
|
+
rdax ${input.fade}, -1.0
|
|
56
|
+
sof -2.0, 0.0
|
|
57
|
+
wrax ${reg.temp}, 1.0
|
|
58
|
+
mulx ${input.input2}
|
|
59
|
+
wrax ${reg.temp}, 0.0
|
|
60
|
+
@endif
|
|
61
|
+
|
|
62
|
+
; Input 1 path
|
|
63
|
+
@if pinConnected(input1)
|
|
64
|
+
clr
|
|
65
|
+
rdax ${input.fade}, 1.0
|
|
66
|
+
sof 1.0, -1.0
|
|
67
|
+
sof -2.0, 0.0
|
|
68
|
+
wrax ${reg.temp}, 1.0
|
|
69
|
+
mulx ${input.input1}
|
|
70
|
+
@endif
|
|
71
|
+
|
|
72
|
+
; Combined output
|
|
73
|
+
rdax ${reg.temp}, 1.0
|
|
74
|
+
wrax ${output.output}, 0.0
|
|
75
|
+
@else
|
|
76
|
+
; Fallback to simple crossfade using parameter
|
|
77
|
+
@equals staticFade ${fade}
|
|
78
|
+
@equals staticInvFade (1.0 - ${fade})
|
|
79
|
+
@if pinConnected(input1)
|
|
80
|
+
rdax ${input.input1}, ${staticInvFade}
|
|
81
|
+
@endif
|
|
82
|
+
@if pinConnected(input2)
|
|
83
|
+
rdax ${input.input2}, ${staticFade}
|
|
84
|
+
@endif
|
|
85
|
+
wrax ${output.output}, 0.0
|
|
86
|
+
@endif
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.crossfade3",
|
|
4
|
+
"name": "Crossfade 3",
|
|
5
|
+
"category": "Gain/Mixing",
|
|
6
|
+
"description": "True crossfade between two inputs with control and parameter fallback",
|
|
7
|
+
"color": "#4287f5",
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "id": "input1", "name": "Input 1", "type": "audio", "required": true },
|
|
10
|
+
{ "id": "input2", "name": "Input 2", "type": "audio", "required": true },
|
|
11
|
+
{ "id": "fade", "name": "Fade", "type": "control", "required": false }
|
|
12
|
+
],
|
|
13
|
+
"outputs": [
|
|
14
|
+
{ "id": "output", "name": "Output", "type": "audio" }
|
|
15
|
+
],
|
|
16
|
+
"parameters": [
|
|
17
|
+
{ "id": "fade", "name": "Fade", "type": "number", "default": 0.5, "min": 0, "max": 1, "step": 0.01 }
|
|
18
|
+
],
|
|
19
|
+
"registers": [ "temp" ]
|
|
20
|
+
}
|
|
21
|
+
---
|
|
22
|
+
; Crossfade 3 (Restored Java logic)
|
|
23
|
+
@section main
|
|
24
|
+
|
|
25
|
+
@if pinConnected(fade)
|
|
26
|
+
@if pinConnected(input1) && pinConnected(input2)
|
|
27
|
+
rdax ${input.fade}, 1.0
|
|
28
|
+
sof 1.0, -0.5
|
|
29
|
+
skp neg, fade_neg
|
|
30
|
+
|
|
31
|
+
; Fade > 0.5 path
|
|
32
|
+
clr
|
|
33
|
+
rdax ${input.fade}, 0.586
|
|
34
|
+
sof 1.0, 0.414
|
|
35
|
+
mulx ${input.input2}
|
|
36
|
+
wrax ${reg.temp}, 0.0
|
|
37
|
+
|
|
38
|
+
rdax ${input.fade}, 1.0
|
|
39
|
+
sof 0.707, -0.707
|
|
40
|
+
sof -2.0, 0.0
|
|
41
|
+
mulx ${input.input1}
|
|
42
|
+
rdax ${reg.temp}, 1.0
|
|
43
|
+
skp run, fade_done
|
|
44
|
+
|
|
45
|
+
fade_neg:
|
|
46
|
+
; Fade < 0.5 path
|
|
47
|
+
clr
|
|
48
|
+
rdax ${input.fade}, 1.414
|
|
49
|
+
mulx ${input.input2}
|
|
50
|
+
wrax ${reg.temp}, 0.0
|
|
51
|
+
|
|
52
|
+
rdax ${input.fade}, -0.586
|
|
53
|
+
sof 0.999, 0.999
|
|
54
|
+
mulx ${input.input1}
|
|
55
|
+
rdax ${reg.temp}, 1.0
|
|
56
|
+
|
|
57
|
+
fade_done:
|
|
58
|
+
wrax ${output.output}, 0.0
|
|
59
|
+
@endif
|
|
60
|
+
@else
|
|
61
|
+
; Fallback to simple crossfade using parameter
|
|
62
|
+
@equals staticFade ${fade}
|
|
63
|
+
@equals staticInvFade (1.0 - ${fade})
|
|
64
|
+
@if pinConnected(input1)
|
|
65
|
+
rdax ${input.input1}, ${staticInvFade}
|
|
66
|
+
@endif
|
|
67
|
+
@if pinConnected(input2)
|
|
68
|
+
rdax ${input.input2}, ${staticFade}
|
|
69
|
+
@endif
|
|
70
|
+
wrax ${output.output}, 0.0
|
|
71
|
+
@endif
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.gainboost",
|
|
4
|
+
"name": "Gain Boost",
|
|
5
|
+
"category": "Gain/Mixing",
|
|
6
|
+
"description": "Adjusts the gain of an audio signal in 6dB steps with correct phase logic.",
|
|
7
|
+
"color": "#4287f5",
|
|
8
|
+
"width": 100,
|
|
9
|
+
"labelTemplate": "${param.gain * 6} dB",
|
|
10
|
+
"inputs": [
|
|
11
|
+
{ "id": "in", "name": "In", "type": "audio", "required": true }
|
|
12
|
+
],
|
|
13
|
+
"outputs": [
|
|
14
|
+
{ "id": "out", "name": "Out", "type": "audio" }
|
|
15
|
+
],
|
|
16
|
+
"parameters": [
|
|
17
|
+
{
|
|
18
|
+
"id": "gain",
|
|
19
|
+
"name": "Boost (6dB steps)",
|
|
20
|
+
"type": "number",
|
|
21
|
+
"default": 1,
|
|
22
|
+
"min": 0,
|
|
23
|
+
"max": 4,
|
|
24
|
+
"step": 1,
|
|
25
|
+
"description": "Number of 6dB gain stages."
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
---
|
|
30
|
+
; Gain Boost (Restored Java logic)
|
|
31
|
+
@section main
|
|
32
|
+
|
|
33
|
+
rdax ${input.in}, 1.0
|
|
34
|
+
|
|
35
|
+
; Each 'sof -2.0, 0' adds 6dB but flips phase
|
|
36
|
+
@if param.gain >= 1
|
|
37
|
+
sof -2.0, 0.0
|
|
38
|
+
@endif
|
|
39
|
+
@if param.gain >= 2
|
|
40
|
+
sof -2.0, 0.0
|
|
41
|
+
@endif
|
|
42
|
+
@if param.gain >= 3
|
|
43
|
+
sof -2.0, 0.0
|
|
44
|
+
@endif
|
|
45
|
+
@if param.gain >= 4
|
|
46
|
+
sof -2.0, 0.0
|
|
47
|
+
@endif
|
|
48
|
+
|
|
49
|
+
; If an odd number of stages was used, flip phase back to original
|
|
50
|
+
@if (param.gain % 2) == 1
|
|
51
|
+
sof -1.0, 0.0
|
|
52
|
+
@endif
|
|
53
|
+
|
|
54
|
+
wrax ${output.out}, 0.0
|