It’s more a preparatory work for a possible 8 bit sampler project than anything else. The idea is to collect datas from the ADC (and an incoming signal), store the datas in an array (SRAM), and play it back with a variable speed (external oscillator)
To make things funnier I want to incorporate some “tweak” knobs. 2 of them being “start” and “stop”. They determine the start and stop positions for the reading of this array. A counter (index_view) browses through the array whithin those limits. A second effect can be added to reverse the direction, we reverse the browsering and go from stop_index to start_index.
Then the datas are sent into the I2C bus through timer1 counter interrupt which is clocked by an external variable clock. The idea behing that is to reduce or increase the speed of outputing the datas (DAC) and create a higher (or very lower) pitch. Here’s the hardware (much simpler):
ICA amplifies the signal to reach 5V peak-peak signal for the converter (set by the gain pot). The bias is applied to put the output a 2.5V. R13 is used to set the offset (if there is any). IC2A is a buffer (I think the input impedance of those ADC are a bit funky).
Once the signal is out from the DAC, it is mixed with the original. The overdub signal is then send back to another ADC to record an overdub with the previous sample.
Obviously, the atmega 328 isn’t made for that kind of work. Although its SRAM is enough for most of the micro-controller work it isn’t suitable for recording a storing so much datas. But ! the use of an external SPI (or parrallele) SRAM is possible, as the Microchip 23A256 SRAM. I don’t if a SPI or I2C protocol may cause delay (maybe not enough if the clock is very high)
Storing a sine wave and select only of portion can create several kind of waveforms. Could be handy for a LFO or VCO (and both) whilst being light on memory use.
So, I don’t know if that project would see its birth coming soon however it could be interesting to build such lofi-dirty sampler. Not only it could be used as stand alone silly voice modifier-sampler but could be also tweaked to fit the modular synth aesthetic. It could also be interesting to use a more powerful microprocessor (STM32 or FPGA if they weren’t that expensive?) and leave the 8bit format for something with higher resolution (with less appeal ?). This will have the beneficial side-effect of learning something new which is always good !
SPI SRAM 23a256: http://ww1.microchip.com/downloads/en/DeviceDoc/22100D.pdf
EDIT 11/08 : the work is coming good, the reverse reading works great. Obviously, clocking the MCU with only 8Mhz is far from being optimun but for debugg work is still good to start the overall working of the code. THe input may also need a proper RC filter to kill noise above 20khz (and avoid even more crap)