I have created a circuit that does the following:
- Writes incoming audio data to an array, beginning at 0.
Reads incoming audio data from array, beginning at one greater than where it was written.
Ideally, it's supposed to write for the length of the repeat, then start reading.
Every time a counter hits a predefined number (called "pitch"), the value called "delay" is incremented by +1.
This delay is the maximum value of the array address, thus every time it increases, it adds a delay of one.
In addition, the previous value is copied, each time the array location resets, preventing added high frequencies due to large changes from sample to sample.
Effectively, this should progressively increase a delay every specified number of samples, adding a copied sample, and thus decrease the pitch by an amount determined by the "pitch" value.
However, instead it presents the pitch with a crazy delay and crazy sound interference (although this varies, randomly, apparently, as sometimes it has not added a high frequency).
Essentially, this is what the in looks like:
This is what the out should look like with a pitch value of "2"
Thus, the pitch should be 2/3rds of the original without noticeable distortion.
Here's my program (it's mostly clocks and counters):