Update (04.05.2014): I’ve made a minor tweak to the source code; the sinewave has been phase aligned with the other waveform options where it previously 1/4 off.
Chips in stock have been updated to v2.1. I’ve also updated the source code, which is now available in an archive:
I’m sharing with you today the source code for a tap-tempo LFO (Low Frequency Oscillator) that can be used in place of a traditional analog LFO in many different circuits.
First off, I know there are several similar chips out there already available, but I think half the fun is making my own. And I did have fun, and I learned a lot. And I plan on integrating this into some of my existing layouts for some tap-tempo fun.
This is the source code for the whole thing. It’s for DIY only. I don’t presume anyone would want to use this commercially, but if so contact me.
It uses stepped ADC voltages to select between different wave forms and tempo multipliers /dividers.
Available wave forms: Sine, ramp up, ramp down, triangle and square.
Available tempo multipliers: 1/4, 1/2, 1, 2 and 4.
Tap once to start tempo sampling (the LED should light up and stay lit). Tap again to stop the tempo sampling and set the base tempo (LED will no longer be constantly lit, but start pulsing following the tempo. If you wait longer than 10 seconds before closing the tempo sample the chip will keep it’s last tempo setting and drop out of tempo sampling mode.
The first tap will reset the wave shape to help you keep the LFO synced to the music (got that idea from reading electric druid’s pages).
I think that’s it. A basic circuit would look something like this.