Welcome to DJ Quacks, where we've done something wild: we turned a DuckDB into a synthesizer!
Instead of using normal audio libraries like sensible people, we generate every beat, bass, and bleep using SQL queries. That's right—when you hear a kick drum, you're actually hearing the result of a database query calculating sine waves in real-time. It's weird, it's wonderful, and it works!
Here's the wild thing: audio is just numbers. A sequence of numbers representing sound wave amplitudes. So we thought... why not use SQL to generate those numbers?
DJ Quacks uses SQL to:
generate_series() - like counting from 0 to 44,100... per second!The complete journey from code to sound:
SQL Query → DuckDB WASM → Float32Array → Web Audio API
DJ Quacks is built entirely client-side - everything happens right in your browser, no server needed!
When you tweak those sliders (BPM, pitch, delay...), behind the scenes we're regenerating SQL queries, running them through DuckDB, and updating audio buffers faster than you can say "SELECT * FROM beats"!
We're proving that SQL isn't just for spreadsheets and reports - it can make music too! The DuckDB database engine runs entirely in your browser using WebAssembly, showing that databases can be creative, weird, and fun.
Fun fact: Every time you click play, you're running a database query that generates thousands of audio samples. Who knew SQL could drop beats instead of tables?