UPDATE: I fixed some mistakes:
https://youtu.be/BS-SkJllZOU
https://youtu.be/6C4bv1vVgsc
An introduction to programming audio effects. We go from nothing to a working distortion effect while covering the basics of audio and how it’s represented by computers.
In other words, I spend one hour to write one line of code. But it’s one line of code you’ll *understand*!
The platform we’re using is REAPER and its support for JSFX in the EEL2 programming language:
https://www.reaper.fm/sdk/js/js.php
https://www.cockos.com/EEL2/
But even if you never intend to use these technologies (for example, if you already use other software and aren’t interested in switching), the concepts introduced here transfer well to other platforms for building audio effects, for example, VSTs, Audio Units, Pure Data, Max, and so forth.
Code: https://github.com/leafac/reaper/blob/5dd53247439de4d76152f42b5e7fb233a5693992/My%20Bit%20Crusher.jsfx