# HG changeset patch # User Robert Jack # Date 1466713322 -3600 # Node ID e2364e1711c20822e48120c37b228907f97a1646 # Parent 2ec36efb2c52813bcf5813d3d226a69b2565da33 Updated doxygen for the tremolo audio example. diff -r 2ec36efb2c52 -r e2364e1711c2 examples/04-Audio/tremolo/render.cpp --- a/examples/04-Audio/tremolo/render.cpp Thu Jun 23 21:17:16 2016 +0100 +++ b/examples/04-Audio/tremolo/render.cpp Thu Jun 23 21:22:02 2016 +0100 @@ -86,7 +86,7 @@ This sketch demonstrates how to make a simple tremolo effect with one potiometer to control the rate of the effect. A tremolo effect is a simple type of amplitude modulation where the amplitude of one signal is continuous modulated by the amplitude of another. -This is achieved by multiplying to signals together. +This is achieved by multiplying two signals together. In this example we want to create a tremolo effect like that you would find in a guitar effects box so our first signal will be our audio input into which we could plug a guitar @@ -98,10 +98,16 @@ sinetone is produced by incrementing the phase of a sine function on every audio frame. In `render()` you'll see two nested for loop structures, one for audio and the other for the -analogs. You should be pretty familiar with this structure by now. In the first of these for loops +analogs. You should be pretty familiar with this structure by now. In the first of these loops we deal with all the audio -- in the second with reading the analog input channels. We read the value of analog input 0 and map it to an appropriate range for controlling the frequency of the sine tone. The lfo is then mulitplied together with the audio input and sent to the audio output. + +Hardware +----------------------- +- connect a 10K pot to 3.3V and GND on its 1st and 3rd pins. +- connect the 2nd middle pin of the pot to analogIn 0. + */