|
|
@@ -1665,6 +1665,90 @@ double s_freq = .0625;</p> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
|
RED.nodes.registerType('AudioEffectDelayExternal',{ |
|
|
|
shortName: "delayExt", |
|
|
|
inputs:1, |
|
|
|
outputs:8, |
|
|
|
category: 'effect-function', |
|
|
|
color:"#E6E0F8", |
|
|
|
icon: "arrow-in.png" |
|
|
|
}); |
|
|
|
</script> |
|
|
|
<script type="text/x-red" data-help-name="AudioEffectDelayExternal"> |
|
|
|
<h3>Summary</h3> |
|
|
|
<div> |
|
|
|
<p>Delay a signal, using external memory for longer delay times! Up to 8 separate delay taps can be used.</p> |
|
|
|
<p align=center><img src="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 333 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>Hardware</h3> |
|
|
|
<p>By default, a single 23LC1024 RAM chip is used, with these pins: |
|
|
|
<table class=doc align=center cellpadding=3> |
|
|
|
<tr class=top><th>Pin</th><th>Signal</th></tr> |
|
|
|
<tr class=odd><td align=center>6</td><td>CS</td></tr> |
|
|
|
<tr class=odd><td align=center>7</td><td>MOSI</td></tr> |
|
|
|
<tr class=odd><td align=center>12</td><td>MISO</td></tr> |
|
|
|
<tr class=odd><td align=center>14</td><td>SCK</td></tr> |
|
|
|
</table> |
|
|
|
</p> |
|
|
|
<h3>Examples</h3> |
|
|
|
<a href="https://www.youtube.com/watch?v=d80d1HWy5_s" target="_blank">Demo Video</a> (YouTube) |
|
|
|
<!--<p class=exam>File > Examples > Audio > Effects > Delay |
|
|
|
</p>--> |
|
|
|
<h3>Notes</h3> |
|
|
|
<p>External RAM allows for longer delays without consuming |
|
|
|
limited internal RAM. However, SPI communication is required, |
|
|
|
which consumes much more CPU time. The |
|
|
|
<a href="http://www.pjrc.com/teensy/td_libs_AudioProcessorUsage.html">AudioProcessorUsageMax</a> |
|
|
|
function may be used to monitor how much CPU time is consumed. |
|
|
|
</p> |
|
|
|
<p>You may specify the type of hardware to be used by editing the code. Currently, AUDIO_MEMORY_23LC1024 |
|
|
|
is the only supported option. Future support for AUDIO_MEMORY_MEMORYBOARD is |
|
|
|
planned. |
|
|
|
</p> |
|
|
|
<p class=desc><span class=keyword>AudioEffectDelayExternal</span> delayExt1(<span class=literal>AUDIO_MEMORY_23LC1024</span>); |
|
|
|
</p> |
|
|
|
<p>You may also create more than one delay using the same hardware, where the memory is partitioned |
|
|
|
by specifying a maximum delay in milliseconds. This can be useful if you wish to delay both |
|
|
|
channels of a stereo signal. |
|
|
|
|
|
|
|
<p class=desc><span class=keyword>AudioEffectDelayExternal</span> delayExt1(<span class=literal>AUDIO_MEMORY_23LC1024</span>, 700);<br><span class=keyword>AudioEffectDelayExternal</span> delayExt2(<span class=literal>AUDIO_MEMORY_23LC1024</span>, 700); |
|
|
|
</p> |
|
|
|
</script> |
|
|
|
<script type="text/x-red" data-template-name="AudioEffectDelayExternal"> |
|
|
|
<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/javascript"> |
|
|
|
RED.nodes.registerType('AudioEffectBitcrusher',{ |
|
|
|
shortName: "bitcrusher", |