3 ms·
Someone already shared an example of how difficult the dsp code is to read. There's tons of magic numbers and short variable names with no description of why th
by squeaky-clean 2y ago
Someone already shared an example of how difficult the dsp code is to read. There's tons of magic numbers and short variable names with no description of why the code does what. Again, that's cool if you want to use the compiled version in a song, but it's not friendly to learn from. But I don't think the goal of this project is to be educational, it's just a little bonus that the code is open source.
There's also just things like uneven indentation, lots of things to reduce linecount at the expense of readability like single line if statements. Old optimization tricks that aren't necessary with modern compiler like `while (--sampleFrames >= 0)`.
Here's another example file
https://github.com/airwindows/airwindows/blob/master/plugins/WinVST/Baxandall/BaxandallProc.cpp https://github.com/airwindows/airwindows/blob/master/plugins...
And the project structure is really weird. Normally you would use a framework like JUCE or iPlug, or write your own, such that your dsp code is written once and your multiplatform code is separate. Instead every platform (Mac, Windows, Linux, VST, AU) are a separate codebase with all the dsp code duplicated.
He's definitely using some sort of templating system to do this, maybe even using some tool that lets him write the dsp in Python or Matlab and converts it to C++. Basically these files in the github are not his true "source", this is generated from his real source. For that reason, commits are often massive and unhelpful in tracing changes to any individual effect.
For example, a recent commit where he added the WolfBot effect, a guitar amp simulator, has 427 changed files and 150,284 added lines. Also even though the commit is titled WolfBot, this commit includes the addition of other fx, CreamCoat, DeRez3, kCathedral3, kGuitarHall, kPlate140, kPlate240.
https://github.com/airwindows/airwindows/commit/7623a1c14b012a1a6407bb0e3ba252d1f027a823 https://github.com/airwindows/airwindows/commit/7623a1c14b01...
- djaychela 2y agoThanks, much appreciated that you took the time to point those things out.