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.
 
 
OpenAudio_ArduinoLibrary/docs/scripts/ParsedNodeDocs/AudioAnalyzeFFT1024.txt

71 lines
3.2 KiB

<script type="text/x-red" data-help-name="AudioAnalyzeFFT1024">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Compute a 1024 point Fast Fourier Transform (FFT) frequency analysis,
with real value (magnitude) output. The frequency resolution is
43 Hz, useful detailed for audio visualization.</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 convert to frequency bins</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>available</span>();</p>
<p class=desc>Returns true each time the FFT analysis produces new output data.
</p>
<p class=func><span class=keyword>read</span>(binNumber);</p>
<p class=desc>Read a single frequency bin, from 0 to 511. The result is scaled
so 1.0 represents a full scale sine wave.
</p>
<p class=func><span class=keyword>read</span>(firstBin, lastBin);</p>
<p class=desc>Read several frequency bins, returning their sum. The higher
audio octaves are represented by many bins, which are typically read
as a group for audio visualization.
</p>
<p class=func><span class=keyword>averageTogether</span>(number);</p>
<p class=desc>This function does nothing. The 1024 point FFT always
updates at approximately 86 times per second.
</p>
<p class=func><span class=keyword>windowFunction</span>(window);</p>
<p class=desc>Set the window function to be used. AudioWindowHanning1024
is the default. Windowing may be disabled by NULL, but windowing
should be used for all non-periodic (music) signals, and all periodic
signals that are not exact integer division of the sample rate.
</p>
<h3>Examples</h3>
<p class=exam>File &gt; Examples &gt; Audio &gt; Analysis &gt; FFT
</p>
<p class=exam>File &gt; Examples &gt; Audio &gt; Analysis &gt; SpectrumAnalyzerBasic
</p>
<h3>Notes</h3>
<p>The raw 16 bit output data bins may be access with myFFT.output[num], where
num is 0 to 511.</p>
<p>TODO: caveats about spectral leakage vs frequency precision for arbitrary signals</p>
<p>Window Types:
<ul>
<li><span class=literal>AudioWindowHanning1024</span> (default)</li>
<li><span class=literal>AudioWindowBartlett1024</span></li>
<li><span class=literal>AudioWindowBlackman1024</span></li>
<li><span class=literal>AudioWindowFlattop1024</span></li>
<li><span class=literal>AudioWindowBlackmanHarris1024</span></li>
<li><span class=literal>AudioWindowNuttall1024</span></li>
<li><span class=literal>AudioWindowBlackmanNuttall1024</span></li>
<li><span class=literal>AudioWindowWelch1024</span></li>
<li><span class=literal>AudioWindowHamming1024</span></li>
<li><span class=literal>AudioWindowCosine1024</span></li>
<li><span class=literal>AudioWindowTukey1024</span></li>
</ul>
</p>
<p>1024 point FFT has a peak CPU usage of approx 52% on Teensy 3.1.
Average usage is much lower. Future versions might distribute the
load more evenly over time....
</p>
</script>
<script type="text/x-red" data-template-name="AudioAnalyzeFFT1024">
<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>