mmalex
@mmalex.bsky.social
1.8K followers 330 following 120 posts
synth tinkerer (plinky); midjourney; NVResearch (InstantNGP/NeRF); cofounder MediaMolecule (Dreams, LittleBigPlanet); demoscene/vj (statix/bluespoon)
Posts Media Videos Starter Packs
mmalex.bsky.social
yeah that's what i ended up using. it came at the right time :)
mmalex.bsky.social
still messin' with this thing. so many yaks to shave when you start from scratch. autocomplete, filter dsp, sample loading, even json parsing. an eternal pile of todos, but each one small enough I'm making slow but continual forward progress...
mmalex.bsky.social
im sure there are vsts that are as low latency as possible. i guess the vst api / host adds one 'host/plugin' block that can't be avoided. i wonder if anyone would dare make a daw with blocksize 1 lol
mmalex.bsky.social
that's what my thread is about! as described it has 0 latency :)
mmalex.bsky.social
nice! yes that's a good one. on dreams i also downsampled later parts of long irs. i never bothered exploiting reuse between overlapping ffts of different sizes. i wonder if that's a big win.
mmalex.bsky.social
what would you say is the biggest one missing from my outline?
mmalex.bsky.social
(eg ffts must be zero padded & thus double the size of the stated block size, outputs overlap add etc) but i wanted to sketch the shape. when i remembered it i got muddied up on scheduling details, and it was seeing it as independent parallel chunks that unlocked clarity for me. hope its interesting
mmalex.bsky.social
is computed in blocks of 512 by fft. next 1024, blocks of 1024... etc! success! tldr: we broke our ir into chunks of size 128, 128, 256, 512, 1024... with all but the first computed blockwise by fft. voila, low latency and (relatively) low compute. lots of refinements possible and details elided
mmalex.bsky.social
delayed 92858. hm, useful! now we have all the ingredients! chunk your IR into an initial chunk (say) 256 samples. we'll do these as a brute force FIR. the next 256 sample chunk, needs to be output with 256 samples latency. how convenient, that's what fft gives us! the next chunk of 512, likewise,
mmalex.bsky.social
convolution is linear, which means we can cut up our original IR into any chunks we want, and treat each chunk as a totally separate independent reverb, run them all in parallel and add them back up. key point: if a chunk comes from a point 92858 samples into your IR, you *want* its output to be
mmalex.bsky.social
you can also do this by precopmuting the fourier transform of your IR; then you do the FT of a block of N input samples, hadamard product the two, and inverse fft. since fft is O(NlogN) this is faster for large enough N! sadly, since its block based, it introduces a delay of N samples. but...
mmalex.bsky.social
an ir reverb is just a convolution, like a big FIR filter. if your IR is N samples long, for every output sample you just 'dot' together (multiply and add in a for loop) the N ir samples with the last N input samples (remembered in a buffer). so to output N samples, it costs O(N^2). but...
mmalex.bsky.social
i wrote an efficient convolution reverb for dreams while at mm years ago, and found myself in need of one again. my memory was hazy on the details, and i couldnt find it written out in a simple way i could immediately understand, so i chewed a pencil and reminded myself. heres how i think about it
mmalex.bsky.social
all the best things only make sense in your head at first:) or something.... i tell myself....
mmalex.bsky.social
also added 'keypoints' (by saying that space means 'unset', and . or A means 0) and actually they're more useful than i expected. (wait for it.... a to z!)
mmalex.bsky.social
(side comment - having an old-school text-mode screen of 8 bit characters & attributes as my only rendering primitive is... freeing, weirdly. i forgot how much I love text mode. just poke a byte in memory to draw a letter. yay.)
mmalex.bsky.social
leaning into this text editor/visual editor dual, i've made the code colourer detect comments like /*====*/ and turn them into sliders. I really like how plain old source code remains the 'source of truth' for all state and the editor just doodles over it.
mmalex.bsky.social
not yet :) maybe one day! one can dream! :)
mmalex.bsky.social
i was kinda meh until i saw the rotating return key and now im ALL IN
mmalex.bsky.social
i really appreciate C99's variable length arrays. so you can write float foo[n]; where n is runtime variable!
in before the safety crowd: obviously just as unsafe as alloca (ie be careful of n's range) but less error prone as you dont need to compute a byte size by hand. and more readable.
mmalex.bsky.social
its a super fun rabbit hole!
mmalex.bsky.social
yeah! i came to it via common side effects, which i only just discovered 😅 and i think there's overlap with pantheon, tho the animation there had this uncanny scooby doo / hanna barbera vibe which didn't sit well with me.
mmalex.bsky.social
when you have your own text editor, everything starts to look like a .... textnail? behold, I can now edit my LFO shapes with copy and paste...