@audiofab-io/fv1-core 0.6.1 → 0.6.3

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 (62) 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.d.ts +12 -0
  59. package/dist/simulator/FV1Simulator.d.ts.map +1 -1
  60. package/dist/simulator/FV1Simulator.js +47 -1
  61. package/dist/simulator/FV1Simulator.js.map +1 -1
  62. package/package.json +1 -1
@@ -1,80 +1,80 @@
1
- ---
2
- {
3
- "type": "effects.pitch.octave_up_down",
4
- "name": "Octave Up & Down",
5
- "category": "Effects",
6
- "subcategory": "Pitch",
7
- "description": "Fixed pitch shifter with both Octave Up and Octave Down outputs.",
8
- "color": "#fcba03",
9
- "inputs": [
10
- {
11
- "id": "in",
12
- "name": "Input",
13
- "type": "audio",
14
- "required": true
15
- }
16
- ],
17
- "outputs": [
18
- {
19
- "id": "octave_down",
20
- "name": "Octave Down",
21
- "type": "audio"
22
- },
23
- {
24
- "id": "octave_up",
25
- "name": "Octave Up",
26
- "type": "audio"
27
- }
28
- ],
29
- "memories": [
30
- {
31
- "id": "delayl",
32
- "size": "bufferSize"
33
- },
34
- {
35
- "id": "temp",
36
- "size": 1
37
- }
38
- ],
39
- "registers": [],
40
- "parameters": []
41
- }
42
- ---
43
- @section header
44
- @equals bufferSize 4096
45
-
46
- @section init
47
- ; Octave Up (s = 2; rate = (2-1)*16384 = 16384)
48
- ; Octave Down (s = 0.5; rate = (0.5-1)*16384 = -8192)
49
- skp run, done_init
50
- wldr 0, -8192, ${bufferSize}
51
- wldr 1, 16384, ${bufferSize}
52
- done_init:
53
-
54
- @section main
55
- rdax ${input.in}, 1.0
56
- wra ${mem.delayl}, 0.0
57
-
58
- @if pinConnected(octave_down)
59
- ; Perform Octave Down (RMP0)
60
- cho rda, RMP0, REG | COMPC, ${mem.delayl}
61
- cho rda, RMP0, 0, ${mem.delayl} + 1
62
- wra ${mem.temp}, 0.0
63
- cho rda, RMP0, RPTR2 | COMPC, ${mem.delayl}
64
- cho rda, RMP0, RPTR2, ${mem.delayl} + 1
65
- cho sof, RMP0, NA | COMPC, 0.0
66
- cho rda, RMP0, NA, ${mem.temp}
67
- wrax ${output.octave_down}, 0.0
68
- @endif
69
-
70
- @if pinConnected(octave_up)
71
- ; Perform Octave Up (RMP1)
72
- cho rda, RMP1, REG | COMPC, ${mem.delayl}
73
- cho rda, RMP1, 0, ${mem.delayl} + 1
74
- wra ${mem.temp}, 0.0
75
- cho rda, RMP1, RPTR2 | COMPC, ${mem.delayl}
76
- cho rda, RMP1, RPTR2, ${mem.delayl} + 1
77
- cho sof, RMP1, NA | COMPC, 0.0
78
- cho rda, RMP1, NA, ${mem.temp}
79
- wrax ${output.octave_up}, 0.0
80
- @endif
1
+ ---
2
+ {
3
+ "type": "effects.pitch.octave_up_down",
4
+ "name": "Octave Up & Down",
5
+ "category": "Effects",
6
+ "subcategory": "Pitch",
7
+ "description": "Fixed pitch shifter with both Octave Up and Octave Down outputs.",
8
+ "color": "#fcba03",
9
+ "inputs": [
10
+ {
11
+ "id": "in",
12
+ "name": "Input",
13
+ "type": "audio",
14
+ "required": true
15
+ }
16
+ ],
17
+ "outputs": [
18
+ {
19
+ "id": "octave_down",
20
+ "name": "Octave Down",
21
+ "type": "audio"
22
+ },
23
+ {
24
+ "id": "octave_up",
25
+ "name": "Octave Up",
26
+ "type": "audio"
27
+ }
28
+ ],
29
+ "memories": [
30
+ {
31
+ "id": "delayl",
32
+ "size": "bufferSize"
33
+ },
34
+ {
35
+ "id": "temp",
36
+ "size": 1
37
+ }
38
+ ],
39
+ "registers": [],
40
+ "parameters": []
41
+ }
42
+ ---
43
+ @section header
44
+ @equals bufferSize 4096
45
+
46
+ @section init
47
+ ; Octave Up (s = 2; rate = (2-1)*16384 = 16384)
48
+ ; Octave Down (s = 0.5; rate = (0.5-1)*16384 = -8192)
49
+ skp run, done_init
50
+ wldr 0, -8192, ${bufferSize}
51
+ wldr 1, 16384, ${bufferSize}
52
+ done_init:
53
+
54
+ @section main
55
+ rdax ${input.in}, 1.0
56
+ wra ${mem.delayl}, 0.0
57
+
58
+ @if pinConnected(octave_down)
59
+ ; Perform Octave Down (RMP0)
60
+ cho rda, RMP0, REG | COMPC, ${mem.delayl}
61
+ cho rda, RMP0, 0, ${mem.delayl} + 1
62
+ wra ${mem.temp}, 0.0
63
+ cho rda, RMP0, RPTR2 | COMPC, ${mem.delayl}
64
+ cho rda, RMP0, RPTR2, ${mem.delayl} + 1
65
+ cho sof, RMP0, NA | COMPC, 0.0
66
+ cho rda, RMP0, NA, ${mem.temp}
67
+ wrax ${output.octave_down}, 0.0
68
+ @endif
69
+
70
+ @if pinConnected(octave_up)
71
+ ; Perform Octave Up (RMP1)
72
+ cho rda, RMP1, REG | COMPC, ${mem.delayl}
73
+ cho rda, RMP1, 0, ${mem.delayl} + 1
74
+ wra ${mem.temp}, 0.0
75
+ cho rda, RMP1, RPTR2 | COMPC, ${mem.delayl}
76
+ cho rda, RMP1, RPTR2, ${mem.delayl} + 1
77
+ cho sof, RMP1, NA | COMPC, 0.0
78
+ cho rda, RMP1, NA, ${mem.temp}
79
+ wrax ${output.octave_up}, 0.0
80
+ @endif
@@ -1,149 +1,149 @@
1
- ---
2
- {
3
- "type": "effects.pitch.pitch_offset",
4
- "name": "Pitch Offset (Hilbert)",
5
- "category": "Effects",
6
- "subcategory": "Pitch",
7
- "description": "Bipolar frequency shift (+/-). Neutral at 12 o'clock, turning down lowers pitch, turning up raises pitch.",
8
- "color": "#fcba03",
9
- "inputs": [
10
- {
11
- "id": "in",
12
- "name": "Audio Input",
13
- "type": "audio",
14
- "required": true
15
- },
16
- {
17
- "id": "shift_ctrl",
18
- "name": "Shift CV",
19
- "type": "control",
20
- "required": false,
21
- "parameter": "shiftValue"
22
- }
23
- ],
24
- "outputs": [
25
- {
26
- "id": "out",
27
- "name": "Output",
28
- "type": "audio"
29
- }
30
- ],
31
- "parameters": [
32
- {
33
- "id": "shiftRange",
34
- "name": "Shift Range (Hz)",
35
- "type": "number",
36
- "default": 600,
37
- "min": 1,
38
- "max": 2000,
39
- "conversion": "HZ_TO_HILBERT_SHIFT",
40
- "description": "The total frequency range covered by the Shift control (e.g. 600 means +/- 300Hz)."
41
- },
42
- {
43
- "id": "shiftValue",
44
- "name": "Shift",
45
- "type": "number",
46
- "default": 0.5,
47
- "min": 0.0,
48
- "max": 1.0,
49
- "step": 0.01,
50
- "description": "Manual control for pitch shift. 0.5 is neutral (no shift)."
51
- }
52
- ],
53
- "registers": [
54
- "sigs",
55
- "sigc",
56
- "lpf",
57
- "hpf",
58
- "sigfil",
59
- "sinosc",
60
- "cososc",
61
- "temp",
62
- "shift_amount",
63
- "potfil"
64
- ],
65
- "memories": [
66
- { "id": "ap1", "size": 2 },
67
- { "id": "ap2", "size": 2 },
68
- { "id": "ap3", "size": 2 },
69
- { "id": "ap4", "size": 2 },
70
- { "id": "ap5", "size": 2 },
71
- { "id": "ap6", "size": 2 }
72
- ]
73
- }
74
- ---
75
- @section header
76
-
77
- @section init
78
- ; Initialize oscillator (cosine = 1.0)
79
- skp run, done_init
80
- or $7fffff
81
- wrax ${reg.cososc}, 0.0
82
- done_init:
83
-
84
- @section main
85
- ; 1. Process CV and smoothing
86
- @cv shift_ctrl
87
- ; ACC = Shift position (0..1, defaults to 0.5)
88
- rdfx ${reg.potfil}, 0.001
89
- wrlx ${reg.potfil}, -1.0
90
- ; Map [0..1] to [Range/2 .. -Range/2]
91
- ; Bipolar: (0.5 - shiftValue) * Range
92
- sof -1.0, 0.5
93
- sof ${shiftRange}, 0.0 ; Substitutes converted HZ_TO_HILBERT_SHIFT value
94
- wrax ${reg.shift_amount}, 0.0
95
-
96
- ; 2. Audio input filtering (300Hz HPF, 3kHz LPF)
97
- rdax ${input.in}, 1.0
98
- rdfx ${reg.hpf}, 0.04
99
- wrhx ${reg.hpf}, -1.0
100
- rdfx ${reg.lpf}, 0.4
101
- wrlx ${reg.lpf}, -1.0
102
- wrax ${reg.sigfil}, 0.0039 ; Attenuate to avoid clipping in Hilbert chain
103
-
104
- ; 3. All-pass phase shifter bank (Sine path)
105
- rda ${mem.ap1} + 1, 0.995 ; 44Hz
106
- wrap ${mem.ap1}, -0.995
107
- rda ${mem.ap2} + 1, 0.937 ; 488Hz
108
- wrap ${mem.ap2}, -0.937
109
- rda ${mem.ap3} + 1, 0.61 ; 3531Hz
110
- wrap ${mem.ap3}, -0.61
111
- wrax ${reg.sigs}, 0.0
112
-
113
- ; 4. All-pass phase shifter bank (Cosine path)
114
- rdax ${reg.sigfil}, 0.0039 ; Match Sine path attenuation
115
- rda ${mem.ap4} + 1, 0.978 ; 178Hz
116
- wrap ${mem.ap4}, -0.978
117
- rda ${mem.ap5} + 1, 0.84 ; 1289Hz
118
- wrap ${mem.ap5}, -0.84
119
- rda ${mem.ap6} + 1, 0.0
120
- wrap ${mem.ap6}, 0.0
121
- wrax ${reg.sigc}, 0.0
122
-
123
- ; 5. Update Oscillator (Quadrature oscillator)
124
- rdax ${reg.cososc}, 1.0
125
- mulx ${reg.shift_amount}
126
- rdax ${reg.sinosc}, 1.0
127
- wrax ${reg.sinosc}, -1.0
128
- mulx ${reg.shift_amount}
129
- rdax ${reg.cososc}, 1.0
130
- wrax ${reg.cososc}, 0.0
131
-
132
- ; 6. Modulation and Summing (Hilbert - SpinCAD pattern)
133
- ; Sum = -2 * (in_c * cos + in_s * sin) -> Frequency DOWN if rate > 0
134
- rdax ${reg.sigc}, -2.0
135
- mulx ${reg.cososc}
136
- wrax ${reg.temp}, 0.0
137
- rdax ${reg.sigs}, -2.0
138
- mulx ${reg.sinosc}
139
- rdax ${reg.temp}, 1.0
140
-
141
- ; Scale back up to recovery signal level
142
- sof -2.0, 0.0
143
- sof -2.0, 0.0
144
- sof -2.0, 0.0
145
- sof -2.0, 0.0
146
- sof -2.0, 0.0
147
- sof -2.0, 0.0
148
- sof -2.0, 0.0
149
- wrax ${output.out}, 0.0
1
+ ---
2
+ {
3
+ "type": "effects.pitch.pitch_offset",
4
+ "name": "Pitch Offset (Hilbert)",
5
+ "category": "Effects",
6
+ "subcategory": "Pitch",
7
+ "description": "Bipolar frequency shift (+/-). Neutral at 12 o'clock, turning down lowers pitch, turning up raises pitch.",
8
+ "color": "#fcba03",
9
+ "inputs": [
10
+ {
11
+ "id": "in",
12
+ "name": "Audio Input",
13
+ "type": "audio",
14
+ "required": true
15
+ },
16
+ {
17
+ "id": "shift_ctrl",
18
+ "name": "Shift CV",
19
+ "type": "control",
20
+ "required": false,
21
+ "parameter": "shiftValue"
22
+ }
23
+ ],
24
+ "outputs": [
25
+ {
26
+ "id": "out",
27
+ "name": "Output",
28
+ "type": "audio"
29
+ }
30
+ ],
31
+ "parameters": [
32
+ {
33
+ "id": "shiftRange",
34
+ "name": "Shift Range (Hz)",
35
+ "type": "number",
36
+ "default": 600,
37
+ "min": 1,
38
+ "max": 2000,
39
+ "conversion": "HZ_TO_HILBERT_SHIFT",
40
+ "description": "The total frequency range covered by the Shift control (e.g. 600 means +/- 300Hz)."
41
+ },
42
+ {
43
+ "id": "shiftValue",
44
+ "name": "Shift",
45
+ "type": "number",
46
+ "default": 0.5,
47
+ "min": 0.0,
48
+ "max": 1.0,
49
+ "step": 0.01,
50
+ "description": "Manual control for pitch shift. 0.5 is neutral (no shift)."
51
+ }
52
+ ],
53
+ "registers": [
54
+ "sigs",
55
+ "sigc",
56
+ "lpf",
57
+ "hpf",
58
+ "sigfil",
59
+ "sinosc",
60
+ "cososc",
61
+ "temp",
62
+ "shift_amount",
63
+ "potfil"
64
+ ],
65
+ "memories": [
66
+ { "id": "ap1", "size": 2 },
67
+ { "id": "ap2", "size": 2 },
68
+ { "id": "ap3", "size": 2 },
69
+ { "id": "ap4", "size": 2 },
70
+ { "id": "ap5", "size": 2 },
71
+ { "id": "ap6", "size": 2 }
72
+ ]
73
+ }
74
+ ---
75
+ @section header
76
+
77
+ @section init
78
+ ; Initialize oscillator (cosine = 1.0)
79
+ skp run, done_init
80
+ or $7fffff
81
+ wrax ${reg.cososc}, 0.0
82
+ done_init:
83
+
84
+ @section main
85
+ ; 1. Process CV and smoothing
86
+ @cv shift_ctrl
87
+ ; ACC = Shift position (0..1, defaults to 0.5)
88
+ rdfx ${reg.potfil}, 0.001
89
+ wrlx ${reg.potfil}, -1.0
90
+ ; Map [0..1] to [Range/2 .. -Range/2]
91
+ ; Bipolar: (0.5 - shiftValue) * Range
92
+ sof -1.0, 0.5
93
+ sof ${shiftRange}, 0.0 ; Substitutes converted HZ_TO_HILBERT_SHIFT value
94
+ wrax ${reg.shift_amount}, 0.0
95
+
96
+ ; 2. Audio input filtering (300Hz HPF, 3kHz LPF)
97
+ rdax ${input.in}, 1.0
98
+ rdfx ${reg.hpf}, 0.04
99
+ wrhx ${reg.hpf}, -1.0
100
+ rdfx ${reg.lpf}, 0.4
101
+ wrlx ${reg.lpf}, -1.0
102
+ wrax ${reg.sigfil}, 0.0039 ; Attenuate to avoid clipping in Hilbert chain
103
+
104
+ ; 3. All-pass phase shifter bank (Sine path)
105
+ rda ${mem.ap1} + 1, 0.995 ; 44Hz
106
+ wrap ${mem.ap1}, -0.995
107
+ rda ${mem.ap2} + 1, 0.937 ; 488Hz
108
+ wrap ${mem.ap2}, -0.937
109
+ rda ${mem.ap3} + 1, 0.61 ; 3531Hz
110
+ wrap ${mem.ap3}, -0.61
111
+ wrax ${reg.sigs}, 0.0
112
+
113
+ ; 4. All-pass phase shifter bank (Cosine path)
114
+ rdax ${reg.sigfil}, 0.0039 ; Match Sine path attenuation
115
+ rda ${mem.ap4} + 1, 0.978 ; 178Hz
116
+ wrap ${mem.ap4}, -0.978
117
+ rda ${mem.ap5} + 1, 0.84 ; 1289Hz
118
+ wrap ${mem.ap5}, -0.84
119
+ rda ${mem.ap6} + 1, 0.0
120
+ wrap ${mem.ap6}, 0.0
121
+ wrax ${reg.sigc}, 0.0
122
+
123
+ ; 5. Update Oscillator (Quadrature oscillator)
124
+ rdax ${reg.cososc}, 1.0
125
+ mulx ${reg.shift_amount}
126
+ rdax ${reg.sinosc}, 1.0
127
+ wrax ${reg.sinosc}, -1.0
128
+ mulx ${reg.shift_amount}
129
+ rdax ${reg.cososc}, 1.0
130
+ wrax ${reg.cososc}, 0.0
131
+
132
+ ; 6. Modulation and Summing (Hilbert - SpinCAD pattern)
133
+ ; Sum = -2 * (in_c * cos + in_s * sin) -> Frequency DOWN if rate > 0
134
+ rdax ${reg.sigc}, -2.0
135
+ mulx ${reg.cososc}
136
+ wrax ${reg.temp}, 0.0
137
+ rdax ${reg.sigs}, -2.0
138
+ mulx ${reg.sinosc}
139
+ rdax ${reg.temp}, 1.0
140
+
141
+ ; Scale back up to recovery signal level
142
+ sof -2.0, 0.0
143
+ sof -2.0, 0.0
144
+ sof -2.0, 0.0
145
+ sof -2.0, 0.0
146
+ sof -2.0, 0.0
147
+ sof -2.0, 0.0
148
+ sof -2.0, 0.0
149
+ wrax ${output.out}, 0.0