You can rip something off of Mutable Instruments' eurorack modules. The code is C++ and easily adapted into C. Among other things you'll find granular delays, filtering, waveshaping, ring modulation,...
https://github.com/pichenettes/eurorackThis is something I did when I was writing code for my own digital pedal.