Better HN
topnewbestaskshowjobs
Log inSign up

sudara

216 karma · joined Mar 11, 2008 (18y ago) · 69 submissions

Building an additive synth with 10k time domain oscillators (and blogging) over at https://melatonin.dev
Submissions

1.

It's Timbre Time! An interactive comic about additive synthesis(melatonin.dev ↗)

4 points · by sudara · 6mo ago · discuss

comment 1y ago · link · parent

Love the chorales, thanks for sharing that one.

3.

Show HN: I built an additive synth with 10k oscillators(melatonin.dev ↗)

3 points · by sudara · 1y ago · discuss

4.

Dev Therapy, part 4: Tending the narrative gardens(melatonin.dev ↗)

5 points · by sudara · 1y ago · discuss

5.

500 Harmonics, each with a different pitch lfo rate(twitter.com ↗)

3 points · by sudara · 2y ago · discuss

6.

Code Signing on Windows with Azure Trusted Signing(melatonin.dev ↗)

3 points · by sudara · 2y ago · discuss

7.

An expressive, quasi-Ptolemaic semi-modular synthesizer(github.com ↗)

3 points · by sudara · 2y ago · discuss

8.

Doing my synthesizer homework: The quirks of MIDI Velocity(melatonin.dev ↗)

2 points · by sudara · 2y ago · discuss

comment 2y ago · link · parent

This is amazing, I will def be playing with it (lossy is also my jam) and hi! I made pamplejuce, hope it worked ok for you, lemme know if anything was rough (its been growing up a bit lately)

comment 3y ago · link · parent

I'm interested in this idea. I think I got confused at some point and mistakenly thought box blur was a 2D kernel and so it wouldn't perform great. vImage does contain a box blur but I haven't checked its performance (I did check the tent blur and it was so-so...) https://developer.apple.com/documentation/accelerate/blurrin...

comment 3y ago · link · parent

Thanks for this!

comment 3y ago · link · parent

OMG would have loved to do that instead.

comment 3y ago · link · parent

Cache locality and specifically the vertical pass was top of my mind when trying to come up with good ways to vectorize. In the end (at least in my vector implementations) the difference between the passes weren't too large. But most of the them ended up having to do things like first convert the incoming row/col to its own float vector.

One main issue I never resolved is in the middle of the main loop, data has to be converted and written back to the source image and the incoming pixels have to be converted and loaded in. Even when doing all rows or cols in bulk (which was always faster somehow than doing batches of 32/64), that seemed pretty brutal.

I also wondered whether it might be more efficient to rotate the entire image before and after the vertical pass, but in my implementations at least, there wasn't a huge difference in the pass timings.

comment 3y ago · link · parent

> If you take a look at the video in my README, you'll see how bad it is.

Ahh, the video threw me off originally, I think because of the FPS glitches on the full width — but I see it now! Big bands of blue on the left and right edges. I'll have to cook up some examples to reproduce. Also curious what it means (if anything) in the drop shadow context.

> I can say there is a huge performance tradeoff in using real division

Makes sense. It would also throw a wrench in my vector implementations, where the expectation is to perform the same operation efficiently across groups of pixels.

> and that my library was therefore the best :)

Haha, well it was for me! I don't know Rust, but it helped me figure out my first C++ implementations!

comment 3y ago · link · parent

Fixed! Sorry about that. The rustrepo stuff confused me!

My question is — was solving the edge bleed worth the (assumed) performance tradeoff? There were a couple vendor APIs that seemed to have smarter edge bleed options, but they performed worse. I never got around to actually visually comparing the images, though...

Thanks for all the great comments in your repo, they were quite helpful when trying to figure out how Stack Blur worked!

comment 3y ago · link · parent

Thanks for the proofread! I had so much text juggling between this and the README that it was guaranteed some things would fall through the cracks! I updated the things you mentioned about `stackSum` and thanks for the catch on the `sumIn` definition.

> It couldn't provide this if it was moving every value in the queue.

I actually don't remember anymore what std::deque does under the hood, I did look into it, but the only thing I remember is that it was quite slow!

> You'd have to template the code on `radius` instead of passing it in as a runtime parameter so that the compiler could lower the divisions to bitshifts.

Yes, I really like this idea. Especially because radii only really vary between 1-48px for most drop shadow needs. It would be nice to have a handful of the common radii be ripping fast.

comment 3y ago · link · parent

Probably! The dequeue implementation was just for fun, as I miss working in higher level languages :) Home cooked circular buffers is usually how one usually sees real-time audio code written... I haven't had much hands on experience with std::span, but seeing as it's a non-owning view, maybe it would be perfect?

comment 3y ago · link · parent

Thanks! It's Figma, which I have some rudimentary proficiency in, really easy to make boxes and move em around.

comment 3y ago · link · parent

ha!

20.

How to code sign Windows installers with an EV cert on GitHub Actions(melatonin.dev ↗)

2 points · by sudara · 3y ago · discuss

21.

Dev Therapy Part II: Recoveries(melatonin.dev ↗)

3 points · by sudara · 3y ago · discuss

22.

Dev Therapy, part I: How to not get stuck (as a solo dev)(melatonin.dev ↗)

4 points · by sudara · 3y ago · discuss

23.

How to implement a web-based rich text editor in 2023(letsken.com ↗)

3 points · by sudara · 3y ago · discuss

24.

Reviving an Analog Polysynth with an Arduino, Ghidra, and Python(blog.petersobot.com ↗)

11 points · by sudara · 3y ago · 2 comments

comment 4y ago · link · parent

Good q! I’m an audio dev who thought the general community might appreciate the project. It’s a cool effort (my primary beef with pd was always the UI)

26.

Pure Data as a plugin, with a new GUI(github.com ↗)

192 points · by sudara · 4y ago · 54 comments

comment 4y ago · link · parent

Jason Shiga's Meanwhile and Leviathan are the ultimate choose your own adventure graphic novels. The latter is also getting a steam release:

https://store.steampowered.com/app/2128390/Leviathan_An_Inte...

28.

ValidateMyPlugin – Validate Your Windows, macOS or Linux VST3 and Audio Unit(validatemyplugin.com ↗)

3 points · by sudara · 4y ago · discuss

comment 4y ago · link · parent

Thank you! Good point.

30.

How JUCE Components Work(melatonin.dev ↗)

8 points · by sudara · 4y ago · 3 comments

123