So I Built An In-Browser Granular Synth into My Music Player
What is a granular synth? If you already know, just skip to the next paragraph. But if you don't, it's basically a way to create sound by taking tiny pieces of existing audio waveforms and playing them back in a scattered configuration to make a new sound. Sometimes they might be referred to as 'granular samplers' instead of synths. I guess the one I made is more of a sampler because it doesn't have a keyboard that let's you 'play it', but instead has a sequencer.
So I've been wanting to get a hardware granualr synth for a while (like the Torso S-4, The Tastychips GR-1, or the 1010music Lemondrop)... and I even thought about building one from an ESP-32, STM32 or a Raspberry Pi or something. But honestly, doing either of those would take a lot of money or time (respectively), which I don't really have at the moment. So I figured I'd do the next best thing and code one up and put it on my website music player. This way is better because you can play with it for free. If I bought a hardware one, you couldn't do that unless you came to my house. See, I'm looking out for you. Because I care about you.
But anyway, just go to my homepage and play around with it. It's pretty fun (at least I think so). It's built with Rust and WASM like the graphic design tools I'm building, so it's very fast, efficient, and safe. However, be warned that it might crash your browser because it uses some serious memory to run, and I don't know what kinda setup you got over there. But if it does, just re-load your browser and you're good. The fact that it's using Rust let's you know there's no funny shit going on.
In terms of how it works, you can use up to three grain layers and in each one play around with the amount of grains, grain size, pitch, stereo width, etc. It's even got LFOs that will automate some of the parameters. And I already had the effects and main pitch/speed control so playing around with those really let's you get weird. By default, the current song will play while the grains are looping, but you can turn the volume down on that if you want to just plain with the grain layers.