-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
1506 lines (1462 loc) · 71.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!-- vim: set ts=4: -->
<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<!--
Modified from original Node-Red source, for audio system visualization
Copyright 2013 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<head>
<title>Audio System Design Tool for Tympan Audio Library</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" type="text/css" href="orion/built-editor.css"/>
<link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.min.css"/>
<link rel="stylesheet" href="style.css">
<style>
table.doc {border-spacing:3px; border-collapse:separate; font-size: 80%}
tr.top {background-color:#C0C0C0}
tr.odd {background-color:#F0F0F0}
tr.even {background-color:#E0E0E0}
p.func {padding-bottom:0; margin:0px}
p.desc {padding-left:2em; margin:0px; padding-top:0.2em; padding-bottom:0.8em; font-size:0.75em}
p.exam {padding-left:2em; text-indent:-1.2em; margin:0px; padding-top:0; padding-bottom:0.5em; font-size:0.75em; font-weight:bold}
pre.desc {padding-left:3em; margin:0px; padding-top:0em; padding-bottom:0.8em; font-size:0.75em;
background-color:#FFFFFF; border:0px; line-height:100%;
}
span.indent {padding-left:2em}
span.literal {color: #006699}
span.comment {color: #777755}
span.keyword {color: #cc6600}
span.function {color: #996600}
span.mainfunction {color: #993300; font-weight: bolder}
</style>
</head>
<body spellcheck="false">
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<span class="brand">Audio Design Tool for <a href="http://tympan.org" target="_blank">Tympan Audio System</a></span>
<div class="btn-group pull-right">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-align-justify"></i> <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a id="btn-sidebar" tabindex="-1" href="#"><i class="icon-ok pull-right"></i><i class="icon-list-alt"></i> Sidebar</a></li>
<li class="divider"></li>
<!-- <li><a id="btn-node-status" tabindex="-1" href="#"><i class="icon-ok pull-right"></i><i class="icon-info-sign"></i> Node Status</a></li>
<li class="divider"></li>
-->
<!--
<li class="dropdown-submenu pull-left"><a tabindex="-1" href="#"><i class="icon-edit"></i> Import from...</a>
<ul class="dropdown-menu">
<li><a id="btn-import" tabindex="-1" href="#"><i class="icon-edit"></i> Clipboard...</a></li>
<li id="flow-menu-parent" class="dropdown-submenu pull-left">
<a tabindex="-1" href="#"><i class="icon-book"></i> Library</a>
<ul class="dropdown-menu"></ul>
</li>
</ul>
</li>
<li id="li-menu-export" class="dropdown-submenu disabled pull-left"><a tabindex="-1" href="#"><i class="icon-share"></i> Export to...</a>
<ul class="dropdown-menu">
<li id="li-menu-export-clipboard" class="disabled"><a id="btn-export-clipboard" tabindex="-1" href="#"><i class="icon-share"></i> Clipboard...</a></li>
<li id="li-menu-export-library" class="disabled"><a id="btn-export-library" tabindex="-1" href="#"><i class="icon-book"></i> Library...</a></li>
</ul>
</li>
<li class="divider"></li>
-->
<!--
<li><a id="btn-config-nodes" tabindex="-1" href="#"><i class="icon-th-list"></i> Configuration nodes...</a></li>
<li class="divider"></li>
-->
<!--
<li class="dropdown-submenu pull-left"><a tabindex="-1" href="#"><i class="icon-th-large"></i> Workspaces</a>
<ul id="workspace-menu-list" class="dropdown-menu">
<li><a id="btn-workspace-add" tabindex="-1" href="#"><i class="icon-plus"></i> Add</a></li>
<li><a id="btn-workspace-edit" tabindex="-1" href="#"><i class="icon-edit"></i> Rename</a></li>
<li><a id="btn-workspace-delete" tabindex="-1" href="#"><i class="icon-minus"></i> Delete</a></li>
<li class="divider"></li>
</ul>
</li>
<li class="divider"></li>-->
<li><a id="btn-keyboard-shortcuts" tabindex="-1" href="#"><i class="icon-question-sign"></i> Keyboard Shortcuts</a></li>
<li><a id="btn-help" tabindex="-1" href="http://node-red.github.io/docs" target="_blank"><i class="icon-question-sign"></i> Help...</a></li>
</ul>
</div>
<div class="btn-group pull-left">
<a id="btn-deploy" class="btn action-deploy disabled" href="#"><i id="btn-icn-deploy" class="icon-upload"></i>Export</a>
<a id="btn-import" class="btn action-import disabled" href="#"><i id="btn-icn-download" class="icon-download"></i>Import</a>
</div>
</div>
</div>
</div>
<div id="main-container" class="sidebar-closed">
<div id="palette">
<img src="img/spin.svg" class="palette-spinner"/>
<div id="palette-container" class="palette-scroll">
</div>
<div id="palette-search">
<i class="icon-search"></i><input id="palette-search-input" type="text" placeholder="filter"><a href="#" id="palette-search-clear"><i class="icon-remove"></i></a></input>
</div>
</div><!-- /palette -->
<div id="workspace">
<ul id="workspace-tabs"></ul>
<!--<div id="workspace-add-tab"><a id="btn-workspace-add-tab" href="#"><i class="icon-plus"></i></a></div>-->
<div id="chart"></div>
<div id="workspace-toolbar">
<div class="btn-group">
<a class="btn btn-small" href="#"><i class="icon-zoom-out"></i></a>
<a class="btn btn-small" href="#"><i class="icon-th"></i></a>
<a class="btn btn-small" href="#"><i class="icon-zoom-in"></i></a>
</div>
</div>
</div>
<div id="chart-zoom-controls">
<div class="btn-group">
<a class="btn btn-mini" id="btn-zoom-out" href="#"><i class="icon-zoom-out"></i></a>
<a class="btn btn-mini" id="btn-zoom-zero" href="#"><i class="icon-th"></i></a>
<a class="btn btn-mini" id="btn-zoom-in" href="#"><i class="icon-zoom-in"></i></a>
</div>
</div>
<div id="sidebar">
<ul id="sidebar-tabs"></ul>
<div id="sidebar-content"></div>
</div>
<div id="sidebar-separator"></div>
</div>
<div id="notifications"></div>
<div id="dropTarget"><div>Drop the flow here</div></div>
<div id="dialog" class="hide"><form id="dialog-form" class="form-horizontal"></form></div>
<div id="node-config-dialog" class="hide"><form id="dialog-config-form" class="form-horizontal"></form><div class="form-tips" id="node-config-dialog-user-count"></div></div>
<div id="node-dialog-confirm-deploy" class="hide">
<form class="form-horizontal">
<div id="node-dialog-confirm-deploy-config" style="text-align: center; padding-top: 30px;">
Some of the nodes are not properly configured. Are you sure you want to deploy?
</div>
<div id="node-dialog-confirm-deploy-unknown" style="text-align: center; padding-top: 10px;">
The workspace contains some unknown node types:
<ul style="width: 300px; margin: auto; text-align: left;" id="node-dialog-confirm-deploy-unknown-list"></ul>
Are you sure you want to deploy?
</div>
</form>
</div>
<div id="node-dialog-error-deploy" class="hide">
<form class="form-horizontal">
<div id="node-dialog-error-deploy-noio" style="text-align: center; padding-top: 10px;">
<p>The workspace contains no input/output nodes!</p>
<p>You need an input or an output to export the data!</p>
<p>Without such a input/output function the exported
code will not run properly!</p>
</div>
</form>
</div>
<div id="node-help" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="node-help-label" aria-hidden="true">
<div class="modal-header">
<h5 id="node-help-label">Keyboard Shortcuts <span style="float: right;"><a href="http://node-red.github.io/docs" target="_blank">Open help in new window »</a></span></h5>
</div>
<div class="modal-body">
<table>
<tr>
<td><span class="help-key">?</span></td><td>Help</td>
<td><span class="help-key">Ctrl</span> <span class="help-key">a</span></td><td>Select all nodes</td>
</tr>
<tr>
<td><span class="help-key">Ctrl</span> <span class="help-key">Space</span></td><td>Toggle sidebar</td>
<td><span class="help-key">Shift</span> <span class="help-key">Click</span></td><td>Select all connected nodes</td>
</tr>
<tr>
<td><span class="help-key">Ctrl</span> <span class="help-key">z</span></td><td>Undo</td>
<td><span class="help-key">Ctrl</span> <span class="help-key">Click</span></td><td>Add/remove node from selection</td>
</tr>
<tr>
<td></td><td></td>
<td><span class="help-key">Delete</span></td><td>Delete selected nodes or link</td>
</tr>
<tr>
<td><span class="help-key">Ctrl</span> <span class="help-key">x</span></td><td>Cut selected nodes</td>
<td></td><td></td>
</tr>
<tr>
<td><span class="help-key">Ctrl</span> <span class="help-key">c</span></td><td>Copy selected nodes</td>
<td><span class="help-key">Ctrl</span> <span class="help-key">v</span></td><td>Paste nodes</td>
</tr>
<tr>
<td><span class="help-key">Ctrl</span> <span class="help-key">i</span></td><td>Import nodes</td>
<td><span class="help-key">Ctrl</span> <span class="help-key">e</span></td><td>Export selected nodes</td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td><span class="help-key">Ctrl</span> <span class="help-key">+</span></td><td>Zoom in</td>
<td><span class="help-key">Ctrl</span> <span class="help-key">-</span></td><td>Zoom out</td>
</tr>
</table>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
<div id="node-dialog-library-save-confirm" class="hide">
<form class="form-horizontal">
<div style="text-align: center; padding-top: 30px;">
A <span id="node-dialog-library-save-type"></span> called <span id="node-dialog-library-save-name"></span> already exists. Overwrite?
</div>
</form>
</div>
<div id="node-dialog-library-save" class="hide">
<form class="form-horizontal">
<div class="form-row">
<label for="node-dialog-library-save-folder"><i class="icon-folder-open"></i> Folder</label>
<input type="text" id="node-dialog-library-save-folder" placeholder="Folder">
</div>
<div class="form-row">
<label for="node-dialog-library-save-filename"><i class="icon-file"></i> Filename</label>
<input type="text" id="node-dialog-library-save-filename" placeholder="Filename">
</div>
</form>
</div>
<div id="node-dialog-library-lookup" class="hide">
<form class="form-horizontal">
<div class="form-row">
<ul id="node-dialog-library-breadcrumbs" class="breadcrumb">
<li class="active"><a href="#">Library</a></li>
</ul>
</div>
<div class="form-row">
<div style="vertical-align: top; display: inline-block; height: 100%; width: 30%; padding-right: 20px;">
<div id="node-select-library" style="border: 1px solid #999; width: 100%; height: 100%; overflow:scroll;"><ul></ul></div>
</div>
<div style="vertical-align: top; display: inline-block;width: 65%; height: 100%;">
<div style="height: 100%; width: 95%;" class="node-text-editor" id="node-select-library-text" ></div>
</div>
</div>
</form>
</div>
<div id="node-dialog-rename-workspace" class="hide">
<form class="form-horizontal">
<div class="form-row">
<label for="node-input-workspace-name" ><i class="icon-tag"></i> Name:</label>
<input type="text" id="node-input-workspace-name">
</div>
</form>
</div>
<div id="node-dialog-delete-workspace" class="hide">
<form class="form-horizontal">
<div style="text-align: center; padding-top: 30px;">
Are you sure you want to delete '<span id="node-dialog-delete-workspace-name"></span>'?
</div>
</form>
</div>
<script type="text/x-red" data-template-name="export-clipboard-dialog">
<div class="form-row">
<label for="node-input-export" style="display: block; width:100%;"><i class="icon-share"></i> Source Code:</label>
<textarea readonly style="font-family: monospace; font-size: 12px; background:rgb(226, 229, 255); padding-left: 0.5em;" class="input-block-level" id="node-input-export" rows="12"></textarea>
</div>
<div class="form-tips">
<a id="download-INO" target="_blank">Click to Download Zipped Code</a>
</div>
</script>
<script type="text/x-red" data-template-name="export-library-dialog">
<div class="form-row">
<label for="node-input-filename" ><i class="icon-tag"></i> Filename:</label>
<input type="text" id="node-input-filename" placeholder="Filename">
</div>
</script>
<script type="text/x-red" data-template-name="import-dialog">
<div class="form-row">
<label for="node-input-import"><i class="icon-share"></i>Nodes:</label>
<textarea style="font-family: monospace; font-size: 12px; background:rgb(226, 229, 255); padding-left: 0.5em;" class="input-block-level" id="node-input-import" rows="5" placeholder="Paste nodes here, or lookup in the library. When importing Arduino code, the whole flow will be replaced."></textarea>
</div>
<div class="form-tips">
<label for="node-input-arduino" style="font-size: 13px; padding: 2px 0px 0px 4px;">
<input style="margin-bottom: 4px; margin-right: 4px;" type="checkbox" id="node-input-arduino" checked="checked" class="input-block-level" />
Import copied code from the Arduino IDE
</label>
</div>
</script>
<script src="jquery/js/jquery-1.9.1.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="jquery/js/jquery-ui-1.10.3.custom.min.js"></script>
<script src="jquery/js/jquery.ui.touch-punch.min.js"></script>
<script src="jszip/dist/jszip.min.js"></script>
<script src="orion/built-editor.min.js"></script>
<script src="red/d3/d3.v3.min.js"></script>
<script src="red/main.js"></script>
<script src="red/ui/state.js"></script>
<script src="red/nodes.js"></script>
<script src="red/storage.js"></script>
<script src="red/history.js"></script>
<script src="red/ui/keyboard.js"></script>
<script src="red/ui/tabs.js"></script>
<script src="red/ui/view.js"></script>
<script src="red/ui/sidebar.js"></script>
<script src="red/ui/palette.js"></script>
<script src="red/ui/tab-info.js"></script>
<script src="red/ui/tab-config.js"></script>
<script src="red/ui/editor.js"></script>
<script src="red/ui/library.js"></script>
<script src="red/ui/notifications.js"></script>
<script src="red/ui/touch/radialMenu.js"></script>
<!--
TODO: generate some or all of this automatically from the C++ source
-->
<!--
TODO: add a field for maximum instance count
-->
<!--
TODO: add a field for exclusive to other objects (not allowed if they're used)
-->
<!--
TODO: add "parameters" fields, to replace the form html stuff
-->
<script type="text/x-red" data-container-name="NodeDefinitions">
{"nodes":[
{"type":"AudioCalcEnvelope_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"calcEnvelope","inputs":"1","output":"0","category":"calc-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioCalcGainWDRC_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"calcGainWDRC","inputs":"1","output":"0","category":"calc-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioCalcLevel_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"calcLevel","inputs":"NaN","output":"0","category":"calc-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"NaN"}},
{"type":"AudioCalcGainWDRC_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"calcGainWDRC","inputs":"NaN","output":"0","category":"calc-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"NaN"}},
{"type":"AudioEffectCompWDRC_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"compWDRC","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioEffectCompressor_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"compressor","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioEffectDelay_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"delay","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioEffectEmpty_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"empty","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioEffectGain_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"gain","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioFilterBiquad_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"biquad","inputs":"1","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioFilterFIR_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"fir","inputs":"1","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioFilterFreqWeighting_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"freqWeight","inputs":"NaN","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"NaN"}},
{"type":"AudioFilterTimeWeighting_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"timeWeight","inputs":"1","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMathAdd_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mathAdd","inputs":"2","output":"0","category":"math-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMathMultiply_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mathMultiply","inputs":"2","output":"0","category":"math-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMathOffset_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mathOffset","inputs":"1","output":"0","category":"math-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMathScale_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mathScale","inputs":"1","output":"0","category":"math-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMixer4_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mixer4","inputs":"4","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMixer8_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mixer8","inputs":"8","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"FFT_Overlapped_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"blockwiseFFT","inputs":"NaN","output":"0","category":"f-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"NaN"}},
{"type":"IFFT_Overlapped_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"blockwiseIFFT","inputs":"NaN","output":"0","category":"i-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"NaN"}},
{"type":"AudioInputI2S_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"audioInI2S","inputs":"0","output":"0","category":"input-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
{"type":"AudioOutputI2S_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"audioOutI2S","inputs":"2","output":"0","category":"output-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
{"type":"AudioInputUSB_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"audioInUSB","inputs":"0","output":"0","category":"input-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
{"type":"AudioOutputUSB_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"audioOutUSB","inputs":"2","output":"0","category":"output-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
{"type":"AudioPlayQueue_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"playQueue","inputs":"0","output":"0","category":"play-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioRecordQueue_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"recordQueue","inputs":"1","output":"0","category":"record-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
{"type":"AudioSynthNoisePink_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"noisePink","inputs":"0","output":"0","category":"synth-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioSynthWaveformSine_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"sine","inputs":"0","output":"0","category":"synth-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioSynthWaveform_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"waveform","inputs":"0","output":"0","category":"synth-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioSynthNoiseWhite_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"noiseWhite","inputs":"0","output":"0","category":"synth-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}}
]}
</script>
<script type="text/x-red" data-help-name="AudioCalcEnvelope_F32">
<p> AudioCalcEnvelope_F32</p>
<p> Created: Chip Audette, Feb 2017</p>
<p> Purpose: This module extracts the envelope of the audio signal.</p>
<p> Derived From: Core envelope extraction algorithm is from "smooth_env"</p>
<p> WDRC_circuit from CHAPRO from BTNRC: https://github.com/BTNRH/chapro</p>
<p> As of Feb 2017, CHAPRO license is listed as "Creative Commons?"</p>
<p> This processes a single stream fo audio data (ie, it is mono)</p>
<p> MIT License. use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioCalcEnvelope_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioCalcGainWDRC_F32">
<p> AudioCalcGainWDRC_F32</p>
<p> Created: Chip Audette, Feb 2017</p>
<p> Purpose: This module calculates the gain needed for wide dynamic range compression.</p>
<p> Derived From: Core algorithm is from "WDRC_circuit"</p>
<p> WDRC_circuit from CHAPRO from BTNRC: https://github.com/BTNRH/chapro</p>
<p> As of Feb 2017, CHAPRO license is listed as "Creative Commons?"</p>
<p> This processes a single stream fo audio data (ie, it is mono)</p>
<p> MIT License. use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioCalcGainWDRC_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioCalcLevel_F32">
<p>Time weighting for sound level meter. Defaults to SLOW</p>
</script>
<script type="text/x-red" data-template-name="AudioCalcLevel_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioCalcGainWDRC_F32">
<p> AudioCalcGainWDRC_F32: Wide Dynamic Rnage Compressor</p>
<p> Created: Chip Audette (OpenAudio) Feb 2017</p>
<p> Derived From: WDRC_circuit from CHAPRO from BTNRC: https://github.com/BTNRH/chapro</p>
<p> As of Feb 2017, CHAPRO license is listed as "Creative Commons?"</p>
<p> MIT License. Use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioCalcGainWDRC_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioEffectCompWDRC_F32">
<p> AudioCalcGainWDRC_F32: Wide Dynamic Rnage Compressor</p>
<p> Created: Chip Audette (OpenAudio) Feb 2017</p>
<p> Derived From: WDRC_circuit from CHAPRO from BTNRC: https://github.com/BTNRH/chapro</p>
<p> As of Feb 2017, CHAPRO license is listed as "Creative Commons?"</p>
<p> MIT License. Use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioEffectCompWDRC_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioEffectCompressor_F32">
<p> AudioEffectCompressor</p>
<p> Created: Chip Audette, Dec 2016 - Jan 2017</p>
<p> Purpose; Apply dynamic range compression to the audio stream.</p>
<p> Assumes floating-point data.</p>
<p> This processes a single stream fo audio data (ie, it is mono)</p>
<p> MIT License. use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioEffectCompressor_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioEffectDelay_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Delay a signal. Up to 8 separate delay taps can be used.</p>
<p align=center><img src="img/delay.png"><br><small>1 kHz burst, delayed 5.2 ms.</small></p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>In 0</td><td>Signal Input</td></tr>
<tr class=odd><td align=center>Out 0</td><td>Delay Tap #1</td></tr>
<tr class=odd><td align=center>Out 1</td><td>Delay Tap #2</td></tr>
<tr class=odd><td align=center>Out 2</td><td>Delay Tap #3</td></tr>
<tr class=odd><td align=center>Out 3</td><td>Delay Tap #4</td></tr>
<tr class=odd><td align=center>Out 4</td><td>Delay Tap #5</td></tr>
<tr class=odd><td align=center>Out 5</td><td>Delay Tap #6</td></tr>
<tr class=odd><td align=center>Out 6</td><td>Delay Tap #7</td></tr>
<tr class=odd><td align=center>Out 7</td><td>Delay Tap #8</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>delay</span>(channel, milliseconds);</p>
<p class=desc>Set output channel (0 to 7) to delay the signals by
milliseconds. The maximum delay is approx 425 ms. The actual delay
is rounded to the nearest sample. Each channel can be configured for
any delay. There is no requirement to configure the "taps" in increasing
delay order.
</p>
<p class=func><span class=keyword>disable</span>(channel);</p>
<p class=desc>Disable a channel. The output of this channel becomes
silent. If this channel is the longest delay, memory usage is
automatically reduced to accomodate only the remaining channels used.
</p>
<h3>Examples</h3>
<p class=exam>File > Examples > Audio > Effects > Delay
</p>
<h3>Notes</h3>
<p>Memory for the delayed signal is take from the memory pool allocated by
<a href="http://www.pjrc.com/teensy/td_libs_AudioConnection.html" target="_blank">AudioMemory()</a>.
Each block allows about 3 milliseconds of delay, so AudioMemory
should be increased to allow for the longest delay tap.
</p>
</script>
<script type="text/x-red" data-template-name="AudioEffectDelay_F32">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioEffectEmpty_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>This module does nothing. It passes through the signal with no
changes. If you open up the code, you can copy it to use as a template
to build your own audio processing block.
</p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>In 0</td><td>Input Signal</td></tr>
<tr class=odd><td align=center>Out 0</td><td>Output Signal</td></tr>
</table>
<h3>Functions</h3>
<p>Being an empty block, it has no functions.</p>
<!--
<h3>Examples</h3>
<p class=exam>File > Examples > Audio >
</p>
-->
</script>
<script type="text/x-red" data-template-name="AudioEffectEmpty_F32">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioEffectGain_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Scale the signal by a fixed amount. The gain is applied on a per-block
(as opposed to a per-sample) basis.
</p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>In 0</td><td>Signal Input</td></tr>
<tr class=odd><td align=center>Out 0</td><td>Result of Input Times Gain</td></tr>
</table>
<h3>Functions</h3>
<p>There are two functions for setting the gain of this block:</p>
<p class=func><span class=keyword>setGain</span>(gain);</p>
<p class=desc>Set the gain as a linear value. A value between 0.0 and 1.0
attenuates the signal while a value above 1.0 amplifies the signal. Negative
values will invert the signal.</p>
<p class=func><span class=keyword>setGain_dB</span>(gain_dB);</p>
<p class=desc>Set the gain using a decibel value (gain_dB = 20*log10(gain)).
A value less than zero attenuates the signal and a value greater than zero
amplifies the signal.</p>
<!--
<h3>Examples</h3>
<p class=exam>File > Examples > Audio >
</p>
-->
</script>
<script type="text/x-red" data-template-name="AudioEffectGain_F32">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioFilterBiquad_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Biquadratic cascaded filter, useful for all sorts of filtering.
Up to 4 stages may be cascaded.
</p>
<p align=center><img src="img/biquad.png"></p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>In 0</td><td>Signal to be filtered</td></tr>
<tr class=odd><td align=center>Out 0</td><td>Filtered Signal Output</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>setLowpass</span>(stage, frequency, Q);</p>
<p class=desc>Configure one stage of the filter (0 to 3) with low pass
response, with the specified corner frequency and Q shape. If Q is
higher that 0.7071, be careful of filter gain (see below).
</p>
<p class=func><span class=keyword>setHighpass</span>(stage, frequency, Q);</p>
<p class=desc>Configure one stage of the filter (0 to 3) with high pass
response, with the specified corner frequency and Q shape. If Q is
higher that 0.7071, be careful of filter gain (see below).
</p>
<p class=func><span class=keyword>setBandpass</span>(stage, frequency, Q);</p>
<p class=desc>Configure one stage of the filter (0 to 3) with band pass
response. The filter has unity gain at the specified frequency. Q
controls the width of frequencies allowed to pass.
</p>
<p class=func><span class=keyword>setNotch</span>(stage, frequency, Q);</p>
<p class=desc>Configure one stage of the filter (0 to 3) with band reject (notch)
response. Q controls the width of rejected frequencies.
</p>
<p class=func><span class=keyword>setLowShelf</span>(stage, frequency, gain, slope);</p>
<p class=desc>Configure one stage of the filter (0 to 3) with low shelf response.
A low shelf filter attenuates or amplifies signals below the specified frequency.
Frequency controls the slope midpoint, gain is in dB and can be both
positive or negative. The slope parameter controls steepness of gain transition.
A slope of 1 yields maximum steepness without overshoot,
lower values yield a less steep slope. See the picture below for a visualization
of the slope parameter's effect.
Be careful with positive gains and slopes higher than 1 as they introduce gain
(see warning below).
</p>
</p>
<p class=func><span class=keyword>setHighShelf</span>(stage, frequency, gain, slope);</p>
<p class=desc>Configure one stage of the filter (0 to 3) with high shelf response.
A high shelf filter attenuates or amplifies signals above the specified frequency.
Frequency controls the slope midpoint, gain is in dB and can be both
positive or negative. The slope parameter controls steepness of gain transition.
A slope of 1 yields maximum steepness without overshoot,
lower values yield a less steep slope. See the picture below for a visualization
of the slope parameter's effect.
Be careful with positive gains and slopes higher than 1 as they introduce gain
(see warning below).
</p>
<p align=center><img src="img/shelf_filter.png"></p>
<p class=func><span class=keyword>setCoefficients</span>(stage, array[5]);</p>
<p class=desc>Configure one stage of the filter (0 to 3) with an arbitrary
filter response. The array of coefficients is in order: B0, B1, B2, A1, A2.
Each coefficient must be less than 2.0 and greater than -2.0. The array
should be type double. Alternately, it may be type int, where 1.0 is
represented with 1073741824 (2<sup>30</sup>).
</p>
<h3>Examples</h3>
<p class=exam>File > Examples > Audio > Effects > Filter
</p>
<h3>Notes</h3>
<p>Filters can with gain must have their input signals attenuated, so the
signal does not exceed 1.0.
</p>
<p>This object implements up to 4 cascaded stages. Unconfigured stages will
not pass any signal.
</p>
<p>Biquad filters with low corner frequency (under about 400 Hz) can run into
trouble with limited numerical precision, causing the filter to perform
poorly. For very low corner frequency, the State Variable (Chamberlin)
filter should be used.
</p>
</script>
<script type="text/x-red" data-template-name="AudioFilterBiquad_F32">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioFilterFIR_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Finite impulse response filter, useful for all sorts of filtering.
</p>
<p align=center><img src="img/fir_filter.png"></p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>In 0</td><td>Signal to be filtered</td></tr>
<tr class=odd><td align=center>Out 0</td><td>Filtered Signal Output</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>begin</span>(filter_coeff, filter_length, block_size);</p>
<p class=desc>Initialize the filter. The filter_coeff must be an array of 32-bit floats (the
filter's impulse response), the filter_length indicates the number of points in the array,
and block_size is the length of the audio block that will be passed to this filtering
object during operation. The filter_coeff array may also be set as
FIR_PASSTHRU (with filter_length = 0), to directly pass the input to output without
filtering.
</p>
<p class=func><span class=keyword>end</span>();</p>
<p class=desc>Turn the filter off.
</p>
<!--
<h3>Examples</h3>
<p class=exam>File > Examples > Audio > Effects > Filter_FIR
</p>
-->
<h3>Known Issues</h3>
<p>Your filter's impulse response array must have an even length. If you have
add odd number of taps, you must add an extra zero to increase the length
to an even number.
</p>
<p>The minimum number of taps is 4. If you use less, add extra zeros to increase
the length to 4.
</p>
<p>The impulse response must be given in reverse order. Many filters have
symetrical impluse response, making this a non-issue. If your filter has
a non-symetrical response, make sure the data is in reverse time order.
</p>
<h3>Notes</h3>
<p>FIR filters requires more CPU time than Biquad (IIR), but they can
implement filters with better phase response.
</p>
<p>The free
<a href="http://t-filter.engineerjs.com/" target="_blank"> TFilter Design Tool</a>
can be used to create the impulse response array. Be sure to choose the desired sampling
frequency (the tool defaults to only 2000 Hz whereas Tympan defaults to 44117) and
the output type to "float" (32 bit).
</p>
</script>
<script type="text/x-red" data-template-name="AudioFilterFIR_F32">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioFilterFreqWeighting_F32">
<p>Frequency weighting. Defaults to A-Weighting</p>
</script>
<script type="text/x-red" data-template-name="AudioFilterFreqWeighting_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioFilterTimeWeighting_F32">
<p>Time weighting for sound level meter. Defaults to SLOW</p>
</script>
<script type="text/x-red" data-template-name="AudioFilterTimeWeighting_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioMathAdd_F32">
<p> AudioMathAdd_F32</p>
<p> Created: Chip Audette, Open Audio, July 2018</p>
<p> Purpose: Add together two channels (vectors) of audio data on a point-by-point basis</p>
<p> (like AudioMathMutiply, but addition). Assumes floating-point data.</p>
<p> This processes a single stream fo audio data (ie, it is mono)</p>
<p> MIT License. use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioMathAdd_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioMathMultiply_F32">
<p> AudioMathMultiply</p>
<p> Created: Patrick Radius, December 2016</p>
<p> Purpose: Multiply two channels of audio data. Can be used for example as 'vca' or amplitude modulation.</p>
<p> Assumes floating-point data.</p>
<p> This processes a single stream fo audio data (ie, it is mono)</p>
<p> MIT License. use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioMathMultiply_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioMathOffset_F32">
<p> AudioMathOffset_F32</p>
<p> Created: Chip Audette, Open Audio, June 2018</p>
<p> Purpose: Add a constant DC value to all audio samples</p>
<p> Assumes floating-point data.</p>
<p> This processes a single stream fo audio data (ie, it is mono)</p>
<p> MIT License. use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioMathOffset_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioMathScale_F32">
<p> AudioMathScale_F32</p>
<p> Created: Chip Audette, Open Audio, June 2018</p>
<p> Purpose: Multiply all audio samples by a single value (not vector)</p>
<p> Assumes floating-point data.</p>
<p> This processes a single stream fo audio data (ie, it is mono)</p>
<p> MIT License. use at your own risk.</p>
</script>
<script type="text/x-red" data-template-name="AudioMathScale_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioMixer4_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Combine up to 4 audio signals together, each with adjustable gain.
All channels support signal attenuation or amplification.</p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>In 0</td><td>Input signal #1</td></tr>
<tr class=odd><td align=center>In 1</td><td>Input signal #2</td></tr>
<tr class=odd><td align=center>In 2</td><td>Input signal #3</td></tr>
<tr class=odd><td align=center>In 3</td><td>Input signal #4</td></tr>
<tr class=odd><td align=center>Out 0</td><td>Sum of all inputs</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>gain</span>(channel, level);</p>
<p class=desc>Adjust the amplification or attenuation. "channel" must
be 0 to 3. "level" may be any floating point number. A level value of
1.0 passes the signal through directly. Between 0 to 1.0 attenuates the signal, and above
1.0 amplifies it. A level value of 0 shuts the channel
off completely. All 4 channels have separate settings.
</p>
<!--
<h3>Examples</h3>
<p class=exam>File > Examples > Audio > SamplePlayer
</p>
<p class=exam>File > Examples > Audio > Synthesis > PlaySynthMusic
</p>
<p class=exam>File > Examples > Audio > Analysis > SpectrumAnalyzerBasic
</p>
<p class=exam>File > Examples > Audio > Analysis > DialTone_Serial
</p>
<p class=exam>File > Examples > Audio > MemoryAndCpuUsage
</p>
-->
<h3>Notes</h3>
<p>More than 4 channels may be combined by connecting multiple mixers
in tandem. For example, a 16 channel mixer may be built using 5
mixers, where the fifth mixer combines the outputs of the first 4.
</p>
</script>
<script type="text/x-red" data-template-name="AudioMixer4_F32">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioMixer8_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Combine up to 8 audio signals together, each with adjustable gain.
All channels support signal attenuation or amplification.</p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>In 0</td><td>Input signal #1</td></tr>
<tr class=odd><td align=center>In 1</td><td>Input signal #2</td></tr>
<tr class=odd><td align=center>In 2</td><td>Input signal #3</td></tr>
<tr class=odd><td align=center>In 3</td><td>Input signal #4</td></tr>
<tr class=odd><td align=center>In 4</td><td>Input signal #5</td></tr>
<tr class=odd><td align=center>In 5</td><td>Input signal #6</td></tr>
<tr class=odd><td align=center>In 6</td><td>Input signal #7</td></tr>
<tr class=odd><td align=center>In 7</td><td>Input signal #8</td></tr>
<tr class=odd><td align=center>Out 0</td><td>Sum of all inputs</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>gain</span>(channel, level);</p>
<p class=desc>Adjust the amplification or attenuation. "channel" must
be 0 to 7. "level" may be any floating point number. A level value of
1.0 passes the signal through directly. Between 0 to 1.0 attenuates the signal, and above
1.0 amplifies it. A level value of 0 shuts the channel
off completely. All 4 channels have separate settings.
</p>
<!--
<h3>Examples</h3>
<p class=exam>File > Examples > Audio > SamplePlayer
</p>
<p class=exam>File > Examples > Audio > Synthesis > PlaySynthMusic
</p>
<p class=exam>File > Examples > Audio > Analysis > SpectrumAnalyzerBasic
</p>
<p class=exam>File > Examples > Audio > Analysis > DialTone_Serial
</p>
<p class=exam>File > Examples > Audio > MemoryAndCpuUsage
</p>
-->
<h3>Notes</h3>
<p>More than 8 channels may be combined by connecting multiple mixers
in tandem. For example, a 16 channel mixer may be built using three
mixers, where the third mixer combines the outputs of the first two.
</p>
</script>
<script type="text/x-red" data-template-name="AudioMixer8_F32">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="FFT_Overlapped_F32">
<p> FFT_Overrlapped_F32</p>
<p> Purpose: Encapsulate the ARM floating point FFT/IFFT functions</p>
<p> in a way that naturally interfaces to my float32</p>
<p> extension of the Teensy Audio Library.</p>
<p> Provides functionality to do overlapped FFT/IFFT where</p>
<p> each audio block is a fraction (1, 1/2, 1/4) of the</p>
<p> totaly FFT length. This class handles all of the</p>
<p> data shuffling to composite the previous data blocks</p>
<p> with the current data block to provide the full FFT.</p>
<p> Does similar data shuffling (overlapp-add) for IFFT.</p>
<p> Created: Chip Audette (openaudio.blogspot.com)</p>
<p> Jan-Jul 2017</p>
<p> Typical Usage as FFT:</p>
<p> //setup the audio stuff</p>
<p> float sample_rate_Hz = 44100.0; //define sample rate</p>
<p> int audio_block_samples = 32; //define size of audio blocks</p>
<p> AudioSettings_F32 audio_settings(sample_rate_Hz, audio_block_samples);</p>
<p> // ... continue creating all of your Audio Processing Blocks ...</p>
<p> // within a custom audio processing algorithm that you've written</p>
<p> // you'd create the FFT and IFFT elements</p>
<p> int NFFT = 128; //define length of FFT that you want (multiple of audio_block_samples)</p>
<p> FFT_Overrlapped_F32 FFT_obj(audio_settings,NFFT); //Creare FFT object</p>
<p> FFT_Overrlapped_F32 IFFT_obj(audio_settings,NFFT); //Creare IFFT object</p>
<p> float complex_2N_buffer[2*NFFT]; //create buffer to hold the FFT output</p>
<p> // within your own algorithm's "update()" function (which is what</p>
<p> // is called automatically by the Teensy Audio Libarary approach</p>
<p> // to audio processing), you can execute the FFT and IFFT</p>
<p> // First, get the audio and convert to frequency-domain using an FFT</p>
<p> audio_block_f32_t *in_audio_block = AudioStream_F32::receiveReadOnly_f32();</p>
<p> FFT_obj.execute(in_audio_block, complex_2N_buffer); //output is in complex_2N_buffer</p>
<p> AudioStream_F32::release(in_audio_block); //We just passed ownership to FFT_obj, so release it here.</p>
<p> // Next do whatever processing you'd like on the frequency domain data</p>
<p> // that is held in complex_2N_buffer</p>
<p> // Finally, you can convert back to the time domain via IFFT</p>
<p> audio_block_f32_t *out_audio_block = IFFT_obj.execute(complex_2N_buffer);</p>
<p> //note that the "out_audio_block" is mananged by IFFT_obj, so don't worry about releasing it.</p>
<p> License: MIT License</p>
</script>
<script type="text/x-red" data-template-name="FFT_Overlapped_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="IFFT_Overlapped_F32">
<p> FFT_Overrlapped_F32</p>
<p> Purpose: Encapsulate the ARM floating point FFT/IFFT functions</p>
<p> in a way that naturally interfaces to my float32</p>
<p> extension of the Teensy Audio Library.</p>
<p> Provides functionality to do overlapped FFT/IFFT where</p>
<p> each audio block is a fraction (1, 1/2, 1/4) of the</p>
<p> totaly FFT length. This class handles all of the</p>
<p> data shuffling to composite the previous data blocks</p>
<p> with the current data block to provide the full FFT.</p>
<p> Does similar data shuffling (overlapp-add) for IFFT.</p>
<p> Created: Chip Audette (openaudio.blogspot.com)</p>
<p> Jan-Jul 2017</p>
<p> Typical Usage as FFT:</p>
<p> //setup the audio stuff</p>
<p> float sample_rate_Hz = 44100.0; //define sample rate</p>
<p> int audio_block_samples = 32; //define size of audio blocks</p>
<p> AudioSettings_F32 audio_settings(sample_rate_Hz, audio_block_samples);</p>
<p> // ... continue creating all of your Audio Processing Blocks ...</p>
<p> // within a custom audio processing algorithm that you've written</p>
<p> // you'd create the FFT and IFFT elements</p>
<p> int NFFT = 128; //define length of FFT that you want (multiple of audio_block_samples)</p>
<p> FFT_Overrlapped_F32 FFT_obj(audio_settings,NFFT); //Creare FFT object</p>
<p> FFT_Overrlapped_F32 IFFT_obj(audio_settings,NFFT); //Creare IFFT object</p>
<p> float complex_2N_buffer[2*NFFT]; //create buffer to hold the FFT output</p>
<p> // within your own algorithm's "update()" function (which is what</p>
<p> // is called automatically by the Teensy Audio Libarary approach</p>
<p> // to audio processing), you can execute the FFT and IFFT</p>
<p> // First, get the audio and convert to frequency-domain using an FFT</p>
<p> audio_block_f32_t *in_audio_block = AudioStream_F32::receiveReadOnly_f32();</p>
<p> FFT_obj.execute(in_audio_block, complex_2N_buffer); //output is in complex_2N_buffer</p>
<p> AudioStream_F32::release(in_audio_block); //We just passed ownership to FFT_obj, so release it here.</p>
<p> // Next do whatever processing you'd like on the frequency domain data</p>
<p> // that is held in complex_2N_buffer</p>
<p> // Finally, you can convert back to the time domain via IFFT</p>
<p> audio_block_f32_t *out_audio_block = IFFT_obj.execute(complex_2N_buffer);</p>
<p> //note that the "out_audio_block" is mananged by IFFT_obj, so don't worry about releasing it.</p>
<p> License: MIT License</p>
</script>
<script type="text/x-red" data-template-name="IFFT_Overlapped_F32 ">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="AudioInputI2S_F32">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Receive float32 stereo audio from the <a href="https://www.tympan.org/">Tympan Audio Board</a>, the
<a href="http://www.pjrc.com/store/teensy3_audio.html" target="_blank">Teensy Audio Board</a>
or another I2S device, using I2S master mode.</p>
</div>
<h3>Audio Connections</h3>