dsharlet / LiveSPICE

Real time SPICE simulation for audio signals
MIT License
419 stars 61 forks source link

Simulation Diverged... #213

Open AdmiralBongo opened 9 months ago

AdmiralBongo commented 9 months ago

image VH140C Channel A.schx.txt

I tried to simulate the Ampeg VH140C lead channel and without any luck. Moment I load it up, I get an error. Could be the unconnected opamp terminals (they're that way in the official schematics on the Ampeg site and in every pedal VH140C clone schematic I've found), could be the opamps themselves (or rather load they put because of how many of them there are), but swapping 4558's for the "ideal opamps" is pretty much useless, as, while it stops the errors, all I get is pure silence.

dsharlet commented 8 months ago

This simulation does work for me as-is when I downloaded it. It produces an output which is not close to being zero mean, which might be a problem, but it seems to be working even despite that.

One issue is that this circuit is quite large, and so I needed to turn down "Oversample" to get it to run in real time. It's possible that if it doesn't run in real time, the "hiccups" introduced by failing to keep up with real time introduce large transients, which could cause the simulation to diverge (but not at 0s).

dsharlet commented 8 months ago

I'm looking at doing a release now, and I see that since the last release, I made a bunch of changes to the way we understand wires and connectivity, It's possible that unconnected terminals are behaving better now, which could be why the original schematic works for me.

dsharlet commented 8 months ago

I actually went and tried the previous release, and it is working there too, so there aren't any recent fixes that are affecting the issue, at least for me...

AdmiralBongo commented 8 months ago

Weird. Anyhow, here's an updated schematic, which is closer to the original amp, having all opamps powered with two +/-15V rails. Just in case, I added 1N746 and 1N754 models, but I've tried the included generic zener diodes as well, but that didn't lead to anything good. And the conclusion I've come to is that issue is at the distortion stage, as the tonestack works flawlessly when connected directly to the input.

P.S. I set oversampling to 1 and iterations to 64 usually. Reason I'm bothering with this is that I'm a big fan of the said amp's (which is hellishly rare) sound and no plugins simulating it exist (as is the case with many other solid state amps). VH140C Channel A 3.schx.txt

AdmiralBongo commented 8 months ago

I've managed to get it working in the release 15. However, it's still barely usable in the plugin, for it starts glitching out immediately even with the largest buffer size. This doesn't even allow to tweak the settings or use it during the mixing properly. It's basically "rendering-only". Guess I'll have to wait for stability/efficiency upgrades.