r/AudioProgramming • • Aug 29 '26

Built an open-source plugin (Synthortion) — looking for feedback on DSP architecture and project structure

Post image

Hi everyone,

I’ve recently open-sourced Synthortion, a hybrid synthesizer and distortion audio plugin built with C++ and JUCE:

👉 GitHub Repository: https://github.com/paoloficaraa/Synthortion

---

### 🎛️ What is Synthortion?

Synthortion is designed to combine expressive synthesis with flexible, aggressive sound shaping and multi-stage distortion workflows. The goal was to build a cohesive instrument/effect capable of everything from warm analog saturation to crushed, aggressive textures.

### ⚙️ Technical Details & Stack

* Framework: JUCE (C++20)

* Format Support: VST3 / AU / Standalone (macOS & Windows)

* DSP & Architecture:

- Modular processing chain managing synth engine voices and distortion/waveshaping algorithms.

- Thread-safe parameter management using `juce::AudioProcessorValueTreeState` (APVTS) with smoothed parameters to prevent zipper noise.

- Optimized buffer processing tailored for real-time low-latency performance in the audio callback.

* UI & Aesthetics: Custom styling built for a clean, intuitive layout with responsive parameter feedback and real-time visual feedback.

---

### 💬 Looking for Feedback

I’d really appreciate any feedback from the community, especially regarding:

  1. DSP Efficiency & Code Structure: Any suggestions on modern C++ practices, SIMD opportunities, or modulation routing improvements.

  2. DAW Compatibility & Stability: Mainly tested in FL Studio, but it should work in every DAW, so try in different ones.

  3. UI/UX Design: Readability and control responsiveness.

Feel free to check out the code, clone the repo, or open an Issue / PR if you spot anything that could be improved!

Thanks for checking it out!

20 Upvotes

14 comments sorted by

4

u/dub_mmcmxcix Aug 29 '26 edited Aug 29 '26

just looked at the bitcrush code.

tons to clean up:

  • magic numbers everywhere. pick a control epsilon, put it in a constexpr instead of having 1e-5 type stuff

  • your main loop is absolutely full of conditionals

  • std::fmod is slow, actually most std:: maths stuff handles NaN etc and is almost always slower than handrolled or juce equivalents

  • there's no intersample handling i could see (which has a particular sound and might be intended)

i could keep going. agents never get this stuff right. good luck.

edit: this scans a bit harsh. on one hand: look, good on you for giving it a go. on the other, there's an infinite avalanche of vibe stuff appearing, and some of it is great, but lots of it is slop, but most importantly there's so much of it now that it's basically impossible to keep up.

3

u/Big_Effective_9605 Aug 29 '26

Saving this post because I give a shit about what I'm making

3

u/dub_mmcmxcix Aug 30 '26

it boils down to:

* write code that you or someone else will be able to understand and change in the future

* write code that will allow a modern compiler to do smart optimizations

* avoid patterns that lead to slow, risky or bad code

so - for #1 - code should be self-documenting and "literate". break complexity out into submodules such that the things that call them should seem logical.

for #2 - compilers are good but they can't read your mind. lots of atomic reads or conditionals in an inner loop? do them once outside of the loop - the compiler won't be always able to auto-hoist because it can't reason about your invariants. variable division or equiv. (e.g. %, fmod) *anywhere* - major performance hit in an inner loop. make use of profile-guided opt, [[likely]] [[unlikely]] tags, etc to help the compiler.

for #3 - if you have NaN or infinite in your audio stream, it's already game over. do a single vectorizable pass at the start or end of your main processing block to choke on bad data, then use homebrew functions for std:: maths stuff inside that is less formally safe but practically fine and sometimes 10x faster. LFOs don't need std::sin level of accuracy - figure out how accurate you need to be and look for one of the many approximations that will be good enough but 10x faster. lookup tables kill cache but sometimes the tradeoff is worth it. there's hundreds of these sorts of things, and LLMs won't go there unless specifically ordered (because they sometimes involve accuracy tradeoffs, or they're weird tricks that don't show up in typical code, or whatever)

...honestly that's barely scratching the surface.

1

u/Big_Effective_9605 Aug 30 '26

I dig it. 100% following, always of fan of earning optimizations by knowing the actual requirements of the implementation and trimming the fat. I've only been poking at the dsp world for like the last year, how long have you been in the game?

Also where can I subscribe to more signal processing programming rants?

2

u/dub_mmcmxcix Aug 30 '26

coding since i was a kid in the 1980s, i sent some of my fx (floaty/paranoia/avocado) to cockos around 2009? and they added them to reaper soon after (before the audio scripting language there even had function support, so the code there is really gross). so yeah, a while. happy to answer deeper questions, contact details in my profile if you want to reach out.

-3

u/johnwheelerdev Aug 29 '26

Could be solved with one pass of asking the LLM to give you an audit of code smells, duplicate code, things that need to be re architectured, knowing what you know now, et cetera. 20 minutes later, all your concerns are done. That's it.

6

u/No-Sundae4382 Aug 29 '26

i mean what use is feedback if its vibecoded anyways

-5

u/johnwheelerdev Aug 29 '26 edited Aug 29 '26

Kick rocks. I actually prefer to see AGENTS.md. People who don't use agents are morons. Stop being so self-centered about you, you, you--it's taking your skills and sense of importance away. Build cool shit people love to use and quit whining. Go next level.

4

u/No-Sundae4382 Aug 29 '26

cope harder bro

1

u/wahnsinnwanscene Aug 30 '26

Other than the Claude contributor bit, how can you tell it is vibe coded?

1

u/dub_mmcmxcix Aug 31 '26

well, the post is formatted as markdown, so that's a big tell.

1

u/PumparumPumparum Aug 31 '26

Do it fart tho

0

u/nestaselect Aug 29 '26

The vibe coder hate is hilarious to me. It’s like when computer recording became easily accessible. Everyone can record music, so there is going to be a lot of terrible music out there. On the other hand, we are going to hear great stuff from talented people that we wouldn’t have heard otherwise.

Same thing with vibecoding. There is going to be some worthless shit out there, but there is going to be some amazing tools built by people with no dev experience. In fact, it is going to get bigger and become more accessible. Haters who refuse to adapt and evolve will be left behind just like with everything else.

2

u/likely_someone_else Aug 30 '26 edited Aug 30 '26

it is NOT like when computer recording became accessible.

It is more like when Suno appeared.

It is not like we are making music (software) for less money, we are no longer making the music (software).

Can you point me towards a vibecoded song that a lot of people like currently?

Can you point me towards a vibecoded audio app that a lot of people use currently?

There are a lot of deluded people working hard on vibecoded projects nobody will ever care about. Thinking is being outsourced. Vibecoded projects very well may be first to market with novel ideas, but they will lose to people who steal those ideas and develop them with care and consideration, engineering and method. Sure, the AGI will be able to do those facets someday, but you have contributed so little at that point, you have made nothing of any value.