4 ms·
Show HN: Building musical synthesizers with SQL queries
If you already know what bytebeat is, you don't need an explanation. If not, check my project :)
Here is how it looks:
SELECT mono(output(
arraySum(x -> 1 / 6
* running_envelope(30 * (1 + x / 6), time, 0.05 * x, 0.005, lfo(0, 0.25, sine_wave, time / 8), 0.1)
* sine_wave(time * 80 * exp2(x / 3)),
range(12))))
FROM table;
To check how it sounds, find the examples in the repository https://github.com/ClickHouse/NoiSQL https://github.com/ClickHouse/NoiSQL
- Jolter 4y agoI love this quote. > You could argue that modern AI, for example, Riffusion, can do a better job. The counterargument is - if you enjoy what you are doing, it's better not to care if someone does it better but with less pleasure.
- ocal5 4y agoNothing useful, yet : Étienne de Query ; Mod-Select * ;
- bob1029 4y agoI think this kind of thing is very cool. I did something similar for defining an image processing pipeline using SQL queries (SQLite UDFs bound to .NET CV methods). Totally unnecessary and performance was weird, but the elegance of using SQL abstractions like recursive CTEs to accomplish fun things is the entire point, IMO. Thinking about the era of LLMs - the ability to quickly convert natural language into a SQL query might open up some additional fun tricks here.
- harvey9 4y agoBe honest OP, this was the result of a drunken bet, right?
- zX41ZdbW 4y agoIt was an attempt to prepare a topic for a conference named "Doing weird stuff with ClickHouse" half a year ago. I already had an example of generating pictures, and some memory about bytebeat, so trying to generate sound was a natural next step. But the first (hundred) attempts were unsatisfactory.
- glaxon 4y agoThis is beautiful. Well done.
- jmgrosen 4y agoThis is absolutely ridiculous. I love it.
- woolion 4y agoVery nice! And it does cover something that is often missing from these kind of tools: some explanations to get started with it!
- zX41ZdbW 4y agoThank you! This topic is also new to me. When I was doing it, I had an impression that everyone else already knew about signal processing, electrical engineering, functional calculus, music theory, and sound engineering... While I only have a chance to touch it barely :)
- IIAOPSW 4y agoIs it vulnerable to SQL injection?
- thomoco 4y agofrequency modulation attack
- mattigames 4y agoRick-roll injection attacks.
- chaosprint 4y agovery cool stuff! really inspiring. I am developing https://github.com/chaosprint/glicol https://github.com/chaosprint/glicol and I am planning to have more bytebeat style of examples.
- tylerhannan 4y agoI tend to open, and play, with https://github.com/VCVRack/Rack https://github.com/VCVRack/Rack daily... I haven't in the last few as I make horrific noises with SQL instead ;)