Parcourir la source

Add documentation for new objects

dds
PaulStoffregen il y a 8 ans
Parent
révision
86b9b9ceb1
4 fichiers modifiés avec 141 ajouts et 4 suppressions
  1. +1
    -0
      .gitignore
  2. BIN
      gui/img/adccircuit2.png
  3. BIN
      gui/img/dacpins.png
  4. +140
    -4
      gui/index.html

+ 1
- 0
.gitignore Voir le fichier

@@ -0,0 +1 @@
*.swp

BIN
gui/img/adccircuit2.png Voir le fichier

Before After
Width: 216  |  Height: 302  |  Size: 62KB

BIN
gui/img/dacpins.png Voir le fichier

Before After
Width: 240  |  Height: 192  |  Size: 58KB

+ 140
- 4
gui/index.html Voir le fichier

@@ -347,6 +347,7 @@ span.mainfunction {color: #993300; font-weight: bolder}
{"type":"AudioInputI2S","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputI2SQuad","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s_quad","inputs":0,"outputs":4,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputAnalog","data":{"defaults":{"name":{"value":"new"}},"shortName":"adc","inputs":0,"outputs":1,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputAnalogStereo","data":{"defaults":{"name":{"value":"new"}},"shortName":"adcs","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputI2Sslave","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2sslave","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioInputUSB","data":{"defaults":{"name":{"value":"new"}},"shortName":"usb","inputs":0,"outputs":2,"category":"input-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputI2S","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2s","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
@@ -354,6 +355,7 @@ span.mainfunction {color: #993300; font-weight: bolder}
{"type":"AudioOutputSPDIF","data":{"defaults":{"name":{"value":"new"}},"shortName":"spdif","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputPT8211","data":{"defaults":{"name":{"value":"new"}},"shortName":"pt2811","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputAnalog","data":{"defaults":{"name":{"value":"new"}},"shortName":"dac","inputs":1,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputAnalogStereo","data":{"defaults":{"name":{"value":"new"}},"shortName":"dacs","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputPWM","data":{"defaults":{"name":{"value":"new"}},"shortName":"pwm","inputs":1,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputI2Sslave","data":{"defaults":{"name":{"value":"new"}},"shortName":"i2sslave","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioOutputUSB","data":{"defaults":{"name":{"value":"new"}},"shortName":"usb","inputs":2,"outputs":0,"category":"output-function","color":"#E6E0F8","icon":"arrow-in.png"}},
@@ -377,6 +379,7 @@ span.mainfunction {color: #993300; font-weight: bolder}
{"type":"AudioEffectFade","data":{"defaults":{"name":{"value":"new"}},"shortName":"fade","inputs":1,"outputs":1,"category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioEffectChorus","data":{"defaults":{"name":{"value":"new"}},"shortName":"chorus","inputs":1,"outputs":1,"category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioEffectFlange","data":{"defaults":{"name":{"value":"new"}},"shortName":"flange","inputs":1,"outputs":1,"category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioEffectReverb","data":{"defaults":{"name":{"value":"new"}},"shortName":"reverb","inputs":1,"outputs":1,"category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioEffectEnvelope","data":{"defaults":{"name":{"value":"new"}},"shortName":"envelope","inputs":1,"outputs":1,"category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioEffectMultiply","data":{"defaults":{"name":{"value":"new"}},"shortName":"multiply","inputs":2,"outputs":1,"category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png"}},
{"type":"AudioEffectDelay","data":{"defaults":{"name":{"value":"new"}},"shortName":"delay","inputs":1,"outputs":8,"category":"effect-function","color":"#E6E0F8","icon":"arrow-in.png"}},
@@ -548,10 +551,6 @@ span.mainfunction {color: #993300; font-weight: bolder}
moment, analogRead() can end up waiting forever, which effectively
crashes your program.
</p>
<p>AudioInputAnalog has a
<a href="https://github.com/PaulStoffregen/Audio/issues/96">known bug</a>
at 72 MHz. Use 48 or 96 MHz clock speed (Tools &gt; CPU Speed menu).
</p>
<p>A different pin may be used, but adding it as an parameter
to the AudioInputAnalog object definition.
</p>
@@ -574,6 +573,64 @@ span.mainfunction {color: #993300; font-weight: bolder}
</div>
</script>

<script type="text/x-red" data-help-name="AudioInputAnalogStereo">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Receive stereo audio using the built-in analog to digital converters.</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>Out 0</td><td>Audio Channel (Left)</td></tr>
<tr class=odd><td align=center>Out 1</td><td>Audio Channel (Right)</td></tr>
</table>
<h3>Functions</h3>
<p>This object has no functions to call from the Arduino sketch. It
simply streams data from both ADCs to its output ports.</p>
<h3>Hardware</h3>
<p>By default, pins A2 & A3 are used for audio input. This circuitry is recommended.</p>
<p align=center><img src="img/adccircuit2.png"></p>
<p>Signal range is 0 to 1.2V</p>
<h3>Examples</h3>
<!--
<p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; PassThroughMono
</p>
<p class=exam>File &gt; Examples &gt; Audio &gt; Analysis &gt; PeakMeterMono
</p>
<p class=exam>File &gt; Examples &gt; Audio &gt; Analysis &gt; DialTone_7segment
</p>
<p class=exam>File &gt; Examples &gt; OctoWS2811 &gt; SpectrumAnalyzer
</p>
-->
<h3>Notes</h3>
<p><b>analogRead() must not be used</b>, because AudioInputAnalogStereo is regularly
accessing the ADC hardware. If both access the hardware at the same
moment, analogRead() can end up waiting forever, which effectively
crashes your program.
</p>
<p>A different pin may be used, but adding it as an parameter
to the AudioInputAnalog object definition.
</p>
<p>For example:
</p>
<p class=desc><span class=keyword>AudioInputAnalogStereo</span> adc1(<span class=literal>A3</span>, <span class=literal>A2</span>);
</p>
<p>TODO: add info here about which pins work for input 0 and 1.
</p>
<p>Noise due to high source impedance, which allows rapidly switching digital signals
to capacitively couple... avoiding higher analog impedance is the solution.</p>
<p>Power Supply rejection issue with simple DC bias (bigger capacitor may be needed if 3.3V has low frequency noise)</p>
<p>Algorithm for automatic DC bias tracking</p>
<p>TODO: actual noise measurements with different input circuitry
(it's not as quiet as the audio shield)</p>
</script>
<script type="text/x-red" data-template-name="AudioInputAnalogStereo">
<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="AudioInputI2Sslave">
<h3>Summary</h3>
<div class=tooltipinfo>
@@ -917,6 +974,53 @@ span.mainfunction {color: #993300; font-weight: bolder}
</div>
</script>

<script type="text/x-red" data-help-name="AudioOutputAnalogStereo">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Transmit 12 bit stereo audio using Teensy 3.5 or 3.6 built-in digital to analog converters.</p>
<!--<p align=center><img src="img/dac_speaker.jpg"><br>
<small><a href="http://www.pjrc.com/store/prop_shield.html" target="_blank_">Prop Shield with 4&ohm; Speaker</a></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>Audio Channel (Left)</td></tr>
<tr class=odd><td align=center>In 1</td><td>Audio Channel (Right)</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>analogReference</span>(ref);</p>
<p class=desc>Configure output voltage range:<br>
<span class=literal>INTERNAL</span> selects 1.2 volt peak-to-peak output.<br>
<span class=literal>EXTERNAL</span> selects 3.3 volt peak-to-peak output.
</p>
<h3>Hardware</h3>
<p align=center><img src="img/dacpins.png"></p>
<p>Signal range default is 0 to 1.2V</p>
<p>The output voltage has DC level. Some applications require a DC-blocking capacitor. If unsure, a 10&micro;F is usually a safe value to use. If an aluminum or tantalum capacitor is used, the positive terminal should connect to Teensy's DAC pin.</p>
<p>The DAC pin is used with the
<a href="http://www.pjrc.com/store/prop_shield.html" target="_blank_">Prop Shield</a>
to drive speakers.</p>
<h3>Examples</h3>
<!--<p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; PassThroughMono
</p>
<p class=exam>File &gt; Examples &gt; SerialFlash &gt; MP3Player
</p>-->
<h3>Notes</h3>
<p>The output rate is 44.1 kHz (no oversampling). Ultrasonic noise present if
not filtered. This may not
be an issue for many uses, but care should be used if amplified and driven
to high power tweeters.</p>
<p>When using 3.3V output, the power supply is used for the analog reference. Noise
present on the 3.3V power can couple to the DAC output signal.
</p>
</script>
<script type="text/x-red" data-template-name="AudioOutputAnalogStereo">
<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="AudioOutputPWM">
<h3>Summary</h3>
<div class=tooltipinfo>
@@ -2026,6 +2130,38 @@ double s_freq = .0625;</p>
</div>
</script>

<script type="text/x-red" data-help-name="AudioEffectReverb">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Reverb with adjustable reverberation time. Contributed by Joao Rossi FIlho.
</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</td></tr>
<tr class="odd"><td align="center">Out 0</td><td>Output</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>reverbTime</span>(seconds);</p>
<p class=desc>Sets the amount of reverberation time.
</p>

<h3>Examples</h3>
<p><a href="https://twitter.com/joaorossifilho/status/779737126841753601">Video Demo</a>
</p>
<!--<p class=exam>File &gt; Examples &gt; Audio &gt; Effects &gt; Flange
</p>-->
<h3>Notes</h3>
<p>This effect may have distortion problems with the input signal is more than 0.5.</p>
</script>
<script type="text/x-red" data-template-name="AudioEffectReverb">
<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="AudioEffectEnvelope">
<h3>Summary</h3>
<div class=tooltipinfo>

Chargement…
Annuler
Enregistrer