@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,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.mixer2",
|
|
4
|
+
"category": "Gain/Mixing",
|
|
5
|
+
"name": "2:1 Mixer",
|
|
6
|
+
"description": "Mixes 2 audio inputs with optional gain control",
|
|
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": "level_1",
|
|
20
|
+
"name": "Level 1",
|
|
21
|
+
"type": "control"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "level_2",
|
|
25
|
+
"name": "Level 2",
|
|
26
|
+
"type": "control"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"outputs": [
|
|
30
|
+
{
|
|
31
|
+
"id": "output",
|
|
32
|
+
"name": "Output",
|
|
33
|
+
"type": "audio"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"parameters": [
|
|
37
|
+
{
|
|
38
|
+
"id": "gain1",
|
|
39
|
+
"name": "Input Gain 1",
|
|
40
|
+
"type": "number",
|
|
41
|
+
"min": -18,
|
|
42
|
+
"max": 0,
|
|
43
|
+
"default": -6,
|
|
44
|
+
"conversion": "DBLEVEL"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "gain2",
|
|
48
|
+
"name": "Input Gain 2",
|
|
49
|
+
"type": "number",
|
|
50
|
+
"min": -18,
|
|
51
|
+
"max": 0,
|
|
52
|
+
"default": -6,
|
|
53
|
+
"conversion": "DBLEVEL"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"color": "#2468f2"
|
|
57
|
+
}
|
|
58
|
+
---
|
|
59
|
+
@section main
|
|
60
|
+
@if pinConnected(Input 1)
|
|
61
|
+
rdax ${input.input1}, ${gain1}
|
|
62
|
+
@if pinConnected(Level 1)
|
|
63
|
+
mulx ${input.level_1}
|
|
64
|
+
@endif
|
|
65
|
+
wrax ${output.output}, 0.0
|
|
66
|
+
@endif
|
|
67
|
+
@if pinConnected(Input 2)
|
|
68
|
+
rdax ${input.input2}, ${gain2}
|
|
69
|
+
@if pinConnected(Level 2)
|
|
70
|
+
mulx ${input.level_2}
|
|
71
|
+
@endif
|
|
72
|
+
@if pinConnected(Input 1)
|
|
73
|
+
rdax ${output.output}, 1.0
|
|
74
|
+
@endif
|
|
75
|
+
wrax ${output.output}, 0.0
|
|
76
|
+
@endif
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.mixer3",
|
|
4
|
+
"category": "Gain/Mixing",
|
|
5
|
+
"name": "3:1 Mixer",
|
|
6
|
+
"description": "Mixes 3 audio inputs with optional gain control",
|
|
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": "input3",
|
|
20
|
+
"name": "Input 3",
|
|
21
|
+
"type": "audio"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "level_1",
|
|
25
|
+
"name": "Level 1",
|
|
26
|
+
"type": "control"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "level_2",
|
|
30
|
+
"name": "Level 2",
|
|
31
|
+
"type": "control"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "level_3",
|
|
35
|
+
"name": "Level 3",
|
|
36
|
+
"type": "control"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"outputs": [
|
|
40
|
+
{
|
|
41
|
+
"id": "output",
|
|
42
|
+
"name": "Output",
|
|
43
|
+
"type": "audio"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"parameters": [
|
|
47
|
+
{
|
|
48
|
+
"id": "gain1",
|
|
49
|
+
"name": "Input Gain 1",
|
|
50
|
+
"type": "number",
|
|
51
|
+
"min": -18,
|
|
52
|
+
"max": 0,
|
|
53
|
+
"default": -6,
|
|
54
|
+
"conversion": "DBLEVEL"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "gain2",
|
|
58
|
+
"name": "Input Gain 2",
|
|
59
|
+
"type": "number",
|
|
60
|
+
"min": -18,
|
|
61
|
+
"max": 0,
|
|
62
|
+
"default": -6,
|
|
63
|
+
"conversion": "DBLEVEL"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "gain3",
|
|
67
|
+
"name": "Input Gain 3",
|
|
68
|
+
"type": "number",
|
|
69
|
+
"min": -18,
|
|
70
|
+
"max": 0,
|
|
71
|
+
"default": -6,
|
|
72
|
+
"conversion": "DBLEVEL"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"color": "#2468f2"
|
|
76
|
+
}
|
|
77
|
+
---
|
|
78
|
+
@section main
|
|
79
|
+
@if pinConnected(Input 1)
|
|
80
|
+
rdax ${input.input1}, ${gain1}
|
|
81
|
+
@if pinConnected(Level 1)
|
|
82
|
+
mulx ${input.level_1}
|
|
83
|
+
@endif
|
|
84
|
+
wrax ${output.output}, 0.0
|
|
85
|
+
@endif
|
|
86
|
+
@if pinConnected(Input 2)
|
|
87
|
+
rdax ${input.input2}, ${gain2}
|
|
88
|
+
@if pinConnected(Level 2)
|
|
89
|
+
mulx ${input.level_2}
|
|
90
|
+
@endif
|
|
91
|
+
@if pinConnected(Input 1)
|
|
92
|
+
rdax ${output.output}, 1.0
|
|
93
|
+
@endif
|
|
94
|
+
wrax ${output.output}, 0.0
|
|
95
|
+
@endif
|
|
96
|
+
@if pinConnected(Input 3)
|
|
97
|
+
rdax ${input.input3}, ${gain3}
|
|
98
|
+
@if pinConnected(Level 3)
|
|
99
|
+
mulx ${input.level_3}
|
|
100
|
+
@endif
|
|
101
|
+
@if pinConnected(Input 1)
|
|
102
|
+
rdax ${output.output}, 1.0
|
|
103
|
+
@else
|
|
104
|
+
@if pinConnected(Input 2)
|
|
105
|
+
rdax ${output.output}, 1.0
|
|
106
|
+
@endif
|
|
107
|
+
@endif
|
|
108
|
+
wrax ${output.output}, 0.0
|
|
109
|
+
@endif
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.mixer4",
|
|
4
|
+
"category": "Gain/Mixing",
|
|
5
|
+
"name": "4:1 Mixer",
|
|
6
|
+
"description": "Mixes 4 audio inputs with optional gain control",
|
|
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": "input3",
|
|
20
|
+
"name": "Input 3",
|
|
21
|
+
"type": "audio"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "input4",
|
|
25
|
+
"name": "Input 4",
|
|
26
|
+
"type": "audio"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "level_1",
|
|
30
|
+
"name": "Level 1",
|
|
31
|
+
"type": "control"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "level_2",
|
|
35
|
+
"name": "Level 2",
|
|
36
|
+
"type": "control"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "level_3",
|
|
40
|
+
"name": "Level 3",
|
|
41
|
+
"type": "control"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "level_4",
|
|
45
|
+
"name": "Level 4",
|
|
46
|
+
"type": "control"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"outputs": [
|
|
50
|
+
{
|
|
51
|
+
"id": "output",
|
|
52
|
+
"name": "Output",
|
|
53
|
+
"type": "audio"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"parameters": [
|
|
57
|
+
{
|
|
58
|
+
"id": "gain1",
|
|
59
|
+
"name": "Input Gain 1",
|
|
60
|
+
"type": "number",
|
|
61
|
+
"min": -18,
|
|
62
|
+
"max": 0,
|
|
63
|
+
"default": -6,
|
|
64
|
+
"conversion": "DBLEVEL"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "gain2",
|
|
68
|
+
"name": "Input Gain 2",
|
|
69
|
+
"type": "number",
|
|
70
|
+
"min": -18,
|
|
71
|
+
"max": 0,
|
|
72
|
+
"default": -6,
|
|
73
|
+
"conversion": "DBLEVEL"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "gain3",
|
|
77
|
+
"name": "Input Gain 3",
|
|
78
|
+
"type": "number",
|
|
79
|
+
"min": -18,
|
|
80
|
+
"max": 0,
|
|
81
|
+
"default": -6,
|
|
82
|
+
"conversion": "DBLEVEL"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "gain4",
|
|
86
|
+
"name": "Input Gain 4",
|
|
87
|
+
"type": "number",
|
|
88
|
+
"min": -18,
|
|
89
|
+
"max": 0,
|
|
90
|
+
"default": -6,
|
|
91
|
+
"conversion": "DBLEVEL"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"color": "#2468f2"
|
|
95
|
+
}
|
|
96
|
+
---
|
|
97
|
+
@section header
|
|
98
|
+
@comment "Generated from spincad source file Mixer_4_to_1.spincad"
|
|
99
|
+
|
|
100
|
+
@section main
|
|
101
|
+
;REGISTERS
|
|
102
|
+
// we dont read input 1 unless it's connected
|
|
103
|
+
@if pinConnected(Input 1)
|
|
104
|
+
rdax ${input.input1}, ${gain1} ;read input signal
|
|
105
|
+
// if level 1 is connected we multiply by level 1
|
|
106
|
+
@if pinConnected(Level 1)
|
|
107
|
+
mulx ${input.level_1}
|
|
108
|
+
@endif
|
|
109
|
+
wrax ${output.output}, 0.0
|
|
110
|
+
@endif
|
|
111
|
+
@if pinConnected(Input 2)
|
|
112
|
+
rdax ${input.input2}, ${gain2}
|
|
113
|
+
@if pinConnected(Level 2)
|
|
114
|
+
mulx ${input.level_2}
|
|
115
|
+
@endif
|
|
116
|
+
@if pinConnected(Input 1)
|
|
117
|
+
rdax ${output.output}, 1.0
|
|
118
|
+
@endif
|
|
119
|
+
wrax ${output.output}, 0.0
|
|
120
|
+
@endif
|
|
121
|
+
@if pinConnected(Input 3)
|
|
122
|
+
rdax ${input.input3}, ${gain3}
|
|
123
|
+
@if pinConnected(Level 3)
|
|
124
|
+
mulx ${input.level_3}
|
|
125
|
+
@endif
|
|
126
|
+
@if pinConnected(Input 1)
|
|
127
|
+
rdax ${output.output}, 1.0
|
|
128
|
+
@else
|
|
129
|
+
@if pinConnected(Input 2)
|
|
130
|
+
rdax ${output.output}, 1.0
|
|
131
|
+
@endif
|
|
132
|
+
@endif
|
|
133
|
+
wrax ${output.output}, 0.0
|
|
134
|
+
@endif
|
|
135
|
+
@if pinConnected(Input 4)
|
|
136
|
+
rdax ${input.input4}, ${gain4}
|
|
137
|
+
@if pinConnected(Level 4)
|
|
138
|
+
mulx ${input.level_4}
|
|
139
|
+
@endif
|
|
140
|
+
@if pinConnected(Input 1)
|
|
141
|
+
rdax ${output.output}, 1.0
|
|
142
|
+
@else
|
|
143
|
+
@if pinConnected(Input 2)
|
|
144
|
+
rdax ${output.output}, 1.0
|
|
145
|
+
@else
|
|
146
|
+
@if pinConnected(Input 3)
|
|
147
|
+
rdax ${output.output}, 1.0
|
|
148
|
+
@endif
|
|
149
|
+
@endif
|
|
150
|
+
@endif
|
|
151
|
+
wrax ${output.output}, 0.0
|
|
152
|
+
@endif
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "math.volume",
|
|
4
|
+
"category": "Gain/Mixing",
|
|
5
|
+
"name": "Volume",
|
|
6
|
+
"description": "Applies a gain to the input signal",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"id": "input",
|
|
10
|
+
"name": "Input",
|
|
11
|
+
"type": "audio"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "volume",
|
|
15
|
+
"name": "Volume",
|
|
16
|
+
"type": "control"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"outputs": [
|
|
20
|
+
{
|
|
21
|
+
"id": "output",
|
|
22
|
+
"name": "Output",
|
|
23
|
+
"type": "audio"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"parameters": [
|
|
27
|
+
{
|
|
28
|
+
"id": "gain",
|
|
29
|
+
"name": "Input Gain",
|
|
30
|
+
"type": "number",
|
|
31
|
+
"min": -24,
|
|
32
|
+
"max": 0,
|
|
33
|
+
"default": -6,
|
|
34
|
+
"conversion": "DBLEVEL"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"color": "#2468f2"
|
|
38
|
+
}
|
|
39
|
+
---
|
|
40
|
+
@section header
|
|
41
|
+
@comment "Generated from spincad source file ${input.volume}.spincad"
|
|
42
|
+
|
|
43
|
+
@section main
|
|
44
|
+
;REGISTERS
|
|
45
|
+
@if pinConnected(${input.input})
|
|
46
|
+
rdax ${input.input}, ${gain} ;read ${input.input} signal
|
|
47
|
+
@if pinConnected(${input.volume})
|
|
48
|
+
mulx ${input.volume}
|
|
49
|
+
@endif
|
|
50
|
+
wrax ${output.output},0 ;${output.output} in ACC and lf1
|
|
51
|
+
@endif
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "input.adc",
|
|
4
|
+
"name": "ADC Input",
|
|
5
|
+
"category": "Input/Output",
|
|
6
|
+
"description": "Reads audio from an analog input (ADC) with adjustable gain.",
|
|
7
|
+
"color": "#2196F3",
|
|
8
|
+
"width": 150,
|
|
9
|
+
"labelTemplate": "ADC ${param.adcNumber == 0 ? 'L' : 'R'}",
|
|
10
|
+
"inputs": [],
|
|
11
|
+
"outputs": [
|
|
12
|
+
{
|
|
13
|
+
"id": "out",
|
|
14
|
+
"name": "Audio",
|
|
15
|
+
"type": "audio"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"parameters": [
|
|
19
|
+
{
|
|
20
|
+
"id": "adcNumber",
|
|
21
|
+
"name": "ADC Number",
|
|
22
|
+
"type": "select",
|
|
23
|
+
"default": 0,
|
|
24
|
+
"options": [
|
|
25
|
+
{
|
|
26
|
+
"label": "ADCL",
|
|
27
|
+
"value": 0
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"label": "ADCR",
|
|
31
|
+
"value": 1
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "gain",
|
|
37
|
+
"name": "Gain",
|
|
38
|
+
"type": "number",
|
|
39
|
+
"default": 1,
|
|
40
|
+
"min": 0,
|
|
41
|
+
"max": 1.9999,
|
|
42
|
+
"step": 0.01
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
---
|
|
47
|
+
@section input
|
|
48
|
+
@if adcNumber == 0
|
|
49
|
+
rdax ADCL, ${param.gain}
|
|
50
|
+
@else
|
|
51
|
+
rdax ADCR, ${param.gain}
|
|
52
|
+
@endif
|
|
53
|
+
wrax ${output.out}, 0
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "output.dac",
|
|
4
|
+
"name": "DAC Output",
|
|
5
|
+
"category": "Input/Output",
|
|
6
|
+
"description": "Writes audio to an analog output (DAC) with adjustable gain.",
|
|
7
|
+
"color": "#F44336",
|
|
8
|
+
"width": 150,
|
|
9
|
+
"inputs": [
|
|
10
|
+
{
|
|
11
|
+
"id": "in",
|
|
12
|
+
"name": "Audio",
|
|
13
|
+
"type": "audio",
|
|
14
|
+
"required": true
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"outputs": [],
|
|
18
|
+
"labelTemplate": "DAC ${param.dacNumber == 0 ? 'L' : 'R'}",
|
|
19
|
+
"parameters": [
|
|
20
|
+
{
|
|
21
|
+
"id": "dacNumber",
|
|
22
|
+
"name": "DAC Number",
|
|
23
|
+
"type": "select",
|
|
24
|
+
"default": 0,
|
|
25
|
+
"options": [
|
|
26
|
+
{
|
|
27
|
+
"label": "DACL",
|
|
28
|
+
"value": 0
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"label": "DACR",
|
|
32
|
+
"value": 1
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "gain",
|
|
38
|
+
"name": "Gain",
|
|
39
|
+
"type": "number",
|
|
40
|
+
"default": 1,
|
|
41
|
+
"min": -2,
|
|
42
|
+
"max": 1.9999,
|
|
43
|
+
"step": 0.01
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
---
|
|
48
|
+
@section output
|
|
49
|
+
|
|
50
|
+
; DAC Output
|
|
51
|
+
rdax ${input.in}, 1.0
|
|
52
|
+
|
|
53
|
+
@if gain != 1.0
|
|
54
|
+
sof ${param.gain}, 0.0
|
|
55
|
+
@endif
|
|
56
|
+
|
|
57
|
+
@if dacNumber == 0
|
|
58
|
+
wrax DACL, 0
|
|
59
|
+
@else
|
|
60
|
+
wrax DACR, 0
|
|
61
|
+
@endif
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "other.stickynote",
|
|
4
|
+
"name": "Sticky Note",
|
|
5
|
+
"category": "Other",
|
|
6
|
+
"description": "Add documentation comments to your diagram",
|
|
7
|
+
"color": "#FFEB3B",
|
|
8
|
+
"width": 120,
|
|
9
|
+
"inputs": [],
|
|
10
|
+
"outputs": [],
|
|
11
|
+
"parameters": [
|
|
12
|
+
{
|
|
13
|
+
"id": "text",
|
|
14
|
+
"name": "Note",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "Add your notes here...",
|
|
17
|
+
"multiline": true,
|
|
18
|
+
"description": "Text content for the sticky note. Will be added as comments in the assembly output."
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"labelTemplate": "${param.text}"
|
|
22
|
+
}
|
|
23
|
+
---
|
|
24
|
+
@comment ${param.text}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"type": "other.tonegen",
|
|
4
|
+
"category": "Other",
|
|
5
|
+
"name": "Tone Generator",
|
|
6
|
+
"description": "Sine wave generator with rotation matrix oscillator (4x oversampled) based on Spin Semi sample code",
|
|
7
|
+
"color": "#FF9800",
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "id": "coarse_freq", "name": "Coarse Freq", "type": "control", "required": false },
|
|
10
|
+
{ "id": "fine_freq", "name": "Fine Freq", "type": "control", "required": false },
|
|
11
|
+
{ "id": "amplitude", "name": "Amplitude", "type": "control", "required": false }
|
|
12
|
+
],
|
|
13
|
+
"outputs": [
|
|
14
|
+
{ "id": "out", "name": "Output", "type": "audio" }
|
|
15
|
+
],
|
|
16
|
+
"parameters": [
|
|
17
|
+
{
|
|
18
|
+
"id": "coarseFreq",
|
|
19
|
+
"name": "Coarse Frequency",
|
|
20
|
+
"type": "number",
|
|
21
|
+
"default": 0.5,
|
|
22
|
+
"min": 0.0,
|
|
23
|
+
"max": 1.0,
|
|
24
|
+
"step": 0.01
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "fineFreq",
|
|
28
|
+
"name": "Fine Frequency",
|
|
29
|
+
"type": "number",
|
|
30
|
+
"default": 0.5,
|
|
31
|
+
"min": 0.0,
|
|
32
|
+
"max": 1.0,
|
|
33
|
+
"step": 0.01
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "amplitude",
|
|
37
|
+
"name": "Amplitude",
|
|
38
|
+
"type": "number",
|
|
39
|
+
"default": 0.5,
|
|
40
|
+
"min": 0.0,
|
|
41
|
+
"max": 1.0,
|
|
42
|
+
"step": 0.01
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"registers": [
|
|
46
|
+
"freq", "s", "c", "p0fil", "p2fil", "amp"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
---
|
|
50
|
+
@section init
|
|
51
|
+
; Tone Generator init
|
|
52
|
+
skp run, tonegen_adjustable_init
|
|
53
|
+
sof 0.0, 0.5
|
|
54
|
+
wrax ${reg.s}, 0.0
|
|
55
|
+
tonegen_adjustable_init:
|
|
56
|
+
|
|
57
|
+
@section main
|
|
58
|
+
; Sine Wave Generator (rotation matrix, 4x oversampled)
|
|
59
|
+
|
|
60
|
+
; Calculate frequency
|
|
61
|
+
@if pinConnected(fine_freq)
|
|
62
|
+
rdax ${input.fine_freq}, 1.0
|
|
63
|
+
@else
|
|
64
|
+
sof 0.0, ${fineFreq}
|
|
65
|
+
@endif
|
|
66
|
+
sof 0.01, -0.005
|
|
67
|
+
|
|
68
|
+
@if pinConnected(coarse_freq)
|
|
69
|
+
rdax ${input.coarse_freq}, 0.625
|
|
70
|
+
@else
|
|
71
|
+
sof 1.0, (${param.coarseFreq} * 0.625)
|
|
72
|
+
@endif
|
|
73
|
+
sof 1.0, -0.66
|
|
74
|
+
exp 1.0, 0.0
|
|
75
|
+
|
|
76
|
+
; Filter the frequency control
|
|
77
|
+
rdfx ${reg.p0fil}, 0.01
|
|
78
|
+
wrax ${reg.p0fil}, 1.0
|
|
79
|
+
wrax ${reg.freq}, 0.0
|
|
80
|
+
|
|
81
|
+
; Calculate amplitude (dB/step)
|
|
82
|
+
@if pinConnected(amplitude)
|
|
83
|
+
rdax ${input.amplitude}, 0.9375
|
|
84
|
+
@else
|
|
85
|
+
sof 0.0, (${amplitude} * 0.9375)
|
|
86
|
+
@endif
|
|
87
|
+
|
|
88
|
+
; Filter amplitude control
|
|
89
|
+
rdfx ${reg.p2fil}, 0.01
|
|
90
|
+
wrax ${reg.p2fil}, 1.0
|
|
91
|
+
sof 1.0, -0.9375
|
|
92
|
+
exp 1.0, 0.0
|
|
93
|
+
wrax ${reg.amp}, 0.0
|
|
94
|
+
|
|
95
|
+
; Rotation matrix oscillator (4x oversampled)
|
|
96
|
+
|
|
97
|
+
; Iteration 1
|
|
98
|
+
rdax ${reg.c}, 1.0
|
|
99
|
+
mulx ${reg.freq}
|
|
100
|
+
rdax ${reg.s}, 1.0
|
|
101
|
+
wrax ${reg.s}, -1.0
|
|
102
|
+
mulx ${reg.freq}
|
|
103
|
+
rdax ${reg.c}, 1.0
|
|
104
|
+
wrax ${reg.c}, 0.0
|
|
105
|
+
|
|
106
|
+
; Iteration 2
|
|
107
|
+
rdax ${reg.c}, 1.0
|
|
108
|
+
mulx ${reg.freq}
|
|
109
|
+
rdax ${reg.s}, 1.0
|
|
110
|
+
wrax ${reg.s}, -1.0
|
|
111
|
+
mulx ${reg.freq}
|
|
112
|
+
rdax ${reg.c}, 1.0
|
|
113
|
+
wrax ${reg.c}, 0.0
|
|
114
|
+
|
|
115
|
+
; Iteration 3
|
|
116
|
+
rdax ${reg.c}, 1.0
|
|
117
|
+
mulx ${reg.freq}
|
|
118
|
+
rdax ${reg.s}, 1.0
|
|
119
|
+
wrax ${reg.s}, -1.0
|
|
120
|
+
mulx ${reg.freq}
|
|
121
|
+
rdax ${reg.c}, 1.0
|
|
122
|
+
wrax ${reg.c}, 0.0
|
|
123
|
+
|
|
124
|
+
; Iteration 4 (final - accumulate in ACC)
|
|
125
|
+
rdax ${reg.c}, 1.0
|
|
126
|
+
mulx ${reg.freq}
|
|
127
|
+
rdax ${reg.s}, 1.0
|
|
128
|
+
wrax ${reg.s}, -1.0
|
|
129
|
+
mulx ${reg.freq}
|
|
130
|
+
rdax ${reg.c}, 1.0
|
|
131
|
+
wrax ${reg.c}, 1.99
|
|
132
|
+
|
|
133
|
+
; Scale output by amplitude
|
|
134
|
+
mulx ${reg.amp}
|
|
135
|
+
|
|
136
|
+
; Write to output
|
|
137
|
+
wrax ${output.out}, 0.0
|