Mozzi  version 2015-05-11-20:23
sound synthesis library for Arduino
 All Classes Functions Typedefs Groups
09.Delays/AudioDelay/AudioDelay.ino

This is an example of how to use the AudioDelay class.

/* Example of modulating a signal by using a variable delay,
using Mozzi sonification library.
Demonstrates AudioDelay.
Circuit: Audio output on digital pin 9 on a Uno or similar, or
DAC/A14 on Teensy 3.1, or
check the README or http://sensorium.github.com/Mozzi/
Mozzi help/discussion/announcements:
https://groups.google.com/forum/#!forum/mozzi-users
Tim Barrass 2012, CC by-nc-sa.
*/
//#include <ADC.h> // Teensy 3.1 uncomment this line and install http://github.com/pedvide/ADC
#include <MozziGuts.h>
#include <Oscil.h>
#include <tables/triangle_analogue512_int8.h> // wavetable
#include <tables/cos2048_int8.h> // wavetable
#include <AudioDelay.h>
#include <mozzi_midi.h> // for mtof
#define CONTROL_RATE 256 // powers of 2 please
Oscil<TRIANGLE_ANALOGUE512_NUM_CELLS, AUDIO_RATE> aTriangle(TRIANGLE_ANALOGUE512_DATA);
int del_samps;
void setup(){
aTriangle.setFreq(mtof(60.f));
kFreq.setFreq(.63f);
}
void loop(){
}
del_samps = 128+kFreq.next();
}
char asig = aDel.next(aTriangle.next(), del_samps);
return (int) asig;
}