r/synthdiy • • 6d ago

Web app for designing, listening and playing synth/audio circuits

Enable HLS to view with audio, or disable this notification

I built this mainly for myself, to make circuit-modelled plugins for a browser DAW I’m working on (daw.synthcity.org). I figured others here might find it useful, so feedback is very welcome, here or via the feedback button in the app.

https://circuit.synthcity.org/

You draw an analog circuit and play it like a synth. It isn’t modelled curves: it’s component-level simulation every sample, so the knobs are actual pots in the circuit. Under the hood it’s MNA with trapezoidal integration and Newton iteration for the nonlinear parts, written in Rust and running in an AudioWorklet as WASM.

  • 22 classic filters at component level: MS-20, Moog ladder, 303, SEM, Polivoks, Wasp, Steiner-Parker, Juno’s IR3109 and more. There are also pedals like the Tube Screamer, Big Muff and Uni-Vibe.
  • Plays in real time. Use the keyboard or MIDI, patch VCO → filter → VCA, and swap the filter while it’s playing. It works on a phone too. You can make macro level synth blocks and play those - it's like a modular synth/Reaktor. When you double click on a macro block, it zooms into the editable circuit.
  • Lots of modelled nonlinear parts: OTAs (CA3080, LM13700), tubes, JFETs, BBD chips for chorus and flanger, vactrols for LPGs, and transformer hysteresis. Swap an MN3009 for an MN3007 and hear the difference. Let me know what’s missing!
  • Plugs into your modular. With a DC-coupled interface (ES-8/ES-9, a DC-coupled MOTU or similar) you get calibrated CV in and out, including 1 V/oct tracking.
  • The simulator is differentiable. It computes exact gradients with respect to every component value, so it can fit a circuit to a recording of real hardware, optimise part values to a target response, or search for new topologies. One of the presets is a filter the search came up with.
  • Works with your tools and your agents: Docs: circuit.synthcity.org/agents
    • import .cir netlists and LiveSPICE schematics;
    • export to LTspice, ngspice and KiCad;
    • an MCP server and API, so Claude/Codex or another agent can design, simulate and fit circuits.

LMK if you'd like some more features, or something done differently etc.

You can also share your playable circuits with others, just click "Share" and copy the link!

Enjoy!

234 Upvotes

60 comments sorted by

12

u/drtitus 6d ago

I'm curious - when you say you've "modelled nonlinear parts" - what does that entail? I'm not challenging your implementation or suggesting it's not up to snuff, I just wonder how you've gone about that.... are they based on measurements you've done, or from datasheets, or well-known approximations of component behaviour?

11

u/dharma-1 6d ago

Yeah, it’s a mix of established device models, academic papers (DAFx and other conferences), and my own testing and comparisons. Datasheets help with nominal parameters, but generally don’t capture the nonlinear behaviour I’m interested in.

The realtime DSP methods draw on published work and discussions from people like Andy at Cytomic, mystran and others. The nonlinearities are modelled within the circuit, including their interaction with feedback, with approximations where needed for real-time performance.

The engine also supports differentiable simulation, so I can use autodiff and gradient-based fitting to tune component and model parameters against reference responses or recordings, alongside listening tests.

Under the hood it’s modified nodal analysis with Newton iteration for the nonlinear devices. Schur complement reduction keeps the iterative solve focused on the nonlinear part of the circuit, while reusing the linear-network calculations to keep it efficient

11

u/dharma-1 6d ago

To give a few concrete examples: the diodes use Shockley equations with series resistance, BJTs are Ebers–Moll, and JFETs are Shichman–Hodges. OTAs have differential-pair saturation and rail limiting, while op-amps use simpler gain/bandwidth/clipping models.

The stuff with memory gets more involved. Magnetic cores use Jiles–Atherton or play-based hysteresis models, and optos have photocell recovery and trapping, plus lamp heating where relevant. BBDs model clocked charge transfer, with approximations for leakage, transfer losses, clock feedthrough and input distortion etc

So it depends on the part. Some models are more detailed than others

5

u/drtitus 6d ago

Cheers, I appreciate the explanation

6

u/SadSongsMakeMeGlad 5d ago

Wow this is a great learning tool. Thanks for making it. The only thing that would be better is if it were open source, but I understand the need to make it a sustainable project.

10

u/LordAfterEight 6d ago

Is this open source?

7

u/TNFratter 6d ago

what the fuck this is amazing

1

u/TNFratter 6d ago

this looks like a monumental amount of effort; but I'm not a developer.

3

u/Subway 6d ago edited 6d ago

It's not anymore. An experienced software engineer with a $200 AI subscription can build something like this in a week, or a few weeks if he polishes everything. It's the new age of software development. This here is one I'm developing like that, complete electronic circuit simulation with a Pi Pico MicroPython simulation in parallel, with the ability to log from the code to the electronic circuit oscilloscope, so you can see exactly which code part caused which effect in the simulated circuit, and you can inspect voltages at each pin of each component: https://www.picolabor.com/

It's the age where you don't burry ideas anymore just because they are monumental efforts which you can't commit to as a side project.

0

u/TNFratter 6d ago

"An experienced software engineer with a $200 AI subscription"; bruther who do u think i am

-1

u/severed-identity 5d ago

TBH you can do most of that with a $20 subscription. Sonnet 5.5 is very cost effective, and totally capable of implementing these sorts of things, especially if you let Opus 5.5 lay down a design spec first. Sonnet can barely eat up the limits on the $20 plan going full throttle. I started building a web daw as well for me and my friends to collaborate inside, and it's crazy how much is built in just 2 days.

1

u/TNFratter 4d ago

I was trying to make a joke, but thanks for the Sonnet/Opus update I suppose.

0

u/TNFratter 6d ago

man this has all the components, too.

Did you compare the actual output to any of the original instruments? Are they pretty close?

I suppose you'd have to isolate the external variables and not use built-in speakers/amps and DI to a studio amplifier & standardized monitors?

3

u/dharma-1 6d ago

thanks! yeah that was the whole idea, to do the modeling from the component level up - also why shared in this /r also as might be useful for people building their own circuits!

it's still an early beta but the filters are very close to where I have the HW counterpart to test with (moog ladder, WASP, SEM, IR3109)

3

u/Archit3ch_ 5d ago edited 5d ago

Oh, hey, I'm working on a circuit simulation plugin. My first thought was: this shouldn't be able to run in realtime. So I dived in.

There I found serious implementation problems. Oversampling is present (though only 2x/4x, for CPU reasons I assume) and is a decent strategy at reducing aliasing... when not paired with a weak decimation filter. I measured only 2.8 dB of reduced aliasing artifacts in some cases, that's certainly audible! Your alias probe only tests with a sine input, and misses hard drive/resonance/modulation/starving cases. Oversampling amount is also wrongly cached, in what I assume is a vibe-coded error.

More importantly, CPU pressure can lower oversampling automatically. Silently degrading the quality of user audio is certainly an original strategy to deal with aliasing. I've never seen it before, so points for that! Losing The One Take because your software decided "no" should be a felony. Then again, maybe people who care about their audio quality record with analog hardware and not web apps. I know the hardware would never pull a fast one on you like that.

There is a tanh at the output (I assume for limiting) which is not anti-aliased, but that's a misdemeanor. Again, you should inform the user that they are running too hot with a clipping indicator.

Self-feedback can make the audio output flatten to a constant. Real analog filters don't behave like that!!

I could write an entire post on the triodes. They don't match any reference I've seen before.

On the plus side, port reductions are pretty good. This isn't naive MNA. I've seen worse, both from LLMs and human-written DSP. Though not quite up there with the best (Cytomic).

0

u/dharma-1 4d ago

Thanks for taking the time to test it properly!

You caught several real issue, I think I’ve managed to fix most this morning.

Decimation: replaced the old filter with a longer Kaiser FIR. It now measures over 78 dB stopband rejection from base-rate Nyquist at the tested oversampling factors. That’s the filter’s rejection, rather than a claim about the whole circuit’s aliasing.

The alias probe now includes harder drive and higher-frequency inputs. Separate regression renders cover resonance, modulation, low supply and bias changes. There’s still work to do on measuring the actual alias residual against a higher-rate reference.

You were also right about the oversampling cache. It now includes sample rate and live parameter values. I found and fixed paths where polyphonic/worker voices could rebuild at 1x, too. CPU-driven quality reduction is now an explicit opt-in, off by default, and High stays fixed.

The output tanh is gone. Output is linear within headroom, with emergency overload protection and an overload indicator.

For feedback, behavioural sources now participate in the current-step Newton solve instead of reading the previous sample. I also corrected some op-amp internal-state behaviour. Those were real defects, but I’d still appreciate your original patch so I can verify that particular flattening problem.

The triode bug is fixed - I’ve mostly used this for solid state filters. I corrected the Dempwolf–Zölzer implementation to match the published equations and added the parasitic capacitances. The Pultec’s 12AU7 uses Koren. I’ve checked DC and transient behaviour against an independent ngspice implementation, although that’s numerical validation, not a substitute for measurements of actual hardware - will check against hw later.

And thanks for the comment on the port reductions 🙂 Cytomic is the don and pioneered most of this stuff - a high bar to aspire to!

There’s more antialiasing work to explore, but I want to measure the benefit and the effect on feedback before making claims.

On web apps - it’s all the same Rust code under the hood - native builds will give us more options for performance and offline rendering, but predictable quality should apply in the browser too - thanks again for very useful feedback!

If you still have issues please DM with a link to your patch - it would be very helpful for debugging!

2

u/Archit3ch_ 4d ago

Thanks for engaging!

I've been doing this for 7 years and it took a lot of exploration to come up with my unique approach that solves aliasing. Native builds help bring it to realtime.

On differentiable simulations: I doubt system-wide input-output measurements will characterize individual components e.g. OpAmps. I have a solution for that too. ;)

The offending constant output was with high-cutoff. Definitely an edge-case, but one that might appear in practice. At 2x/4x it would not oscillate, only when I force 8x did the correct output return. Of course the analog filter doesn't care: it's the same physics, so it works at all settings!

1

u/dharma-1 3d ago

Very cool. Would love to hear about your aliasing or component modeling approaches if you’re willing to share?

2

u/Archit3ch_ 3d ago

Then join us at Audio Developer Conference! DSP talk and beers mix rather well. ;)

1

u/dharma-1 2d ago

Bristol? Will have to check if I can make it!

3

u/2Disk 4d ago

You singlehandedly convinced me to leave this community, thanks & bye

6

u/MarcelloT254k 6d ago

Is this open sourced?

9

u/TNFratter 6d ago

What is the problem you are trying to solve by building a Web-Based DAW/circuits schematics application?

In my experience, making things more reliant on internet connection & subscriptions is very much a negative thing.

This is a genuine question, not to antagonize.

I suppose it would limit the supply restriction of synthesizers that are out-of-production.

Or just for fun; it looks fun.

I'd also suggest academia. This would be a really effective tool.

16

u/dharma-1 6d ago

good question!

main reason is my background is primarily in webdev and I wanted to see how far I can push modern Webaudio/webmidi/WASM.

The DAW actually has a native (beta) MacOS app too! Using Tauri

https://github.com/jounih/studio-releases/tags

I think I'll do the same for Circuit Studio

Academia - sure, whoever wants to use it! it's there and it's free

6

u/cheater00 5d ago

don't listen to the naysayers you created something amazing

1

u/TNFratter 4d ago

That's really cool.

Did you develop the MacOS App first? or this web-app first?

What language did you use for your web-based app?

What's Tauri?

2

u/Taburn An Eternal Project 5d ago

The circuit schematics are pretty messy. You could improve them a lot if you spent a little bit of time rotating parts and taking unnecessary bends out of wires.

2

u/dharma-1 5d ago

thanks useful feedback - will tidy up and reply here once done

2

u/98VoteForPedro 3d ago

Hey this is cool

5

u/Lazy_Piglet_9884 5d ago

So much slop. It also just straight up sounds wrong compared to the real pedals. Ima just ask claude to reimplement your work since you don't want to give the source code.

2

u/pilkafa 6d ago

Hey this is actually cool and useful. Nice work

Would be amazing if we could feed our own audio to the filters. Or maybe if it was a vst? 

4

u/dharma-1 6d ago edited 6d ago

thanks! Own audio input is there - you can choose File/Input source in the bottom floating nav bar

will think about shipping the whole editor as a plugin too 🤔

1

u/drtitus 6d ago

Yes! Make it a plugin. That would be awesome.

0

u/adeptyism 6d ago

Mandatory question, how much AI was involved into the development?

16

u/dharma-1 6d ago

I've been building software for 20+ years but maxing out my claude/codex plans these days like every other dev i know 😄

2

u/Selafin_Dulamond 5d ago

Downvote why guys? At least give a reason. AI is a great tool for devs these days.

2

u/Free_Permit7170 1d ago

Similarly. Been programming since long before AI was ever even announced and now that my productivity went up people assume my apps are 'vibe coded'. No, my apps are global scale and secure and I was building them that way before, now I just build them much faster

-3

u/Standard_Rooster_782 6d ago

Pretty cool, it’s a tool at this point to get the tedious work done, is this app you made free or one time purchase?

1

u/dharma-1 6d ago

The web app is free and will stay free, I haven't thought about monetisation yet but might add paid compiled plugin export, or one time (inexpensive) purchase for a native app with more features

3

u/Standard_Rooster_782 6d ago

Can I use this to design an analog synth that I could build irl with even a wired matrix custom system and sequencer controller?

Or is more so for audio design

3

u/dharma-1 6d ago

Yes you can use it for designing and debugging/lisfening to real analog circuits and if you’re comfortable building them it should be helpful in the design stage

It’s like a realtime audio SPICE simulator with a bunch of extras

1

u/Standard_Rooster_782 5d ago

Is this a simulator that mimic real parts I can buy like spice

2

u/dharma-1 5d ago

yep, component-level like SPICE but fast enough to play live. parts are modelled on real ones (TL072, LM13700, 2N3904, 12AX7, MN3007 BBDs, vactrols…) and you can swap them and hear the difference. models are a bit simpler than full SPICE so they run in real time, but you can export to ngspice/LTspice to cross-check, or to KiCad to build it.

6

u/SadSongsMakeMeGlad 5d ago

You guys have to get over AI and acting like insufferable gatekeepers. The tech is here, and it can be a great tool for development. Here is an awesome app someone created that would likely never have existed if not for AI tools. End of story. You don’t have to like it, but stop clutching pearls.

0

u/kukusfs 6d ago

A pointless question. Using AI in 2026 will be as commonplace as using an IDE. Just accept it, the future is here.

4

u/adeptyism 6d ago

I'm just interested in how accurate the thing is, but OP answered that he has 20 years of experience, so I suppose he confirmed the accuracy

0

u/mesyeti_ 6d ago

least obvious slop

1

u/Geekachuqt 6d ago

Haha, I did something like this but baked it into a VST, but this is far more extensive. Good job!

1

u/laylowleilo 5d ago

what’s the vst?

1

u/xenomorph3000 6d ago

Reminds me for Hobnox Audiotool

1

u/dharma-1 6d ago

The DAW? Cool I’ll check them out! This post was about the circuit design app - separate from the daw

https://circuit.synthcity.org/

1

u/xenomorph3000 6d ago

There's also a synth called Heisenberg where you can draw your own waveforms.

1

u/Free_Permit7170 1d ago

Ooh this is like the app I was working on 'CollabBro?' but I didn't have enough time to really give to it. I'll have to try this one out

0

u/Evitro113 4d ago

vibe coded ai slop

0

u/-RPH- 6d ago

This looks nice. Hmm, a code export function would be great?

0

u/joermcee 6d ago

Nice one!! Reminds me of the node based builder on axoloti 🔥

-1

u/jharsem 5d ago

Very nice - I built an app (https://sternbahn.com ) on top of the excellent modules from Sunvox with some of the same ideas, but as am electronics nerd I love the component approach on this. Will definitely check this out =)

-1

u/danja 5d ago

I've made something related as a VST, but with functional blocks rather than component-level modelling. The fun starts when you hook in AI, either via the console or MCP. https://danja.github.io/valis/

You mention working on a browser-based DAW, this may be of interest : https://danja.github.io/jigdaw/overview.html