Raspberry pi as high quality LFO generator

I’ve been experimenting with external LFO generators to modulate my MS20 mini. Working towards a small and portable solution, I first built a larger format prototype using my laptop, a Presonus Firestudio and a fresh copy of pyo (a Python module written in C to help digital signal processing script creation).

Nice results! But I want a smaller, dedicated device to generate a variety of LFO waveforms, with enough range in the frequency (say from 0.001Hz to 5k Hz) to make the LFO interesting.

Enter Raspberry Pi.

I already did some experiments with the Pi and pyo, a great combination even on the “classic Pi”. With the generation of simple waveforms, the load from the pyo process never exceeds the 10%. No problems there. Problems did arise in the audio out selection. Like the audio out on my MacBook Pro, the audio out of the HDMI chip on the Pi is obviously lowfiltered, thus not outputting waveforms with a frequency lower than ~1Hz. Too bad I can’t use my HDMI to VGA and audio cable for this LFO then.

S-PC-0203_7

Next option is a cheapo USB audio adapter, called “3d sound” and based on the C-Media CM108 audio chip.ux_a06091200ux0003_ux_c Some first experiments conform this adapter to be adequate for the LFO job! Nice looking waveforms, going down to at least 0.01Hz (100 seconds). Too bad it has a DC offset of +2V. On decent audio hardware this is 0V. I tried a solution by Mick @ Leeds49 to no avail, the DC offset did not change. A small opamp circuit is needed anyway to generate a bipolar voltage – that circuit will thus also remove the DC offset. A differential amplifier circuit should do the trick.