Page 1 of 1

Improved code generator for Faust

Posted: Sat Aug 31, 2019 12:45 am
by jpcima
Hello. I'm working on some projects which use increasingly more faust code for processing.
It's very good, I found however that these generated files are not easy to work with.
When I've examined some projects as zam-plugins and guitarix, the method for integrating faust is based on a transforming script, or a simple copy-pasting.

I thought of it, and made a tool for myself to generate with the least amount of hacks possible.
What I did essentially, it's to extract code and metadata out of faust's codegen and XML, and then I passed this entire data into a template engine.
By this method, the code is directly like I want out of the program, and is remade by a single rule of Makefile.

The program is located here, and I completed adding a manual today. Examples are included and buildable in the sources.
https://github.com/jpcima/faustpp

Re: Improved code generator for Faust

Posted: Sat Aug 31, 2019 1:44 pm
by CrocoDuck
Good stuff! I love Faust.

By the way, the topic of integrating Faust code in other C++ code in a "faustian" way was covered at the IFC 2018. Here, if I remember properly.

Re: Improved code generator for Faust

Posted: Sun Sep 01, 2019 7:10 am
by marbangens
Cool 8) Must try Faust, thanks

Re: Improved code generator for Faust

Posted: Wed Sep 11, 2019 1:39 pm
by sletz
"I found however that these generated files are not easy to work with."

Usually you should not have to "hack" the generated code, but develop a C++ wrapper class. They are several way to do that. What is the exact problem you want to solve ?