ode2dsp project

Started by sletz, Jan 19, 2023, 11:30 AM

sletz

I was not aware of this https://git.sr.ht/~kdsch/ode2dsp project and especially the Faust generation part. I would be happy to discuss it more (for instance I cloned the repo but could not find the nonlinear-svf.dsp file which is imported in example.dsp).

kdsch

Hey @sletz, thanks for checking out ode2dsp. Run make example to generate nonlinear-svf.dsp. After that, the Faust code should compile.

Also, pull the most recent source. I have updated the readme and added a notes file giving some more background on the project. You're welcome to discuss it here, but you can also discuss it on my public inbox.

sletz

Thanks! I could make ode2dsp run and produce Faust DSP code. I saw the new explanation file notes.m on Git, but there is no link on it in https://git.sr.ht/~kdsch/ode2dsp AFAICS? It would be great to have one.


sletz

Interesting videos on the subject: https://youtu.be/xQYLBS9R_uA and the 2 others (Part2, Part3)

stefano

This is actually the third automated tool I'm aware of that converts circuit models to actual DSP code.

The other ones are:
  • PyPHS by Antoine Falaize, which is also written in Python, and is based on Port-Hamiltonian systems' formulations (so IIRC it does not directly operate on voltages and currents);
  • an internal semi-automated (semi-interactive) tool we have developed ourselves but never made public, which is based on state-space formalism (hence operates on currents and voltages directly), uses a custom symbolic math engine we have developed as well, and outputs Ciaramella code.

Both these two start from SPICE-like netlists unlike ode2dsp, but it would be trivial to add a conversion step or make it a separate tool.

I feel that PyPHS and ode2dsp try to automate the whole process, while ours (called "temporarily" netmix) is more an interactive tool for the virtual analog expert - for example, it doesn't handle nonlinearities, it allows the user to modify and specify equations at each step and to rearrange the computation arbitrarily, etc.

As this is my main area of expertise after all, I could go on for days, so I stop it here. :-)
Personal website: https://dangelo.audio/

sletz

Right, PyPHS even contains Faust generation related code , but not sure it is really working.

afalaize

Hi,
The faust code generation module in pyphs is still experimental. It works for linear systems and very small (<2 dofs) non linear systems. We can discuss our approach to FAUST code generation which is surely not optimal at all...
Best
Antoine


sletz

Antoine, what about the C++ generated code? Is is complete ?

stefano

This morning, by chance, I found this: https://github.com/hm535/SPICE-Simulation. Didn't even download it, but it seems to be related.
Personal website: https://dangelo.audio/