@audiofab-io/fv1-core 0.5.0 → 0.6.1
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 -156
- package/blocks/control/constant.atl +36 -36
- package/blocks/control/entropy_lfo.atl +74 -74
- package/blocks/control/envelope.atl +120 -120
- package/blocks/control/invert.atl +33 -33
- package/blocks/control/pot.atl +149 -149
- package/blocks/control/power.atl +76 -76
- package/blocks/control/ramp_lfo.atl +122 -122
- package/blocks/control/scale_offset.atl +84 -84
- package/blocks/control/sincos_lfo.atl +126 -126
- package/blocks/control/smoother.atl +48 -48
- package/blocks/control/tremolizer.atl +54 -54
- package/blocks/effects/delay/micro_stutter.atl +77 -77
- package/blocks/effects/delay/mn3011.atl +280 -280
- package/blocks/effects/delay/simple_delay.atl +96 -96
- package/blocks/effects/delay/triple_tap_delay.atl +176 -176
- package/blocks/effects/lo-fi/bit_mangler.atl +74 -74
- package/blocks/effects/lo-fi/chiptune.atl +311 -311
- package/blocks/effects/lo-fi/tape_degrade.atl +181 -181
- package/blocks/effects/modulation/chorus.atl +141 -141
- package/blocks/effects/modulation/chorus_4voice.atl +188 -188
- package/blocks/effects/modulation/flanger.atl +184 -184
- package/blocks/effects/modulation/harmonic_trem.atl +129 -129
- package/blocks/effects/modulation/phaser.atl +299 -299
- package/blocks/effects/pitch/octave_up_down.atl +80 -80
- package/blocks/effects/pitch/pitch_offset.atl +149 -149
- package/blocks/effects/pitch/pitch_offset_dual.atl +197 -197
- package/blocks/effects/pitch/pitch_shift.atl +115 -115
- package/blocks/effects/pitch/sub_octave.atl +100 -100
- package/blocks/effects/reverb/ducking_reverb.atl +145 -145
- package/blocks/effects/reverb/min_reverb.atl +132 -132
- package/blocks/effects/reverb/plate_reverb.atl +344 -344
- package/blocks/effects/reverb/room_reverb.atl +293 -293
- package/blocks/effects/reverb/smear.atl +90 -90
- package/blocks/effects/reverb/spring_reverb.atl +353 -353
- package/blocks/filter/1p_high_pass.atl +62 -62
- package/blocks/filter/1p_low_pass.atl +58 -58
- package/blocks/filter/auto_wah.atl +207 -207
- package/blocks/filter/bbd_loss.atl +79 -79
- package/blocks/filter/shelving_high_pass.atl +76 -76
- package/blocks/filter/shelving_low_pass.atl +76 -76
- package/blocks/filter/svf_2p.atl +116 -116
- package/blocks/gain_mix/crossfade.atl +93 -93
- package/blocks/gain_mix/crossfade2.atl +86 -86
- package/blocks/gain_mix/crossfade3.atl +71 -71
- package/blocks/gain_mix/gainboost.atl +54 -54
- package/blocks/gain_mix/mixer2.atl +76 -76
- package/blocks/gain_mix/mixer3.atl +109 -109
- package/blocks/gain_mix/mixer4.atl +151 -151
- package/blocks/gain_mix/volume.atl +50 -50
- package/blocks/io/adc.atl +53 -53
- package/blocks/io/dac.atl +61 -61
- package/blocks/other/stickynote.atl +24 -24
- package/blocks/other/tone_gen_adjustable.atl +137 -137
- package/blocks/other/tone_gen_fixed.atl +109 -109
- package/dist/blockDiagram/builtinBlocks.js +107 -107
- package/dist/blockDiagram/builtinBlocks.js.map +1 -1
- package/dist/blockDiagram/compiler/BlockTemplate.d.ts.map +1 -1
- package/dist/blockDiagram/compiler/BlockTemplate.js +18 -0
- package/dist/blockDiagram/compiler/BlockTemplate.js.map +1 -1
- package/dist/spnbank/index.d.ts +49 -7
- package/dist/spnbank/index.d.ts.map +1 -1
- package/dist/spnbank/index.js +99 -15
- package/dist/spnbank/index.js.map +1 -1
- package/package.json +2 -2
package/blocks/filter/svf_2p.atl
CHANGED
|
@@ -1,116 +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
|
|
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
|
|
@@ -1,93 +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
|
|
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
|
|
@@ -1,86 +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
|
|
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
|