yeah Id love to do this stream at some point. one thing bogdan alludes to is that the DSP code is very terse & dumb, written 'a sample at a time' just using clang ext_vector extension to represent (eg) 7.1 audio as a 'float8' in an AVX register. it turns out to generate ok code!/ https://twitter.com/pervognsen/status/1250391436136071168
I didnt do extensive measurements, but I tried comparing doing 5 cascaded biquads (for 5 band EQ) 'a sample at a time' with 7.1 samples in a single float8 (becomes AVX register) against 'buffer at a time' as its often written, and the sample at a time was easier to read & faster!
after that, I just went all in on 'sample at a time'. it means our inner loop fits on a single (landscape) page of C, including chorus, ladder filter, sends, paramater interpolation, ADSR envelope, EQ, etc. in fact, here it is!
all the function calls in that pic are *super dumb* coz they are just 'do one sample' and can be written like the textbook. for example, heres the 'DirectForm2' function that is called 5 times for 5 band eq:
You can follow @mmalex.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: