You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6159 lines
298 KiB
6159 lines
298 KiB
<!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.
|
|
|
|
*** NODES FOR OPENAUDIO_ARDUINOLIBRARY 1 March 2021 RSL ***
|
|
-->
|
|
<head>
|
|
<title>Audio System Design Tool for Open Audio F32 Library for Teensy</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 OpenAudio F32 Library for Teensy</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":"AudioAnalyzePhase_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"phaseDet","inputs":"1","output":"0","category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioAnalyzePeak_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"peak","inputs":1,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AudioAnalyzeRMS_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"rms","inputs":1,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AudioAnalyzeFFT1024_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FFT1024","inputs":1,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
|
|
{"type":"AudioAnalyzeFFT256_IQ_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FFT256iq","inputs":2,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"4"}},
|
|
{"type":"AudioAnalyzeFFT1024_IQ_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FFT1024iq","inputs":2,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"4"}},
|
|
{"type":"AudioAnalyzeFFT2048_IQ_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FFT2048iq","inputs":2,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"4"}},
|
|
{"type":"AudioAnalyzeFFT4096_IQ_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FFT4096iq","inputs":2,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
|
|
|
|
{"type":"AudioAnalyzeFFT4096_IQem_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FFT4096IQem","inputs":2,"outputs":0,"category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
|
|
|
|
{"type":"AudioAnalyzeToneDetect_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"toneDetect","inputs":"1","output":"0","category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
|
|
{"type":"analyze_CTCSS_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"toneCTCSS","inputs":"1","output":"1","category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"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":"1"}},
|
|
{"type":"AudioConvert_I16toF32","data":{"defaults":{"name":{"value":"new"}},"shortName":"convert_I16toF32","inputs":"0","output":"0","category":"convert-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioConvert_F32toI16","data":{"defaults":{"name":{"value":"new"}},"shortName":"convert_F32toI16","inputs":"1","output":"0","category":"convert-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
|
|
{"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_OA_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"delay","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioEmpty_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"empty","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioEffectCompressor2_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"compressor2","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioEffectNoiseGate_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"noiseGate","inputs":"1","output":"0","category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioEffectFreqShiftFD_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"freqShift","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":"AudioFilterFIRGeneral_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"filterFIRgeneral","inputs":"1","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioFilterEqualizer_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"filterEqualizer","inputs":"1","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioFilter90Deg_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"filter90deg","inputs":"2","output":"2","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"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":"AudioFilterConvolution_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"convFilt","inputs":"1","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioLMSDenoiseNotch_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"LMS","inputs":"1","output":"0","category":"filter-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioSpectralDenoise_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"Spectral","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":"AudioMathConstant_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mathConstant","inputs":"0","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":"AudioSDPlayer_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"playSdWav","inputs":0,"outputs":2,"category":"play-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"AudioSwitch4_OA_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"switch4","inputs":"1","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"4"}},
|
|
{"type":"AudioSwitch8_OA_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"switch8","inputs":"1","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"8"}},
|
|
{"type":"FFT_Overlapped_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"blockwiseFFT","inputs":"NaN","output":"0","category":"analyze-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":"analyze-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":"AudioInputSPDIF3_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"spdif3","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AsyncAudioInputSPDIF3_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"spdif_async","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"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":"AudioOutputSPDIF3_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"spdif3Out","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"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":"AudioSynthSineCosine_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"sine-cos","inputs":"0","output":"0","category":"synth-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"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"}},
|
|
{"type":"AudioSynthGaussian_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"GaussianWhiteNoise","inputs":"0","output":"0","category":"synth-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"AudioAlignLR_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"alignLR","inputs":"2","output":"0","category":"input-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"3"}},
|
|
{"type":"RadioFMDetector_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FMDetector","inputs":"1","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"radioModulatedGenerator_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"Modulator","inputs":"2","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"radioNoiseBlanker_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"NoiseBlank","inputs":"2","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"radioCESSBtransmit_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"CESSB_Mod","inputs":"1","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"radioCESSB_Z_transmit_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"CESSB_Z_Mod","inputs":"1","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"radioVoiceClipper_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"Clipper","inputs":"1","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"RadioFMDiscriminator_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FMDiscrim","inputs":"1","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"radioCWModulator_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"CWMod","inputs":"0","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"RadioBFSKModulator_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"BFSKMod","inputs":"0","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"UART_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"UART","inputs":"1","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
|
|
|
|
{"type":"RadioFT8Modulator_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FT8Mod","inputs":"0","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
|
|
{"type":"RadioFT8Demodulator_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"FT8Demod","inputs":"1","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"0"}},
|
|
|
|
{"type":"RadioIQMixer_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"I-QMixer","inputs":"2","output":"0","category":"radio-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
|
|
{"type":"AudioControlSGTL5000","data":{"defaults":{"name":{"value":"new"}},"shortName":"sgtl5000","inputs":0,"outputs":0,"category":"control-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AudioControlAK4558","data":{"defaults":{"name":{"value":"new"}},"shortName":"ak4558","inputs":0,"outputs":0,"category":"control-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AudioControlCS4272","data":{"defaults":{"name":{"value":"new"}},"shortName":"cs4272","inputs":0,"outputs":0,"category":"control-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AudioControlWM8731","data":{"defaults":{"name":{"value":"new"}},"shortName":"wm8731","inputs":0,"outputs":0,"category":"control-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AudioControlWM8731master","data":{"defaults":{"name":{"value":"new"}},"shortName":"wm8731m","inputs":0,"outputs":0,"category":"control-function","color":"#E6E0F8","icon":"arrow-in.png"}},
|
|
{"type":"AudioControlCS42448","data":{"defaults":{"name":{"value":"new"}},"shortName":"cs42448","inputs":0,"outputs":0,"category":"control-function","color":"#E6E0F8","icon":"arrow-in.png"}}
|
|
|
|
]}
|
|
</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>Used in support of other classes. Deprecated for use in an INO.
|
|
See Compressor and Compressor2 for complete, ready to use classes.</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 of audio data (ie, it is mono)</p>
|
|
<p>Used in support of other classes. Deprecated for use in an INO.
|
|
See Compressor and Compressor2 for complete, ready to use classes.</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>
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioConvert_I16toF32">
|
|
<!-- ============ AudioConvert_I16toF32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Takes daudio data in conventional Teensy Audio integer format,
|
|
and converts it to floating point data suitable for this F32 Audio library.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.2
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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>Out 0</td><td>Output F32 format</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
<p>There are no parameters to be modified and this class has no functions.
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > MyAudioEffect_Float
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>This is the Teensy Audio I16 to OpenAudio_F32 data cconverter. The 16-bit signed
|
|
integer input can range from -32768 to 32767 in level The floating point (F32)
|
|
output scales this same range to -1.0 to 0.9999695 usually called "-1 to +1."
|
|
There are no limits of signal range on the floating point side, so -1 to +1
|
|
is chosen for convenience. The integer data has a dynamic range that is 8-bits
|
|
less than that of the floating point side, so no loss of precision
|
|
occurs with this conversion. The integer value 0 converts to the floating point
|
|
value, 0.0.</p>
|
|
|
|
<p>Only an output is shown for this converter because this Design Tool only follows
|
|
the flow of F32 floating point data. Work is in progress to allow
|
|
a mix of I16 and F32 in the same Design Tool.</p>
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioConvert_I16toF32">>
|
|
<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>
|
|
|
|
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioConvert_F32toI16">
|
|
<!-- ============ AudioConvert_F32toI16 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Takes audio data in F32 Audio library floating point format conventional
|
|
and converts it to Teensy Audio integer I16 format.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.2
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 F32 format</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
<p>There are no parameters to be modified and this class has no functions.
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > MyAudioEffect_Float
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>This is the OpenAudio_F32 to Teensy Audio I16 data cconverter.
|
|
The floating point (F32) range must be limited to
|
|
a range of -1.0 to 0.9999695, usually called "-1 to +1," or
|
|
clipping will occur with this conversion. The 16-bit signed
|
|
integer output can only range from -32768 to 32767. Values outside
|
|
these limits will be clipped. The integer data will have a dynamic range
|
|
that is 8-bits less than that of the floating point side, and so a loss of precision
|
|
occurs with this conversion. The floating point vaue 0.0 converts
|
|
to an integer value of 0.
|
|
value, 0.0.</p>
|
|
|
|
|
|
<p>Only an input is shown for this converter because this Design Tool only follows
|
|
the flow of F32 floating point data. Work is in progress to allow
|
|
a mix of I16 and F32 in the same Design Tool.</p>
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioConvert_F32toI16">>
|
|
<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>
|
|
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioFilterEqualizer_F32">
|
|
<!-- ============ AudioFilterEqualizer_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Uses flat-delay FIR filtering to generate a filter with
|
|
arbitrary amplitude response.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 Equalized Signal</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
|
|
<p class=func><span class=keyword>equalizerNew</span>(<strong>uint16_t</strong> nBands, <strong>float</strong> *feq, <strong>float</strong> *adb, <strong>uint16_t</strong> nFIR, <strong>float</strong> *cf32f, <strong>float</strong> kdb);</p>
|
|
<p class=desc>Does the design of the equalizer and enables it for audio updates.
|
|
nBands is the number of frequecy bands,
|
|
feq points to an array of band tops in Hz,
|
|
adb points to an array of dB levels for the bands,
|
|
nFIR is the number of FIR coefficients being used and
|
|
kdb is the Kaiser window parameter that sets the sidelobe response.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>getResponse</span>(<strong>uint16_t</strong> nFreq, <strong>float</strong> *rdb);</p>
|
|
<p class=desc>Calculates the response of the equalizer in dB at nFreq equally spaced
|
|
frequencies. rdb is a pointer to an array of nFreq floats where the response can be put.
|
|
</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > TestEqualizer1
|
|
</p>
|
|
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > TestEqualizer1Audio
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>This equalizer is specified by an array of 'nBands' frequency bands
|
|
each of of arbitrary frequency span. The first band always starts at
|
|
0.0 Hz, and that value is not entered. Each band is specified by the upper
|
|
frequency limit to the band.
|
|
The last band always ends at half of the sample frequency, which for 44117 Hz
|
|
sample frequency would be 22058.5. Each band is specified by its upper
|
|
frequency in an .INO supplied array feq[]. The dB level of that band is
|
|
specified by a value, in dB, arranged in an .INO supplied array
|
|
aeq[]. Thus a trivial bass/treble control might look like:</p>
|
|
<pre class="desc">
|
|
nBands = 3;
|
|
feq[] = {300.0, 1500.0, 22058.5};
|
|
float32_t bass = -2.5; // in dB, relative to anything
|
|
float32_t treble = 6.0;
|
|
aeq[] = {bass, 0.0, treble};
|
|
</pre>
|
|
<p>Note that there is much, much more information in the
|
|
AudioFilterEqualizer_F32.h file at the OpenAudio_Arduino directory.
|
|
This includes more examples.</p>
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioFilterEqualizer_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>
|
|
|
|
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioFilterFIRGeneral_F32">
|
|
<!-- ============ AudioFilterFIRGeneral_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Uses flat-delay FIR filtering to generate Low Pass, High Pass,
|
|
Band Pas and Band Reject Filters, do the filtering and compute the
|
|
response.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 Filtered Signal</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
|
|
<p class=func><span class=keyword>FIRGeneralNew</span>(<strong>float</strong> *adb, <strong>uint16_t</strong> nFIR, <strong>float</strong> *cf32f, <strong>float</strong> kdb, <strong>float</strong> *pStateArray);</p>
|
|
<p class=desc>Does the design of the filter and enables it for audio updates.
|
|
adb points to an array of dB levels for the bands,
|
|
nFIR is the number of FIR coefficients being used,
|
|
cf32f is a pointer to an INO supplied array where the coefficients will be stored,
|
|
nBands is the number of frequecy bands,
|
|
feq points to an array of band tops in Hz,
|
|
kdb is the Kaiser window parameter that sets the sidelobe response, and
|
|
pStateArray is a pointer to an INO supplied 2*nFIR+128 array of floats for working space.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>LoadCoeffs</span>(<strong>uint16_t</strong> nFIR, <strong>float</strong> *cf32, <strong>float</strong> pStateArray);</p>
|
|
<p class=desc>Loads new filter coefficients that are INO supplied.
|
|
nFIR is the number of FIR coefficients being used,
|
|
cf32 is a pointer to an array of FIR coefficients (name of array)
|
|
pStateArray is a pointer to a 2*nFIR+128 array of floats for working space (name of array)
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>getResponse</span>(<strong>uint16_t</strong> nFreq, <strong>float</strong> *rdb);</p>
|
|
<p class=desc>Calculates the response of the equalizer in dB at nFreq equally spaced
|
|
frequencies. rdb is a pointer to an array of nFreq floats where the response can be put.</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > TestFIRGeneralLarge4
|
|
</p>
|
|
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > TestFIRGeneralLarge5
|
|
</p>
|
|
<h3>Notes</h3>
|
|
|
|
<p>For those new to C, when a pointer to an array is needed in a function call, just
|
|
supply the name of the array. See the examples to see how this works.</p>
|
|
|
|
<p>The frequency response of the filter is specfied by a series of ideal dB levels.
|
|
for instance, 0.0 dB for a pass band and -150.0 dB for a stop band.
|
|
IF nFIR is even, the response specification needs nFIR/2 points and if nFIR is odd,
|
|
it needs (nFIR+1)/2 points. The "to do" list has macros to specify the common
|
|
responses. Meanwhile, see the example INOs for methods of doing this. </p>
|
|
|
|
<p>The INO must supply memory that is used by the ARM FIR routine called workspace.
|
|
This is an array of float variables that is 2*nFIR+128 in size. The call to design and
|
|
use a filter need a pointer to this array, which for C is the name of the array.</p>
|
|
|
|
<p>The header file, AudioFilterFIRGeneral_F32.h in the OpenAudio_ArduinoLibrary directory
|
|
includes many notes, timing and examples. Be sure to look at those when getting
|
|
acquainted with this class.</p>
|
|
|
|
<p>FIR filters can be (and are here) implemented to have symmetrical coefficients. This
|
|
results in constant delay at all frequencies (linear phase). For some applications this can
|
|
be an important feature. Sometimes it is suggested that the FIR should not be
|
|
used because of the latency it creates. Note that if constant delay is needed, the FIR
|
|
implementation does this with minimum latency.</p>
|
|
|
|
<p>AudioFilterFIR_F32 in this OpenAudio_ArduinoLibrary handles 32-bit floating point
|
|
data and a maximum of 200 taps. This class requires the INO to provide the working
|
|
space and thereby puts no limit on the number of FIR taps (coefficients) being used.
|
|
The processor does run out of time, and that limits Teensy 3.6 to about 6000 taps
|
|
and Teensy 4.x to about 6000. As a starting spot for huge FIR filters, one might use
|
|
1/2 or 1/3 of those numbers.</p>
|
|
|
|
<p>It is practical to switch filter coefficient arrays on-the-fly.
|
|
See the LoadCoeffs() function. This class is initialized to a 4 coefficient
|
|
pass-through filter.</p>
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioFilterFIRGeneral_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>
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioFilterConvolution_F32">
|
|
<!-- ============ AudioFilterConvolution_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p> Convolutional filtering. Faster than a FIR if you want a 512 tap filter.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 Filtered Signal</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
|
|
<p class=func><span class=keyword>initFilter</span>(<strong>void</strong>);</p>
|
|
<p class=desc> Without parameters, the initFilter function does not design a filter, but rather
|
|
just uses whatever FIR coefficients are in place. These may have been
|
|
loaded by way of the getCoeffPtr() function or passThrough(1) may be in place. </p>
|
|
|
|
<p class=func><span class=keyword>initFilter</span>(<strong>float32_t</strong> fc,
|
|
<strong>float32_t</strong> Astop, <strong>int</strong> type, <strong>float32_t</strong> dfc);</p>
|
|
<p class=desc> Designs filters. fc is the edge frequency in Hz for LPF and HPF
|
|
and center frequency for BPF and BRF, Astop is the stopband attenuation in dB.
|
|
The parameter dfc is the filter bandwidth (only for bandpass and band reject).
|
|
The parameter type sets the filter per the following defines:
|
|
<pre class="desc">
|
|
LOWPASS Low pass with fc cutoff frequency
|
|
HIGHPASS High pass with fc cutoff frequency.
|
|
BANDPASS Band pass with fc center frequency and dfc pass band width.
|
|
BANDREJECT Band reject with fc center frequency and dfc reject band width.
|
|
HILBERT Hilbert transform. Not Currently Available
|
|
</pre>
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>passThrough</span>(<strong>int</strong>stat)</p>
|
|
<p class=desc>passThrough(int stat) allows data for this filter object to be passed through
|
|
unchanged with stat=1. The default is stat=0.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>getCoeffPtr</span>(<strong>void</strong>);</p>
|
|
<p class=desc>Returns a pointer to the coefficient array. To use this, compute
|
|
the coefficients of a 512 tap FIR filter with the desired response. Then
|
|
load the 512 float32_t buffer with the coefficients.
|
|
</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > TestConvolutionFilter_F32
|
|
</p>
|
|
|
|
|
|
<h3>Notes</h3>
|
|
|
|
<p>See the file AudioFilterConvolution_F32.h, as well as the example file, just above, for many notes,
|
|
hints and sample code.</p>.
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioFilterConvolution_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>
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioLMSDenoiseNotch_F32">
|
|
<!-- ============ AudioLMSDenoiseNotch_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Provides LMS denoise or auto-notch functions.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 Filtered Signal</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
<p class=func><span class=keyword>initializeLMS</span>(<strong>uint16_t</strong> what, <strong>uint16_t</strong> lengthDataF, <strong>uint16_t</strong> lengthDataD);</p>
|
|
<p class=desc>The parameter what must be either DENOISE or NOTCH. The lengthDataF buffer should
|
|
be a power of 2 between 2 and 128. It will be shifted down to a power of 2, if not. The delay
|
|
buffer size, lengthDataD can be any value between 1 and 16.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>setParameters</span>(<strong>float32_t</strong> beta, <strong>float32_t</strong> decay);</p>
|
|
<p class=desc>Sets the gain, beta, that varies the amount of denoise and notching. Adjust
|
|
for the desired sound.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>enable</span>(<strong>bool</strong> setEnable);</p>
|
|
<p class=desc>The parameter setEnable should be <strong>true</strong> or <strong>false.</strong>
|
|
If not enabled, the audio is passed through unchanged.
|
|
</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > LMS1.ino
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>This block can be changed at any time between denoise and auto-notching. Thus, usually
|
|
only one of these is used in a radio.</p>
|
|
<p>More notes are included in the file AudioLMSDenoiseNotch_F32.h</p>
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioLMSDenoiseNotch_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>
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioSpectralDenoise_F32">
|
|
<!-- ============ AudioSpectralDenoise_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Spectral Noise Reduction</p>
|
|
<p>Remove random noise, such as background noise or machine generated noise, and try
|
|
to leave voice intact.</p>
|
|
<p>Spectral NR does not try to remove constant tones or clicks and pops.</p>
|
|
<p>Spectral NR is generally not useful for cleaning up 'pure tone' sources, such as morse code.</p>
|
|
<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>setup</span>(<strong>AudioSettings_F32 &</strong>settings, <strong>int</strong> n_fft);</p>
|
|
<p class=desc>Setup the filter. Must be called if parameters not passed in to the
|
|
constructor. Can be re-called if other parameters have been changed to have
|
|
the changes take effect.
|
|
The maximum FFT size is dictated by the underlying FFT_OA code.
|
|
</p>
|
|
<p class=func><span class=keyword>enable</span>(<strong>bool</strong> start);</p>
|
|
<p class=desc>Turn on or offthe filter. The filter is enabled by default upon
|
|
creation.
|
|
</p>
|
|
<p class=func><span class=keyword>enabled</span>();</p>
|
|
<p class=desc>Return the enabled state of the filter.</p>
|
|
<p class=func><span class=keyword>getAsnr</span>();</p>
|
|
<p class=desc>Return the current ASNR value.</p>
|
|
<p class=func><span class=keyword>setAsnr</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the ASNR value. Active SNR.</p>
|
|
<p class=desc>Call <span class=keyword>setup()</span> for the change to take effect.</p>
|
|
<p class=func><span class=keyword>getVADHighFreq</span>();</p>
|
|
<p class=desc>Get the VAD band high frequency cutoff value.</p>
|
|
<p class=func><span class=keyword>setVADHighFreq</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the VAD High Frequency cutoff value. Sets the high
|
|
frequency value of the Voice Activity Detector (VAD) window.
|
|
</p>
|
|
<p class=desc>Call <span class=keyword>setup()</span> for the change to take effect.</p>
|
|
<p class=func><span class=keyword>getVADLowFreq</span>();</p>
|
|
<p class=desc>Get the VAD band low frequency value.</p>
|
|
<p class=func><span class=keyword>setVADLowFreq</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the VAD band low frequency value.</p>
|
|
<p class=desc>Call <span class=keyword>setup()</span> for the change to take effect.</p>
|
|
<p class=func><span class=keyword>getNRAlpha</span>();</p>
|
|
<p class=desc>get the NRalpha value. NR alpha is the time smoothing constant. It's
|
|
range is clipped between 0.9 and 0.9999 in the code. Settings >0.95
|
|
generally recommended, or you can get strong reverb and 'watery' effects.
|
|
</p>
|
|
<p class=func><span class=keyword>setNRAlpha</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the NRalpha value.</p>
|
|
<p class=desc>The change takes effect immediately.</p>
|
|
<p class=func><span class=keyword>getSNRPrioMin</span>();</p>
|
|
<p class=desc>Get the SNR prior value.</p>
|
|
<p class=func><span class=keyword>setSNRPrioMin</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the SNR prior value.</p>
|
|
<p class=desc>The change takes effect immediately.</p>
|
|
<p class=func><span class=keyword>getNRWidth</span>();</p>
|
|
<p class=desc>Get the NR width. Used for the measuring 'span' in the musical note
|
|
reduction code.
|
|
</p>
|
|
<p class=func><span class=keyword>setNRWidth</span>(<strong>int16_t</strong> value);</p>
|
|
<p class=desc>Set the NR width.</p>
|
|
<p class=desc>The change takes effect immediately.</p>
|
|
<p class=func><span class=keyword>getPowerThreshold</span>();</p>
|
|
<p class=desc>Get the power threshold. Used to limit the effects of the musical
|
|
note reduction code.
|
|
</p>
|
|
<p class=func><span class=keyword>setPowerThreshold</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the power threshold.</p>
|
|
<p class=desc>The change takes effect immediately.</p>
|
|
<p class=func><span class=keyword>getTaxFactor</span>();</p>
|
|
<p class=desc>Get the noise output smoothing factor.</p>
|
|
<p class=func><span class=keyword>setTaxFactor</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the noise output smoothing factor. Typical values are around 0.8.</p>
|
|
<p class=desc>Call <span class=keyword>setup()</span> for the change to take effect.</p>
|
|
<p class=func><span class=keyword>getTapFactor</span>();</p>
|
|
<p class=desc>Get the speech probability smoothing factor.</p>
|
|
<p class=func><span class=keyword>setTapFactor</span>(<strong>float32_t</strong> value);</p>
|
|
<p class=desc>Set the speech probability smoothing factor. Typical values are around 0.9.</p>
|
|
<p class=desc>Call <span class=keyword>setup()</span> for the change to take effect.</p>
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > SpectralDenoise.ino
|
|
</p>
|
|
<h3>Notes</h3>
|
|
<p> The defaults work OK, but it is worth experimenting with the adjustable
|
|
parameters for your specific situation. Try adjusting NRAlpha, NRWidth and Asnr.
|
|
</p>
|
|
<p> The default FFT size is 256. You may wish to make this larger, which will allow
|
|
a finer granularity of 'buckets' to potentially improve the noise reduction, but,
|
|
will cost both processor time and memory overheads.
|
|
</p>
|
|
<p> The maximum FFT size is set by the underlying <strong>FFT_OA</strong> code, which at
|
|
time of writing limits the maximum to 2048.
|
|
</p>
|
|
<p> The code is written to account for the <strong>sample_rate_Hz</strong> passed in with
|
|
the audio settings, <strong>but</strong>, this has not been tested. If you do test,
|
|
either with a higher or lower sample rate, please report back and consider fixing
|
|
this documentation.
|
|
</p>
|
|
<h3>References</h3>
|
|
<p>The best reference on how the Spectral code was designed and works can be found on the
|
|
<a href="https://github.com/df8oe/UHSDR/wiki/Noise-reduction"> UHSDR wiki </a>
|
|
</p>
|
|
</script>
|
|
</div>
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioFilter90Deg_F32">
|
|
<!-- ============ AudioFilter90Deg_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Creates two uncoupled paths that almost have the same amplitude gain
|
|
but differ in phase by exactly 90 degrees. </p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 Hilbert Filtered</td></tr>
|
|
<tr class=odd><td align=center>In 1</td><td>Input Signal Delayed</td></tr>
|
|
<tr class=odd><td align=center>Out 0</td><td>Output Signal Hilbert Filtered</td></tr>
|
|
<tr class=odd><td align=center>Out 1</td><td>Output Signal Delayed</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
|
|
<p class=func><span class=keyword>begin</span>(<strong>float</strong> *pCoeff, <strong>int</strong> nCoeff);</p>
|
|
<p class=desc>Initializes this block, with pCoeff being a pointer to array of F32 Hilbert Transform coefficients,
|
|
and nCoeff being the number of Hilbert transform coefficients (odd).
|
|
</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > ReceiverPart1
|
|
</p>
|
|
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > ReceiverPart2
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>This consists of two uncoupled paths that almost have the same amplitude gain
|
|
but differ in phase by exactly 90 degrees.
|
|
The number of coefficients is an odd number for the FIR Hilbert transform
|
|
as that produces an easily achievable integer sample period delay.</p>
|
|
|
|
<p>No default Hilbert Transform is provided, as it is highly application dependent.
|
|
The number of coefficients is an odd number with a maximum of 250. The Iowa
|
|
Hills program can design such a Hilbert Transform filter.</p>
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioFilter90Deg_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>
|
|
|
|
|
|
<!-- ============ AudioEffectCompressor_F32 ========= -->
|
|
<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>
|
|
<p> Note: This help documentation is incomplete. See AudioEffectCompressor2_F32
|
|
for a similar block, with documentation. Compressor2 includes up to 5 segments and
|
|
look ahead delay, as well.</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>
|
|
|
|
<!-- ============ AudioEffectDelay_OA_F32 ========= -->
|
|
<script type="text/x-red" data-help-name="AudioEffectDelay_OA_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_OA_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>
|
|
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioEffectFreqShiftFD_F32">
|
|
<!-- ============ AudioEffectFreqShiftFD_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>This shifts frequencies of entire audio spectrums by use of FFT and IFFT
|
|
with bin shifting. </p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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>Shifted Output Signal</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
|
|
<p class=func><span class=keyword>setup</span>(<strong>AudioSettings_F32 </strong> &settings, <strong>int</strong> N_FFT);</p>
|
|
<p class=desc>Initializes the needed FFTs. Returns the size of FFT achieved
|
|
or a negative number if unsuccessful. See example below for determining N_FFT.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>setShift_bins</span>(<strong>int</strong> nBins);</p>
|
|
<p class=desc>Sets nBins, the number of FFT bins of frequency shift.
|
|
</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > FrequencyShifter_FD_OA
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>Created: Chip Audette (OpenAudio) Aug 2019</p>
|
|
|
|
<p>This processing is performed in the frequency domain.
|
|
Frequencies can only be shifted by an integer number of bins,
|
|
so small frequency shifts are not possible. For example, for
|
|
a sample rate of 44.1kHz, and when using N=256, one can only
|
|
shift frequencies in multiples of 44.1/256 = 172.3 Hz.</p>
|
|
|
|
<p>This processing is performed in the frequency domain where
|
|
we take the FFT, shift the bins upward or downward, take
|
|
the IFFT, and listen to the results. In effect, this is
|
|
single sideband modulation, which will sound very unnatural
|
|
(like robot voices!). Maybe you'll like it, or maybe not.
|
|
Probably not, unless you like weird. ;) </p>
|
|
|
|
<p>You can shift frequencies upward or downward with this algorithm.</p>
|
|
<p>This class supports changes in block size by AudioSettings_F32.</p>
|
|
<p> Also see an I-Q mixing approach with fine tuning in the example: </p>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > FineFreqShift_OA
|
|
</p>
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioEffectFreqShiftFD_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>
|
|
|
|
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioSwitch4_OA_F32">
|
|
<!-- ============ AudioSwitch4_OA_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Switch one input to 4 outputs, which only triggers 1 of the 4
|
|
audio processing paths (thus saving computation on paths that you aren't
|
|
using). Use with mixer-4 for up to 4 paths of alternate processing.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.2
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 0</td></tr>
|
|
<tr class=odd><td align=center>Out 0</td><td>Switch Output Signal 0</td></tr>
|
|
<tr class=odd><td align=center>Out 1</td><td>Switch Output Signal 1</td></tr>
|
|
<tr class=odd><td align=center>Out 2</td><td>Switch Output Signal 2</td></tr>
|
|
<tr class=odd><td align=center>Out 3</td><td>Switch Output Signal 3</td></tr>
|
|
</table>
|
|
|
|
<h3>Functions</h3>
|
|
<p class=func><span class=keyword>setChannel</span>(<strong>int</strong> channel);</p>
|
|
<p class=desc>Selects the output path that will be active, 0 to 7. Returns the selected path, if valid.
|
|
</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > Switches_float
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>If you have two audio paths, like a SSB receiver path and an AM receiver path, you can
|
|
shut off the data going to the unused path with this AudioSwitch4_F32 class.
|
|
The AudioStream will not supply the packet to the next
|
|
object and that, in turn, will cause it to not request a transmission to the next
|
|
thing down the chain. The AudioStream routines do not create errors, it turns out,
|
|
and you save all the processing time and memory usage for the unused paths.</p>
|
|
|
|
<p>There is an 8 output version in the palette, if you need more outputs.</p>
|
|
|
|
<p>Created: Chip Audette, OpenAudio, April 2019</p>
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioSwitch4_OA_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>
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioSwitch8_OA_F32">
|
|
<!-- ============ AudioSwitch8_OA_F32 ========= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Switch one input to 8 outputs, which only triggers 1 of the 8
|
|
audio processing paths (thus saving computation on paths that you aren't
|
|
using). Use with mixer-8 for up to 8 paths of alternate processing.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.2
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 0</td></tr>
|
|
<tr class=odd><td align=center>Out 0</td><td>Switch Output Signal 0</td></tr>
|
|
<tr class=odd><td align=center>Out 1</td><td>Switch Output Signal 1</td></tr>
|
|
<tr class=odd><td align=center>Out 2</td><td>Switch Output Signal 2</td></tr>
|
|
<tr class=odd><td align=center>Out 3</td><td>Switch Output Signal 3</td></tr>
|
|
<tr class=odd><td align=center>Out 4</td><td>Switch Output Signal 4</td></tr>
|
|
<tr class=odd><td align=center>Out 5</td><td>Switch Output Signal 5</td></tr>
|
|
<tr class=odd><td align=center>Out 6</td><td>Switch Output Signal 6</td></tr>
|
|
<tr class=odd><td align=center>Out 7</td><td>Switch Output Signal 7</td></tr>
|
|
</table>
|
|
|
|
<h3>Functions</h3>
|
|
<p class=func><span class=keyword>setChannel</span>(<strong>int</strong> channel);</p>
|
|
<p class=desc>Selects the output path that will be active, 0 to 7. Returns the selected path, if valid.
|
|
</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > Switches_float
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>If you have multiple audio paths, like 5 different demodulators, you can
|
|
shut off the data going to the unused paths with this AudioSwitch8_F32 class.
|
|
The AudioStream will not supply the packet to the next
|
|
object and that, in turn, will cause it to not request a transmission to the next
|
|
thing down the chain. The AudioStream routines do not create errors, it turns out,
|
|
and you save all the processing time and memory usage for the unused paths.</p>
|
|
|
|
<p>There is an 4 output version in the palette, if you need less outputs.</p>
|
|
|
|
<p>Created: Chip Audette, OpenAudio, April 2019</p>
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioSwitch8_OA_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>
|
|
|
|
|
|
|
|
<div>
|
|
<script type="text/x-red" data-help-name="AudioAnalyzePhase_F32">
|
|
<!-- <h2> ============ AudioAnalyzePhase_F32 AudioAnalyzePhase_F32 =========</h2> -->
|
|
<h3>AudioAnalyzePhase_F32</h3>
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>This block can be used to measure phase between two sinusoid inputs.
|
|
The default output IIR filter, 4-cascaded stages of BiQuad,
|
|
is suitable for this with a cut-off
|
|
frequency of 100 Hz. As an alternative, a linear phase
|
|
FIR filter can be set up with the begin function. The built in FIR
|
|
LP filter has a cutoff frequency of 4 kHz when used
|
|
at a 44.1 kHz sample rate. Any FIR filter can be used
|
|
with the setAnalyzeConfig function.
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.2
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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>Reference Sinewave</td></tr>
|
|
<tr class=odd><td align=center>In 1</td><td>Measure Sinewave</td></tr>
|
|
<tr class=odd><td align=center>Out 0</td><td>Measured Phase Angle</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
<p class=func><span class=keyword>setAnalyzePhaseConfig</span>(<strong>uint16_t</strong> LPType, <strong>float32_t</strong> *pCoeffs, <strong>uint16_t</strong> nCoeffs);</p>
|
|
<p class=desc> </p>
|
|
<p>Changes the output filter from the IIR default, where:
|
|
<ul>
|
|
<li>LPType is NO_LP_FILTER, IIR_LP_FILTER, FIR_LP_FILTER to select the output filter</li>
|
|
<li>pCoeffs is a pointer to filter coefficients, either IIR or FIR</li>
|
|
<li>nCoeffs is the number of filter coefficients</li>
|
|
</ul>
|
|
</p>
|
|
<p class=func><span class=keyword>setAnalyzePhaseConfig</span>(<strong>uint16_t</strong> LPType, <strong>float32_t</strong> *pCoeffs, <strong>uint16_t</strong> nCoeffs, <strong>uint16_t</strong> pdConfig);</p>
|
|
<p class=desc>Is the same as above, but controls pdConfig which is a bitwiseconfiguration selection selection:</li>
|
|
<pre class="desc">
|
|
Bit 0: 0=No Limiter (default) 1=Use limiter
|
|
Bit 2,1: 00=Use no acos linearizer
|
|
01=undefined
|
|
10=Fast, math-continuous acos() (default)
|
|
11=Accurate acosf()
|
|
Bit 3: 0=No scale of multiplier 1=scale to min-max (default)
|
|
Bit 4: 0=Output in degrees 1=Output in radians (default)
|
|
</pre>
|
|
</p>
|
|
<p class=func><span class=keyword>showError</span>(<strong>uint16_t</strong> e);</p>
|
|
<p class=desc>sets whether error printing comes from update (e=1) or not (e=0)
|
|
</p>
|
|
<p>This class supports programmable block size and sample rate via Settings_F32.</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > AudioTestAnalyzePhase
|
|
</p>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > AudioTestSinCos
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>There are two inputs, 0 and 1 (Left and Right)
|
|
There is one output, the phase angle between 0 & 1 expressed in
|
|
radians (180 degrees is Pi radians) or degrees. This is a 180-degree
|
|
type of phase detector. See RadioIQMixer_F32 for a 360 degree type.
|
|
</p>
|
|
|
|
<p><strong>Defaults:</strong> 100 Hz IIR LP, output is in radians, and this does not need a call to begin().</p>
|
|
|
|
<p> A FIR LP is available where linear phase is needed, or NO_LP_FILTER that leaves
|
|
harmonics of the input frequency. A limiter is available to remove amplitude effects. Scaling of the output
|
|
levels can be done. Many more details are available from AudioAnalyzePhase_F32.h in
|
|
the OpenAudio_ArduinoLibrary. </p>
|
|
|
|
</script>
|
|
<script type="text/x-red" data-template-name="AudioAnalyzePhase_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>
|
|
|
|
|
|
<div> <!-- Audio Input category -->
|
|
<script type="text/x-red" data-help-name="AudioEffectNoiseGate_F32">
|
|
<!-- ============ AudioEffectNoiseGate_F32 ======= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Apply envelope controlled threshold to a signal.
|
|
Inputs below a given level are removed.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.2
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 In</td></tr>
|
|
<tr class=odd><td align=center>Out 0</td><td>Gated Signal Out</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
|
|
<p class=func><span class=keyword>setThreshold</span>(<strong>float </strong>dBFS);</p>
|
|
<p class=desc>Sets threshold to mute below, in dBFS (relative to full scale input),
|
|
such as -40.0.</p>
|
|
|
|
<p class=func><span class=keyword>setOpeningTime</span>(<strong>float </strong>tOpen);</p>
|
|
<p class=desc>In units of seconds, such as 0.02.</p>
|
|
|
|
<p class=func><span class=keyword>setClosingTime</span>(<strong>float </strong>tClose);</p>
|
|
<p class=desc>In units of seconds, such as 0.05.</p>
|
|
|
|
<p class=func><span class=keyword>setHoldTime</span>(<strong>float </strong>tHold);</p>
|
|
<p class=desc>In units of seconds, such as 0.10.</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p class=exam>File > Examples > OpenAudio_ArduinoLibrary > NoiseGate
|
|
</p>
|
|
|
|
<h3>Notes</h3>
|
|
<p>Created: Max Huster, Feb 2021 </p>
|
|
<p>Purpose: This module mutes the Audio completly, when it's below a given threshold.</p>
|
|
<p>This processes a single stream fo audio data (i.e., it is mono)</p>
|
|
</script>
|
|
|
|
<script type="text/x-red" data-template-name="_AudioEffectNoiseGate_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>
|
|
|
|
|
|
<div> <!-- Audio Input category -->
|
|
<script type="text/x-red" data-help-name="AudioEffectCompressor2_F32">
|
|
<!-- ============ AudioEffectCompressor2_F32 ======= -->
|
|
<h3>Summary</h3>
|
|
<div class=tooltipinfo>
|
|
<p>Apply envelope controlled gain to a signal.
|
|
Up to five independent "k dB per dB" segments. Includes expansion
|
|
(squelch) compression (AGC) and limiting.</p>
|
|
</div>
|
|
<h3>Boards Supported</h3>
|
|
<ul>
|
|
<li>Teensy 3.2
|
|
<li>Teensy 3.5
|
|
<li>Teensy 3.6
|
|
<li>Teensy 4.0
|
|
<li>Teensy 4.1
|
|
</ul>
|
|
<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 In</td></tr>
|
|
<tr class=odd><td align=center>Out 0</td><td>Signal Out</td></tr>
|
|
</table>
|
|
<h3>Functions</h3>
|
|
|
|
<p class=func><span class=keyword>begin</span>();</p>
|
|
<p class=desc>Enables the compressor using parameters set
|
|
by the functon setCompressionCurve().
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>setCompressionCurve</span>(<strong>struct</strong> compressionCurve*);</p>
|
|
<p class=desc>This defines the compression curve and needs an INO defined structure of type
|
|
compressionCurve. That structure is defined in AudioEffectCompressor2_F32.h.
|
|
</p> <!-- ADD INFO HERE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
|
|
|
<p class=func><span class=keyword>getCurrentInputDB</span>();</p>
|
|
<p class=desc>Returns the last input level in <strong>float</strong> dBFS.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>getvInMaxDB</span>();</p>
|
|
<p class=desc>Returns the maximum input level in <strong>float</strong> dBFS.
|
|
This is reset upon reading.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>getCurrentGainDB</span>();</p>
|
|
<p class=desc>Returns the current gain in <strong>float</strong> dB.
|
|
</p>
|
|
|
|
<p class=func><span class=keyword>setDelayBufferSize</span>(<strong>int16</strong> delay);</p>
|
|
<p class=desc>The input envelope detector can run ahead of the input
|
|
signal by use of this delay. This give improved transient response. The
|
|
parameter "delay" can be any power of 2 such as 64, 128 or 256.
|
|
A delay of 256 samples is 256/44100 = 0.0058 sec = 5.8 mSec.
|
|
</p>
|
|
|
|
<h3>Macros</h3>
|
|
<p>These are macros and not functions. They simplify getting a working compressor
|
|
and provide their own compressionCurve structure and are called with
|
|
a pointer to the compressor object (not to the structure) named "pobject" here.
|
|
This means the macro is invoked
|
|
without a preceeding object name. These macros replace the begin() function.
|
|
See the example program testCompressor2.ino below.</p>
|
|
|
|
<p class=func><span class=keyword>basicCompressorBegin</span>(pobject, linearInDB, compressionRatio);</p>
|
|
<p class=desc>The compression curve for basicCompressorBegin() has a 3 segments.
|
|
It is linear up to an input linearInDB
|
|
and then decreases gain according to compressionRatioDB up to an input -10 dB where it
|
|
is almost limited, with an increase of output level of 1 dB for a 10 dB increase
|
|
in input level. The output level at full input is 1 dB below full output.</p>
|
|
|
|
<p class=func><span class=keyword>limiterBegin</span>(pointerObject, float marDB, float linearInDB);</p>
|
|
<p class=desc>The compression curve for limiterBegin() has a 2 segments.
|
|
It is linear up to an input of linearInDB (typically -15.0f) and
|
|
then virtually limits for higher input levels. The output level at
|
|