Переглядів 5,277
In this tutorial I show how to use the class below to generate an LFO with an Arduino or HW compatible device (ESP32, Teensy, etc). The LFO is synchronized to the Arduino internal clock with the micros() command. This makes the LFO very stable and precise. The LFO frequency range is dependent on the host platform, but on an Arduino Due it scales from DC to ~1kHz.
NOTE: small correction about the roll-over from the micros() function -- this rolls over every 71 hours, not 71 minutes. In addition, this problem is resolved in the meantime in the examples provided with the library on Github.
Code: github.com/mo-thunderz/lfo
The LFO is part of the ADSR+LFO solution presented here:
Part 1: • Arduino based LFO+ADSR...
Part 2: • Arduino based LFO+ADSR...
See as well my other videos:
Arduino-based ADSR: • How to create an ADSR ...
Ableton-Arduino communication: • How to send data betwe...
Updates:
29.12.2020: updated code uploaded to Github where problem with _mode1_rate was fixed
22.05.2021: updated code with fix for roll-over after 71 minutes