dsharlet / LiveSPICE

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

Diode and Pentode model #121

Closed Federerer closed 2 years ago

Federerer commented 3 years ago

FYI I'm working on implementing pentode and diode models. Are you interested in merging? Later I'll add some example circuits and maybe some models to the Tubes.xml file and also some documentation and references to the source papers that I used. Currently this branch is a POC 😉

Federerer commented 2 years ago

I think it's as ready to merge as it'll ever be. It has been working fine for me for some time now. Some stuff, like arc drawing API is rather ugly, but I won't be able to do much better without bigger refactoring of how we perform coordinate transformations (which I tried on the side, but I don't want to mix-up things here). I also wanted to implement some more sophisticated transformer and speaker models because this: image looks a little messy. But again, this will be done in separate PR. I hope you'll find some time to review it. If something needs to be fixed before merging please let me know ;) P.S. I've posted some new circuits to play with here: livespice-circuits

dsharlet commented 2 years ago

I just checked out this branch and played around with it a bit. A few things I noticed:

Federerer commented 2 years ago
dsharlet commented 2 years ago

Thanks for the fixes. This looks good to merge as-is to me. The Fender Se3 circuit still has some missed terminal connections, but I'm fine with updating that after merging :)

I did some testing with the grid = 5 setting. I think it's fine. It's a little weird that the visible grid doesn't match where you can put things, but I think it's not that bad, and probably the best we can hope for for the time being given my lack of forethought in planning the grid and component symbol layouts.

I'm approving this for now, but I'll wait to merge it until I hear from you that it's ready. I'm not sure if you still had some tweaks in the works. If I don't hear otherwise, I'll merge it later this week.

Sorry for the slow review, and thank you again for this contribution, this is really cool!

Federerer commented 2 years ago

5e3 is fixed. Tweaks will be made in separate PR's.